dependabot-nuget 0.288.0 → 0.290.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/helpers/lib/NuGetUpdater/Directory.Packages.props +19 -17
- data/helpers/lib/NuGetUpdater/NuGetProjects/NuGet.Packaging/NuGet.Packaging.csproj +0 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli/Commands/AnalyzeCommand.cs +7 -3
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli/Commands/RunCommand.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli.Test/EntryPointTests.Analyze.cs +29 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli.Test/EntryPointTests.Discover.cs +25 -4
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli.Test/EntryPointTests.Run.cs +0 -6
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/AnalyzeWorker.cs +33 -16
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/CompatabilityChecker.cs +25 -10
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/NuGetContext.cs +0 -13
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/RequirementArrayConverter.cs +39 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/VersionFinder.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Clone/ShellGitCommandHandler.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/DiscoveryWorker.cs +60 -66
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/DotNetToolsJsonDiscovery.cs +2 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/GlobalJsonDiscovery.cs +2 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/PackagesConfigDiscovery.cs +11 -3
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/PackagesConfigDiscoveryResult.cs +1 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/ProjectDiscoveryResult.cs +2 -4
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/SdkProjectDiscovery.cs +54 -11
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/WorkspaceDiscoveryResult.cs +0 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/ExperimentsManager.cs +1 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Files/JsonBuildFile.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/FrameworkChecker/CompatabilityChecker.cs +2 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/ApiModel/Advisory.cs +13 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/ApiModel/AllowedUpdate.cs +18 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/ApiModel/CommitOptions.cs +8 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/ApiModel/Condition.cs +19 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/ApiModel/DependencyGroup.cs +8 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/ApiModel/GroupPullRequest.cs +9 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/ApiModel/Job.cs +13 -10
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/ApiModel/PullRequest.cs +11 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/ApiModel/RequirementsUpdateStrategy.cs +15 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/RunWorker.cs +67 -58
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/VersionConverter.cs +19 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/BindingRedirectManager.cs +15 -44
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/DotNetToolsJsonUpdater.cs +4 -4
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/GlobalJsonUpdater.cs +5 -5
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/LockFileUpdater.cs +2 -10
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/PackageReferenceUpdater.cs +38 -33
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/PackagesConfigUpdater.cs +25 -23
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/UpdaterWorker.cs +16 -12
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/ConsoleLogger.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/DependencyConflictResolver.cs +19 -19
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/ILogger.cs +11 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/JsonHelper.cs +2 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/MSBuildHelper.cs +18 -17
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/NuGetHelper.cs +1 -17
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/PathHelper.cs +17 -9
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/ProjectHelper.cs +96 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Analyze/AnalyzeWorkerTestBase.cs +5 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Analyze/AnalyzeWorkerTests.cs +87 -5
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTestBase.cs +2 -5
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.DotNetToolsJson.cs +45 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.GlobalJson.cs +35 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.PackagesConfig.cs +16 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.Proj.cs +6 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.Project.cs +143 -36
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.cs +184 -48
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/ExpectedDiscoveryResults.cs +5 -5
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/SdkProjectDiscoveryTests.cs +32 -10
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/MiscellaneousTests.cs +85 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/RunWorkerTests.cs +402 -102
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/SerializationTests.cs +342 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdatedDependencyListTests.cs +60 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/TemporaryDirectory.cs +18 -7
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/TestLogger.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/BindingRedirectsTests.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/PackagesConfigUpdaterTests.cs +24 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTestBase.cs +4 -14
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.DotNetTools.cs +84 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.GlobalJson.cs +66 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.PackageReference.cs +95 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.PackagesConfig.cs +1 -7
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/AssertEx.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/LinuxOnlyAttribute.cs +12 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MSBuildHelperTests.cs +558 -711
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/PathHelperTests.cs +47 -2
- data/lib/dependabot/nuget/analysis/analysis_json_reader.rb +4 -2
- data/lib/dependabot/nuget/analysis/dependency_analysis.rb +3 -3
- data/lib/dependabot/nuget/discovery/dependency_details.rb +10 -3
- data/lib/dependabot/nuget/discovery/dependency_file_discovery.rb +8 -12
- data/lib/dependabot/nuget/discovery/discovery_json_reader.rb +214 -29
- data/lib/dependabot/nuget/discovery/project_discovery.rb +41 -8
- data/lib/dependabot/nuget/discovery/workspace_discovery.rb +14 -19
- data/lib/dependabot/nuget/file_fetcher.rb +11 -393
- data/lib/dependabot/nuget/file_parser.rb +23 -61
- data/lib/dependabot/nuget/file_updater.rb +28 -23
- data/lib/dependabot/nuget/native_helpers.rb +14 -5
- data/lib/dependabot/nuget/update_checker/requirements_updater.rb +23 -27
- data/lib/dependabot/nuget/update_checker.rb +116 -190
- metadata +20 -32
- data/helpers/lib/NuGetUpdater/NuGetProjects/Directory.Packages.props +0 -29
- data/lib/dependabot/nuget/discovery/directory_packages_props_discovery.rb +0 -43
- data/lib/dependabot/nuget/file_fetcher/import_paths_finder.rb +0 -73
- data/lib/dependabot/nuget/file_fetcher/sln_project_paths_finder.rb +0 -60
- data/lib/dependabot/nuget/http_response_helpers.rb +0 -19
- data/lib/dependabot/nuget/native_discovery/native_dependency_details.rb +0 -102
- data/lib/dependabot/nuget/native_discovery/native_dependency_file_discovery.rb +0 -129
- data/lib/dependabot/nuget/native_discovery/native_discovery_json_reader.rb +0 -171
- data/lib/dependabot/nuget/native_discovery/native_evaluation_details.rb +0 -63
- data/lib/dependabot/nuget/native_discovery/native_project_discovery.rb +0 -82
- data/lib/dependabot/nuget/native_discovery/native_property_details.rb +0 -43
- data/lib/dependabot/nuget/native_discovery/native_workspace_discovery.rb +0 -68
- data/lib/dependabot/nuget/native_update_checker/native_requirements_updater.rb +0 -105
- data/lib/dependabot/nuget/native_update_checker/native_update_checker.rb +0 -201
- data/lib/dependabot/nuget/nuget_client.rb +0 -223
- data/lib/dependabot/nuget/update_checker/compatibility_checker.rb +0 -116
- data/lib/dependabot/nuget/update_checker/dependency_finder.rb +0 -297
- data/lib/dependabot/nuget/update_checker/nupkg_fetcher.rb +0 -221
- data/lib/dependabot/nuget/update_checker/nuspec_fetcher.rb +0 -110
- data/lib/dependabot/nuget/update_checker/property_updater.rb +0 -196
- data/lib/dependabot/nuget/update_checker/repository_finder.rb +0 -466
- data/lib/dependabot/nuget/update_checker/tfm_comparer.rb +0 -34
- data/lib/dependabot/nuget/update_checker/tfm_finder.rb +0 -30
- data/lib/dependabot/nuget/update_checker/version_finder.rb +0 -449
data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.Project.cs
CHANGED
@@ -57,12 +57,14 @@ public partial class DiscoveryWorkerTests
|
|
57
57
|
new("TargetFrameworks", "net7.0;net8.0", "myproj.csproj"),
|
58
58
|
],
|
59
59
|
TargetFrameworks = ["net7.0"], // net8.0 has no packages and is not reported
|
60
|
+
ReferencedProjectPaths = [],
|
61
|
+
ImportedFiles = [
|
62
|
+
"Directory.Build.props",
|
63
|
+
"Directory.Packages.props",
|
64
|
+
],
|
65
|
+
AdditionalFiles = [],
|
60
66
|
},
|
61
67
|
],
|
62
|
-
ImportedFiles = [
|
63
|
-
"Directory.Build.props",
|
64
|
-
"Directory.Packages.props",
|
65
|
-
],
|
66
68
|
}
|
67
69
|
);
|
68
70
|
}
|
@@ -119,12 +121,14 @@ public partial class DiscoveryWorkerTests
|
|
119
121
|
new("TargetFrameworks", "net7.0;net8.0", "myproj.csproj"),
|
120
122
|
],
|
121
123
|
TargetFrameworks = ["net7.0", "net8.0"],
|
124
|
+
ReferencedProjectPaths = [],
|
125
|
+
ImportedFiles = [
|
126
|
+
"Directory.Build.props",
|
127
|
+
"Directory.Packages.props",
|
128
|
+
],
|
129
|
+
AdditionalFiles = [],
|
122
130
|
},
|
123
131
|
],
|
124
|
-
ImportedFiles = [
|
125
|
-
"Directory.Build.props",
|
126
|
-
"Directory.Packages.props",
|
127
|
-
],
|
128
132
|
}
|
129
133
|
);
|
130
134
|
}
|
@@ -187,12 +191,14 @@ public partial class DiscoveryWorkerTests
|
|
187
191
|
new("TargetFramework", "net8.0", "project.csproj"),
|
188
192
|
],
|
189
193
|
TargetFrameworks = ["net8.0"],
|
194
|
+
ReferencedProjectPaths = [],
|
195
|
+
ImportedFiles = [
|
196
|
+
"Directory.Build.props",
|
197
|
+
"Directory.Build.targets",
|
198
|
+
],
|
199
|
+
AdditionalFiles = [],
|
190
200
|
}
|
191
201
|
],
|
192
|
-
ImportedFiles = [
|
193
|
-
"Directory.Build.props",
|
194
|
-
"Directory.Build.targets"
|
195
|
-
],
|
196
202
|
}
|
197
203
|
);
|
198
204
|
}
|
@@ -255,12 +261,14 @@ public partial class DiscoveryWorkerTests
|
|
255
261
|
new("TargetFramework", "net8.0", "project.csproj"),
|
256
262
|
],
|
257
263
|
TargetFrameworks = ["net8.0"],
|
264
|
+
ReferencedProjectPaths = [],
|
265
|
+
ImportedFiles = [
|
266
|
+
"Directory.Build.props",
|
267
|
+
"Directory.Build.targets"
|
268
|
+
],
|
269
|
+
AdditionalFiles = [],
|
258
270
|
}
|
259
271
|
],
|
260
|
-
ImportedFiles = [
|
261
|
-
"Directory.Build.props",
|
262
|
-
"Directory.Build.targets"
|
263
|
-
],
|
264
272
|
}
|
265
273
|
);
|
266
274
|
}
|
@@ -308,11 +316,13 @@ public partial class DiscoveryWorkerTests
|
|
308
316
|
new("TargetFramework", "net8.0", "project.csproj"),
|
309
317
|
],
|
310
318
|
TargetFrameworks = ["net8.0"],
|
319
|
+
ReferencedProjectPaths = [],
|
320
|
+
ImportedFiles = [
|
321
|
+
"Directory.Packages.props"
|
322
|
+
],
|
323
|
+
AdditionalFiles = [],
|
311
324
|
},
|
312
325
|
],
|
313
|
-
ImportedFiles = [
|
314
|
-
"Directory.Packages.props",
|
315
|
-
]
|
316
326
|
}
|
317
327
|
);
|
318
328
|
}
|
@@ -360,11 +370,13 @@ public partial class DiscoveryWorkerTests
|
|
360
370
|
new("TargetFramework", "net8.0", "project.csproj"),
|
361
371
|
],
|
362
372
|
TargetFrameworks = ["net8.0"],
|
373
|
+
ReferencedProjectPaths = [],
|
374
|
+
ImportedFiles = [
|
375
|
+
"Directory.Packages.props"
|
376
|
+
],
|
377
|
+
AdditionalFiles = [],
|
363
378
|
},
|
364
379
|
],
|
365
|
-
ImportedFiles = [
|
366
|
-
"Directory.Packages.props",
|
367
|
-
]
|
368
380
|
}
|
369
381
|
);
|
370
382
|
}
|
@@ -426,14 +438,14 @@ public partial class DiscoveryWorkerTests
|
|
426
438
|
new("TargetFramework", "net7.0", "myproj.csproj"),
|
427
439
|
],
|
428
440
|
TargetFrameworks = ["net7.0"],
|
441
|
+
ReferencedProjectPaths = [],
|
442
|
+
ImportedFiles = [
|
443
|
+
"Directory.Build.targets",
|
444
|
+
"Packages.props",
|
445
|
+
],
|
446
|
+
AdditionalFiles = [],
|
429
447
|
},
|
430
448
|
],
|
431
|
-
ImportedFiles = [
|
432
|
-
"Directory.Build.targets",
|
433
|
-
"NUGET_PACKAGES/microsoft.build.centralpackageversions/2.1.3/Sdk/Sdk.props", // this is an artifact of the package cache existing next to the csproj
|
434
|
-
"NUGET_PACKAGES/microsoft.build.centralpackageversions/2.1.3/Sdk/Sdk.targets", // this is an artifact of the package cache existing next to the csproj
|
435
|
-
"Packages.props",
|
436
|
-
]
|
437
449
|
}
|
438
450
|
);
|
439
451
|
}
|
@@ -496,14 +508,14 @@ public partial class DiscoveryWorkerTests
|
|
496
508
|
new("TargetFramework", "net7.0", "myproj.csproj"),
|
497
509
|
],
|
498
510
|
TargetFrameworks = ["net7.0"],
|
511
|
+
ReferencedProjectPaths = [],
|
512
|
+
ImportedFiles = [
|
513
|
+
"Directory.Build.targets",
|
514
|
+
"Packages.props",
|
515
|
+
],
|
516
|
+
AdditionalFiles = [],
|
499
517
|
},
|
500
518
|
],
|
501
|
-
ImportedFiles = [
|
502
|
-
"Directory.Build.targets",
|
503
|
-
"NUGET_PACKAGES/microsoft.build.centralpackageversions/2.1.3/Sdk/Sdk.props", // this is an artifact of the package cache existing next to the csproj
|
504
|
-
"NUGET_PACKAGES/microsoft.build.centralpackageversions/2.1.3/Sdk/Sdk.targets", // this is an artifact of the package cache existing next to the csproj
|
505
|
-
"Packages.props",
|
506
|
-
]
|
507
519
|
}
|
508
520
|
);
|
509
521
|
}
|
@@ -547,6 +559,9 @@ public partial class DiscoveryWorkerTests
|
|
547
559
|
new("TargetFramework", "net8.0", "myproj.csproj"),
|
548
560
|
],
|
549
561
|
TargetFrameworks = ["net8.0"],
|
562
|
+
ReferencedProjectPaths = [],
|
563
|
+
ImportedFiles = [],
|
564
|
+
AdditionalFiles = [],
|
550
565
|
}
|
551
566
|
],
|
552
567
|
}
|
@@ -592,6 +607,9 @@ public partial class DiscoveryWorkerTests
|
|
592
607
|
new("TargetFramework", "net8.0", "myproj.csproj"),
|
593
608
|
],
|
594
609
|
TargetFrameworks = ["net8.0"],
|
610
|
+
ReferencedProjectPaths = [],
|
611
|
+
ImportedFiles = [],
|
612
|
+
AdditionalFiles = [],
|
595
613
|
}
|
596
614
|
],
|
597
615
|
}
|
@@ -641,9 +659,13 @@ public partial class DiscoveryWorkerTests
|
|
641
659
|
new("TargetFramework", "net8.0", "myproj.csproj"),
|
642
660
|
],
|
643
661
|
TargetFrameworks = ["net8.0"],
|
662
|
+
ReferencedProjectPaths = [],
|
663
|
+
ImportedFiles = [
|
664
|
+
"Directory.Build.props"
|
665
|
+
],
|
666
|
+
AdditionalFiles = [],
|
644
667
|
}
|
645
668
|
],
|
646
|
-
ImportedFiles = ["Directory.Build.props"],
|
647
669
|
}
|
648
670
|
);
|
649
671
|
}
|
@@ -692,9 +714,13 @@ public partial class DiscoveryWorkerTests
|
|
692
714
|
new("TargetFramework", "$(SomeTfm)", "myproj.csproj"),
|
693
715
|
],
|
694
716
|
TargetFrameworks = ["net8.0"],
|
717
|
+
ReferencedProjectPaths = [],
|
718
|
+
ImportedFiles = [
|
719
|
+
"Directory.Build.props"
|
720
|
+
],
|
721
|
+
AdditionalFiles = [],
|
695
722
|
}
|
696
723
|
],
|
697
|
-
ImportedFiles = ["Directory.Build.props"],
|
698
724
|
}
|
699
725
|
);
|
700
726
|
}
|
@@ -765,6 +791,9 @@ public partial class DiscoveryWorkerTests
|
|
765
791
|
new("TargetFramework", "net8.0", "myproj.csproj"),
|
766
792
|
],
|
767
793
|
TargetFrameworks = ["net8.0"],
|
794
|
+
ReferencedProjectPaths = [],
|
795
|
+
ImportedFiles = [],
|
796
|
+
AdditionalFiles = [],
|
768
797
|
}
|
769
798
|
]
|
770
799
|
}
|
@@ -812,6 +841,9 @@ public partial class DiscoveryWorkerTests
|
|
812
841
|
new("TargetFrameworks", "net7.0;net8.0", "myproj.csproj"),
|
813
842
|
],
|
814
843
|
TargetFrameworks = ["net7.0", "net8.0"],
|
844
|
+
ReferencedProjectPaths = [],
|
845
|
+
ImportedFiles = [],
|
846
|
+
AdditionalFiles = [],
|
815
847
|
}
|
816
848
|
],
|
817
849
|
}
|
@@ -857,6 +889,9 @@ public partial class DiscoveryWorkerTests
|
|
857
889
|
new("TargetFrameworks", "net7.0;net8.0", "myproj.csproj"),
|
858
890
|
],
|
859
891
|
TargetFrameworks = ["net7.0", "net8.0"],
|
892
|
+
ReferencedProjectPaths = [],
|
893
|
+
ImportedFiles = [],
|
894
|
+
AdditionalFiles = [],
|
860
895
|
}
|
861
896
|
],
|
862
897
|
}
|
@@ -918,6 +953,8 @@ public partial class DiscoveryWorkerTests
|
|
918
953
|
new("TargetFramework", "net8.0", @"test/unit-tests.csproj"),
|
919
954
|
],
|
920
955
|
TargetFrameworks = ["net8.0"],
|
956
|
+
ImportedFiles = [],
|
957
|
+
AdditionalFiles = [],
|
921
958
|
},
|
922
959
|
new()
|
923
960
|
{
|
@@ -929,6 +966,9 @@ public partial class DiscoveryWorkerTests
|
|
929
966
|
new("TargetFramework", "net8.0", @"src/helpers.csproj"),
|
930
967
|
],
|
931
968
|
TargetFrameworks = ["net8.0"],
|
969
|
+
ReferencedProjectPaths = [],
|
970
|
+
ImportedFiles = [],
|
971
|
+
AdditionalFiles = [],
|
932
972
|
}
|
933
973
|
]
|
934
974
|
}
|
@@ -989,6 +1029,8 @@ public partial class DiscoveryWorkerTests
|
|
989
1029
|
new("TargetFramework", "net8.0", @"test/unit-tests.csproj"),
|
990
1030
|
],
|
991
1031
|
TargetFrameworks = ["net8.0"],
|
1032
|
+
ImportedFiles = [],
|
1033
|
+
AdditionalFiles = [],
|
992
1034
|
},
|
993
1035
|
new()
|
994
1036
|
{
|
@@ -1000,6 +1042,9 @@ public partial class DiscoveryWorkerTests
|
|
1000
1042
|
new("TargetFramework", "net8.0", @"src/helpers.csproj"),
|
1001
1043
|
],
|
1002
1044
|
TargetFrameworks = ["net8.0"],
|
1045
|
+
ReferencedProjectPaths = [],
|
1046
|
+
ImportedFiles = [],
|
1047
|
+
AdditionalFiles = [],
|
1003
1048
|
}
|
1004
1049
|
]
|
1005
1050
|
}
|
@@ -1062,6 +1107,9 @@ public partial class DiscoveryWorkerTests
|
|
1062
1107
|
new("TargetFramework", "net8.0", @"projects/library.csproj"),
|
1063
1108
|
],
|
1064
1109
|
TargetFrameworks = ["net8.0"],
|
1110
|
+
ReferencedProjectPaths = [],
|
1111
|
+
ImportedFiles = [],
|
1112
|
+
AdditionalFiles = [],
|
1065
1113
|
}
|
1066
1114
|
]
|
1067
1115
|
}
|
@@ -1108,6 +1156,9 @@ public partial class DiscoveryWorkerTests
|
|
1108
1156
|
new("TargetFrameworks", "net8.0-ios;net8.0-android;net8.0-macos;net8.0-maccatalyst", @"src/project.csproj"),
|
1109
1157
|
],
|
1110
1158
|
TargetFrameworks = ["net8.0-android", "net8.0-ios", "net8.0-maccatalyst", "net8.0-macos"],
|
1159
|
+
ReferencedProjectPaths = [],
|
1160
|
+
ImportedFiles = [],
|
1161
|
+
AdditionalFiles = [],
|
1111
1162
|
}
|
1112
1163
|
]
|
1113
1164
|
}
|
@@ -1151,6 +1202,62 @@ public partial class DiscoveryWorkerTests
|
|
1151
1202
|
new("TargetFrameworks", "net8.0-ios;net8.0-android;net8.0-macos;net8.0-maccatalyst", @"src/project.csproj"),
|
1152
1203
|
],
|
1153
1204
|
TargetFrameworks = ["net8.0-android", "net8.0-ios", "net8.0-maccatalyst", "net8.0-macos"],
|
1205
|
+
ReferencedProjectPaths = [],
|
1206
|
+
ImportedFiles = [],
|
1207
|
+
AdditionalFiles = [],
|
1208
|
+
}
|
1209
|
+
]
|
1210
|
+
}
|
1211
|
+
);
|
1212
|
+
}
|
1213
|
+
|
1214
|
+
[Theory]
|
1215
|
+
[InlineData(true)]
|
1216
|
+
[InlineData(false)]
|
1217
|
+
public async Task PackageLockJsonFileIsReported(bool useDirectDiscovery)
|
1218
|
+
{
|
1219
|
+
await TestDiscoveryAsync(
|
1220
|
+
experimentsManager: new ExperimentsManager() { UseDirectDiscovery = useDirectDiscovery },
|
1221
|
+
packages:
|
1222
|
+
[
|
1223
|
+
MockNuGetPackage.CreateSimplePackage("Some.Package", "1.2.3", "net8.0"),
|
1224
|
+
],
|
1225
|
+
workspacePath: "src",
|
1226
|
+
files:
|
1227
|
+
[
|
1228
|
+
("src/project.csproj", """
|
1229
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
1230
|
+
<PropertyGroup>
|
1231
|
+
<TargetFramework>net8.0</TargetFramework>
|
1232
|
+
</PropertyGroup>
|
1233
|
+
<ItemGroup>
|
1234
|
+
<PackageReference Include="Some.Package" Version="1.2.3" />
|
1235
|
+
</ItemGroup>
|
1236
|
+
</Project>
|
1237
|
+
"""),
|
1238
|
+
("src/packages.lock.json", """
|
1239
|
+
{}
|
1240
|
+
"""),
|
1241
|
+
],
|
1242
|
+
expectedResult: new()
|
1243
|
+
{
|
1244
|
+
Path = "src",
|
1245
|
+
Projects = [
|
1246
|
+
new()
|
1247
|
+
{
|
1248
|
+
FilePath = "project.csproj",
|
1249
|
+
Dependencies = [
|
1250
|
+
new("Some.Package", "1.2.3", DependencyType.PackageReference, TargetFrameworks: ["net8.0"], IsDirect: true)
|
1251
|
+
],
|
1252
|
+
Properties = [
|
1253
|
+
new("TargetFramework", "net8.0", "src/project.csproj"),
|
1254
|
+
],
|
1255
|
+
TargetFrameworks = ["net8.0"],
|
1256
|
+
ReferencedProjectPaths = [],
|
1257
|
+
ImportedFiles = [],
|
1258
|
+
AdditionalFiles = [
|
1259
|
+
"packages.lock.json"
|
1260
|
+
],
|
1154
1261
|
}
|
1155
1262
|
]
|
1156
1263
|
}
|
@@ -65,7 +65,10 @@ public partial class DiscoveryWorkerTests : DiscoveryWorkerTestBase
|
|
65
65
|
Properties = [
|
66
66
|
new("SomePackageVersion", "9.0.1", projectPath),
|
67
67
|
new("TargetFramework", "net8.0", projectPath),
|
68
|
-
]
|
68
|
+
],
|
69
|
+
ReferencedProjectPaths = [],
|
70
|
+
ImportedFiles = [],
|
71
|
+
AdditionalFiles = [],
|
69
72
|
}
|
70
73
|
]
|
71
74
|
}
|
@@ -111,7 +114,10 @@ public partial class DiscoveryWorkerTests : DiscoveryWorkerTestBase
|
|
111
114
|
],
|
112
115
|
Properties = [
|
113
116
|
new("TargetFramework", "net472", "src/project.csproj"),
|
114
|
-
]
|
117
|
+
],
|
118
|
+
ReferencedProjectPaths = [],
|
119
|
+
ImportedFiles = [],
|
120
|
+
AdditionalFiles = [],
|
115
121
|
}
|
116
122
|
]
|
117
123
|
}
|
@@ -160,7 +166,10 @@ public partial class DiscoveryWorkerTests : DiscoveryWorkerTestBase
|
|
160
166
|
Properties = [
|
161
167
|
new("SomePackageVersion", "9.0.1", "src/project.csproj"),
|
162
168
|
new("TargetFramework", "net8.0", "src/project.csproj"),
|
163
|
-
]
|
169
|
+
],
|
170
|
+
ReferencedProjectPaths = [],
|
171
|
+
ImportedFiles = [],
|
172
|
+
AdditionalFiles = [],
|
164
173
|
}
|
165
174
|
]
|
166
175
|
}
|
@@ -209,7 +218,112 @@ public partial class DiscoveryWorkerTests : DiscoveryWorkerTestBase
|
|
209
218
|
Properties = [
|
210
219
|
new("SomePackageVersion", "9.0.1", "src/project.csproj"),
|
211
220
|
new("TargetFramework", "net8.0", "src/project.csproj"),
|
212
|
-
]
|
221
|
+
],
|
222
|
+
ImportedFiles = [],
|
223
|
+
AdditionalFiles = [],
|
224
|
+
}
|
225
|
+
]
|
226
|
+
}
|
227
|
+
);
|
228
|
+
}
|
229
|
+
|
230
|
+
[LinuxOnlyFact]
|
231
|
+
public async Task TestDependenciesCaseSensitiveProjectPaths()
|
232
|
+
{
|
233
|
+
await TestDiscoveryAsync(
|
234
|
+
packages:
|
235
|
+
[
|
236
|
+
MockNuGetPackage.CreateSimplePackage("Some.Package", "9.0.1", "net8.0"),
|
237
|
+
],
|
238
|
+
experimentsManager: new ExperimentsManager() { UseDirectDiscovery = true },
|
239
|
+
workspacePath: "src",
|
240
|
+
files: new[]
|
241
|
+
{
|
242
|
+
("src/test/project1/project1.csproj", """
|
243
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
244
|
+
<PropertyGroup>
|
245
|
+
<TargetFramework>net8.0</TargetFramework>
|
246
|
+
</PropertyGroup>
|
247
|
+
|
248
|
+
<ItemGroup>
|
249
|
+
<PackageReference Include="Some.Package" Version="9.0.1" />
|
250
|
+
</ItemGroup>
|
251
|
+
</Project>
|
252
|
+
"""),
|
253
|
+
("src/TEST/project2/project2.csproj", """
|
254
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
255
|
+
<PropertyGroup>
|
256
|
+
<TargetFramework>net8.0</TargetFramework>
|
257
|
+
</PropertyGroup>
|
258
|
+
|
259
|
+
<ItemGroup>
|
260
|
+
<PackageReference Include="Some.Package" Version="9.0.1" />
|
261
|
+
</ItemGroup>
|
262
|
+
</Project>
|
263
|
+
"""),
|
264
|
+
// Add solution files
|
265
|
+
("src/solution.sln", """
|
266
|
+
Microsoft Visual Studio Solution File, Format Version 12.00
|
267
|
+
# Visual Studio 14
|
268
|
+
VisualStudioVersion = 14.0.22705.0
|
269
|
+
MinimumVisualStudioVersion = 10.0.40219.1
|
270
|
+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "project1", "test\project1\project1.csproj", "{782E0C0A-10D3-444D-9640-263D03D2B20C}"
|
271
|
+
EndProject
|
272
|
+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "project2", "test\project2\project2.csproj", "{782E0C0A-10D3-444D-9640-263D03D2B20D}"
|
273
|
+
EndProject
|
274
|
+
Global
|
275
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
276
|
+
Debug|Any CPU = Debug|Any CPU
|
277
|
+
Release|Any CPU = Release|Any CPU
|
278
|
+
EndGlobalSection
|
279
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
280
|
+
{782E0C0A-10D3-444D-9640-263D03D2B20C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
281
|
+
{782E0C0A-10D3-444D-9640-263D03D2B20C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
282
|
+
{782E0C0A-10D3-444D-9640-263D03D2B20C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
283
|
+
{782E0C0A-10D3-444D-9640-263D03D2B20C}.Release|Any CPU.Build.0 = Release|Any CPU
|
284
|
+
{782E0C0A-10D3-444D-9640-263D03D2B20D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
285
|
+
{782E0C0A-10D3-444D-9640-263D03D2B20D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
286
|
+
{782E0C0A-10D3-444D-9640-263D03D2B20D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
287
|
+
{782E0C0A-10D3-444D-9640-263D03D2B20D}.Release|Any CPU.Build.0 = Release|Any CPU
|
288
|
+
EndGlobalSection
|
289
|
+
GlobalSection(SolutionProperties) = preSolution
|
290
|
+
HideSolutionNode = FALSE
|
291
|
+
EndGlobalSection
|
292
|
+
EndGlobal
|
293
|
+
""")
|
294
|
+
|
295
|
+
},
|
296
|
+
expectedResult: new()
|
297
|
+
{
|
298
|
+
Path = "src",
|
299
|
+
Projects = [
|
300
|
+
new()
|
301
|
+
{
|
302
|
+
FilePath = "test/project1/project1.csproj",
|
303
|
+
TargetFrameworks = ["net8.0"],
|
304
|
+
ReferencedProjectPaths = [],
|
305
|
+
Dependencies = [
|
306
|
+
new("Some.Package", "9.0.1", DependencyType.PackageReference, TargetFrameworks: ["net8.0"], IsDirect: true),
|
307
|
+
],
|
308
|
+
Properties = [
|
309
|
+
new("TargetFramework", "net8.0", "src/test/project1/project1.csproj"),
|
310
|
+
],
|
311
|
+
ImportedFiles = [],
|
312
|
+
AdditionalFiles = [],
|
313
|
+
},
|
314
|
+
new()
|
315
|
+
{
|
316
|
+
FilePath = "TEST/project2/project2.csproj",
|
317
|
+
TargetFrameworks = ["net8.0"],
|
318
|
+
ReferencedProjectPaths = [],
|
319
|
+
Dependencies = [
|
320
|
+
new("Some.Package", "9.0.1", DependencyType.PackageReference, TargetFrameworks: ["net8.0"], IsDirect: true),
|
321
|
+
],
|
322
|
+
Properties = [
|
323
|
+
new("TargetFramework", "net8.0", "src/TEST/project2/project2.csproj"),
|
324
|
+
],
|
325
|
+
ImportedFiles = [],
|
326
|
+
AdditionalFiles = [],
|
213
327
|
}
|
214
328
|
]
|
215
329
|
}
|
@@ -258,7 +372,9 @@ public partial class DiscoveryWorkerTests : DiscoveryWorkerTestBase
|
|
258
372
|
Properties = [
|
259
373
|
new("SomePackageVersion", "9.0.1", "src/project.csproj"),
|
260
374
|
new("TargetFramework", "net8.0", "src/project.csproj"),
|
261
|
-
]
|
375
|
+
],
|
376
|
+
ImportedFiles = [],
|
377
|
+
AdditionalFiles = [],
|
262
378
|
}
|
263
379
|
]
|
264
380
|
}
|
@@ -315,7 +431,12 @@ public partial class DiscoveryWorkerTests : DiscoveryWorkerTestBase
|
|
315
431
|
Dependencies = [
|
316
432
|
new("Some.Package", "7.0.1", DependencyType.PackagesConfig, TargetFrameworks: ["net45"]),
|
317
433
|
],
|
318
|
-
Properties = []
|
434
|
+
Properties = [],
|
435
|
+
ReferencedProjectPaths = [],
|
436
|
+
ImportedFiles = [],
|
437
|
+
AdditionalFiles = [
|
438
|
+
"packages.config",
|
439
|
+
],
|
319
440
|
}
|
320
441
|
]
|
321
442
|
}
|
@@ -372,13 +493,15 @@ public partial class DiscoveryWorkerTests : DiscoveryWorkerTestBase
|
|
372
493
|
],
|
373
494
|
Properties = [
|
374
495
|
new("TargetFramework", "net8.0", "src/project.csproj")
|
375
|
-
]
|
496
|
+
],
|
497
|
+
ReferencedProjectPaths = [],
|
498
|
+
ImportedFiles = [
|
499
|
+
"../Directory.Build.props",
|
500
|
+
"../Directory.Packages.props",
|
501
|
+
],
|
502
|
+
AdditionalFiles = [],
|
376
503
|
}
|
377
504
|
],
|
378
|
-
ImportedFiles = [
|
379
|
-
"Directory.Build.props",
|
380
|
-
"Directory.Packages.props",
|
381
|
-
]
|
382
505
|
}
|
383
506
|
);
|
384
507
|
}
|
@@ -435,13 +558,15 @@ public partial class DiscoveryWorkerTests : DiscoveryWorkerTestBase
|
|
435
558
|
new("ManagePackageVersionsCentrally", "true", "Directory.Packages.props"),
|
436
559
|
new("SomePackageVersion", "9.0.1", "Directory.Packages.props"),
|
437
560
|
new("TargetFramework", "net8.0", "src/project.csproj")
|
438
|
-
]
|
561
|
+
],
|
562
|
+
ReferencedProjectPaths = [],
|
563
|
+
ImportedFiles = [
|
564
|
+
"../Directory.Build.props",
|
565
|
+
"../Directory.Packages.props",
|
566
|
+
],
|
567
|
+
AdditionalFiles = [],
|
439
568
|
}
|
440
569
|
],
|
441
|
-
ImportedFiles = [
|
442
|
-
"Directory.Build.props",
|
443
|
-
"Directory.Packages.props",
|
444
|
-
]
|
445
570
|
}
|
446
571
|
);
|
447
572
|
}
|
@@ -553,13 +678,15 @@ public partial class DiscoveryWorkerTests : DiscoveryWorkerTestBase
|
|
553
678
|
],
|
554
679
|
Properties = [
|
555
680
|
new("TargetFrameworks", "net7.0;net8.0", "src/project.csproj")
|
556
|
-
]
|
681
|
+
],
|
682
|
+
ReferencedProjectPaths = [],
|
683
|
+
ImportedFiles = [
|
684
|
+
"../Directory.Build.props",
|
685
|
+
"../Directory.Packages.props",
|
686
|
+
],
|
687
|
+
AdditionalFiles = [],
|
557
688
|
}
|
558
689
|
],
|
559
|
-
ImportedFiles = [
|
560
|
-
"Directory.Build.props",
|
561
|
-
"Directory.Packages.props",
|
562
|
-
],
|
563
690
|
GlobalJson = new()
|
564
691
|
{
|
565
692
|
FilePath = "global.json",
|
@@ -656,13 +783,15 @@ public partial class DiscoveryWorkerTests : DiscoveryWorkerTestBase
|
|
656
783
|
new("ManagePackageVersionsCentrally", "true", "Directory.Packages.props"),
|
657
784
|
new("SomePackageVersion", "9.0.1", "Directory.Packages.props"),
|
658
785
|
new("TargetFrameworks", "net7.0;net8.0", "src/project.csproj"),
|
659
|
-
]
|
786
|
+
],
|
787
|
+
ReferencedProjectPaths = [],
|
788
|
+
ImportedFiles = [
|
789
|
+
"../Directory.Build.props",
|
790
|
+
"../Directory.Packages.props",
|
791
|
+
],
|
792
|
+
AdditionalFiles = [],
|
660
793
|
}
|
661
794
|
],
|
662
|
-
ImportedFiles = [
|
663
|
-
"Directory.Build.props",
|
664
|
-
"Directory.Packages.props"
|
665
|
-
]
|
666
795
|
}
|
667
796
|
);
|
668
797
|
}
|
@@ -717,23 +846,25 @@ public partial class DiscoveryWorkerTests : DiscoveryWorkerTestBase
|
|
717
846
|
Path = "",
|
718
847
|
Projects = [
|
719
848
|
new()
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
849
|
+
{
|
850
|
+
FilePath = "src/project.csproj",
|
851
|
+
TargetFrameworks = ["net7.0", "net8.0"],
|
852
|
+
Dependencies = [
|
853
|
+
new("Some.Package", "9.0.1", DependencyType.PackageReference, TargetFrameworks: ["net7.0", "net8.0"], IsDirect: true)
|
854
|
+
],
|
855
|
+
Properties = [
|
856
|
+
new("ManagePackageVersionsCentrally", "true", "Directory.Packages.props"),
|
857
|
+
new("SomePackageVersion", "9.0.1", "Directory.Packages.props"),
|
858
|
+
new("TargetFrameworks", "net7.0;net8.0", "src/project.csproj"),
|
859
|
+
],
|
860
|
+
ReferencedProjectPaths = [],
|
861
|
+
ImportedFiles = [
|
862
|
+
"../Directory.Build.props",
|
863
|
+
"../Directory.Packages.props",
|
864
|
+
],
|
865
|
+
AdditionalFiles = [],
|
866
|
+
}
|
732
867
|
],
|
733
|
-
ImportedFiles = [
|
734
|
-
"Directory.Build.props",
|
735
|
-
"Directory.Packages.props"
|
736
|
-
]
|
737
868
|
}
|
738
869
|
);
|
739
870
|
}
|
@@ -846,13 +977,15 @@ public partial class DiscoveryWorkerTests : DiscoveryWorkerTestBase
|
|
846
977
|
new("ManagePackageVersionsCentrally", "true", "Directory.Packages.props"),
|
847
978
|
new("SomePackageVersion", "9.0.1", "Directory.Packages.props"),
|
848
979
|
new("TargetFrameworks", "net7.0;net8.0", "src/project.csproj")
|
849
|
-
]
|
980
|
+
],
|
981
|
+
ReferencedProjectPaths = [],
|
982
|
+
ImportedFiles = [
|
983
|
+
"../Directory.Build.props",
|
984
|
+
"../Directory.Packages.props",
|
985
|
+
],
|
986
|
+
AdditionalFiles = [],
|
850
987
|
}
|
851
988
|
],
|
852
|
-
ImportedFiles = [
|
853
|
-
"Directory.Build.props",
|
854
|
-
"Directory.Packages.props",
|
855
|
-
],
|
856
989
|
GlobalJson = new()
|
857
990
|
{
|
858
991
|
FilePath = "global.json",
|
@@ -951,7 +1084,10 @@ public partial class DiscoveryWorkerTests : DiscoveryWorkerTestBase
|
|
951
1084
|
],
|
952
1085
|
Properties = [
|
953
1086
|
new("TargetFramework", "net8.0", @"src/supported.csproj"),
|
954
|
-
]
|
1087
|
+
],
|
1088
|
+
ReferencedProjectPaths = [],
|
1089
|
+
ImportedFiles = [],
|
1090
|
+
AdditionalFiles = [],
|
955
1091
|
}
|
956
1092
|
]
|
957
1093
|
}
|