dependabot-nuget 0.242.0 → 0.243.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/.editorconfig +37 -28
- data/helpers/lib/NuGetUpdater/.gitignore +1 -0
- data/helpers/lib/NuGetUpdater/NuGetProjects/NuGet.CommandLine/AssemblyMetadataExtractor.cs +2 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli/Program.cs +2 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli.Test/EntryPointTests.Update.cs +178 -176
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Files/JsonBuildFile.cs +2 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Files/PackagesConfigBuildFile.cs +1 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Files/ProjectBuildFile.cs +5 -4
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/FrameworkChecker/CompatabilityChecker.cs +1 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/FrameworkChecker/FrameworkCompatibilityService.cs +10 -5
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/FrameworkChecker/SupportedFrameworks.cs +16 -12
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/BindingRedirectManager.cs +18 -17
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/BindingRedirectResolver.cs +7 -7
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/DotNetToolsJsonUpdater.cs +13 -20
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/GlobalJsonUpdater.cs +9 -3
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/PackagesConfigUpdater.cs +32 -16
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/SdkPackageUpdater.cs +42 -22
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/UpdaterWorker.cs +32 -13
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/WebApplicationTargetsConditionPatcher.cs +47 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/XmlFilePreAndPostProcessor.cs +55 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/JsonHelper.cs +12 -9
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/MSBuildHelper.cs +50 -42
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/PathHelper.cs +16 -3
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/ProcessExtensions.cs +6 -6
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/XmlExtensions.cs +11 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Files/ProjectBuildFileTests.cs +18 -9
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/FrameworkChecker/CompatibilityCheckerFacts.cs +2 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/FrameworkChecker/FrameworkCompatibilityServiceFacts.cs +7 -7
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/FrameworkChecker/SupportedFrameworkFacts.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/PackagesConfigUpdaterTests.cs +9 -9
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorker.DirsProj.cs +81 -80
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTestBase.cs +22 -9
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.DotNetTools.cs +140 -104
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.GlobalJson.cs +25 -25
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.Mixed.cs +8 -9
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.PackagesConfig.cs +198 -22
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.Sdk.cs +401 -399
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/JsonHelperTests.cs +17 -15
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MSBuildHelperTests.cs +111 -42
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/SdkPackageUpdaterTests.cs +161 -82
- data/lib/dependabot/nuget/file_fetcher.rb +3 -23
- data/lib/dependabot/nuget/file_parser/project_file_parser.rb +47 -60
- data/lib/dependabot/nuget/file_parser.rb +24 -6
- data/lib/dependabot/nuget/file_updater.rb +42 -6
- data/lib/dependabot/nuget/native_helpers.rb +27 -8
- data/lib/dependabot/nuget/nuget_client.rb +130 -24
- data/lib/dependabot/nuget/nuget_config_credential_helpers.rb +7 -3
- data/lib/dependabot/nuget/update_checker/compatibility_checker.rb +63 -59
- data/lib/dependabot/nuget/update_checker/dependency_finder.rb +2 -2
- data/lib/dependabot/nuget/update_checker/nupkg_fetcher.rb +1 -1
- data/lib/dependabot/nuget/update_checker/nuspec_fetcher.rb +22 -17
- data/lib/dependabot/nuget/update_checker/repository_finder.rb +292 -270
- data/lib/dependabot/nuget/update_checker/tfm_comparer.rb +11 -13
- data/lib/dependabot/nuget/update_checker/tfm_finder.rb +80 -82
- data/lib/dependabot/nuget/update_checker/version_finder.rb +4 -7
- data/lib/dependabot/nuget/version.rb +18 -7
- data/lib/dependabot/nuget.rb +0 -2
- metadata +7 -5
@@ -30,7 +30,7 @@ public partial class UpdateWorkerTests
|
|
30
30
|
<PropertyGroup>
|
31
31
|
<TargetFramework>{tfm}</TargetFramework>
|
32
32
|
</PropertyGroup>
|
33
|
-
|
33
|
+
|
34
34
|
<ItemGroup>
|
35
35
|
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
|
36
36
|
</ItemGroup>
|
@@ -42,7 +42,7 @@ public partial class UpdateWorkerTests
|
|
42
42
|
<PropertyGroup>
|
43
43
|
<TargetFramework>{tfm}</TargetFramework>
|
44
44
|
</PropertyGroup>
|
45
|
-
|
45
|
+
|
46
46
|
<ItemGroup>
|
47
47
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
48
48
|
</ItemGroup>
|
@@ -76,12 +76,12 @@ public partial class UpdateWorkerTests
|
|
76
76
|
public async Task UpdateFindsNearestNugetConfig_AndSucceeds()
|
77
77
|
{
|
78
78
|
// Clean the cache to ensure we don't find a cached version of packages.
|
79
|
-
await ProcessEx.RunAsync("dotnet",
|
79
|
+
await ProcessEx.RunAsync("dotnet", "nuget locals -c all");
|
80
80
|
// If the Top-Level NugetConfig was found we would have failed.
|
81
|
-
var privateNugetContent =
|
81
|
+
var privateNugetContent = """
|
82
82
|
<?xml version="1.0" encoding="utf-8"?>
|
83
83
|
<configuration>
|
84
|
-
|
84
|
+
|
85
85
|
<packageSources>
|
86
86
|
<clear />
|
87
87
|
<add key="nuget_PrivateFeed" value="https://api.nuget.org/v3/index.json" />
|
@@ -90,16 +90,16 @@ public partial class UpdateWorkerTests
|
|
90
90
|
""";
|
91
91
|
await TestUpdateForProject("Newtonsoft.Json", "9.0.1", "13.0.1",
|
92
92
|
projectFile: (Path: "Directory/Project.csproj", Content: """
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
93
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
94
|
+
<PropertyGroup>
|
95
|
+
<TargetFramework>netstandard2.0</TargetFramework>
|
96
|
+
</PropertyGroup>
|
97
|
+
<ItemGroup>
|
98
|
+
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
|
99
|
+
</ItemGroup>
|
100
|
+
</Project>
|
101
|
+
"""),
|
102
|
+
"""
|
103
103
|
<Project Sdk="Microsoft.NET.Sdk">
|
104
104
|
<PropertyGroup>
|
105
105
|
<TargetFramework>netstandard2.0</TargetFramework>
|
@@ -109,7 +109,8 @@ public partial class UpdateWorkerTests
|
|
109
109
|
</ItemGroup>
|
110
110
|
</Project>
|
111
111
|
""",
|
112
|
-
|
112
|
+
additionalFiles:
|
113
|
+
[
|
113
114
|
(Path: "NuGet.config", Content: $"""
|
114
115
|
<?xml version="1.0" encoding="utf-8"?>
|
115
116
|
<configuration>
|
@@ -120,7 +121,7 @@ public partial class UpdateWorkerTests
|
|
120
121
|
</configuration>
|
121
122
|
"""),
|
122
123
|
(Path: "Directory/NuGet.config", Content: privateNugetContent)
|
123
|
-
|
124
|
+
]);
|
124
125
|
}
|
125
126
|
|
126
127
|
[Fact]
|
@@ -139,8 +140,9 @@ public partial class UpdateWorkerTests
|
|
139
140
|
</ItemGroup>
|
140
141
|
</Project>
|
141
142
|
""",
|
142
|
-
|
143
|
-
|
143
|
+
additionalFiles:
|
144
|
+
[
|
145
|
+
(Path: "NuGet.config", Content: """
|
144
146
|
<?xml version="1.0" encoding="utf-8"?>
|
145
147
|
<configuration>
|
146
148
|
<config>
|
@@ -151,8 +153,8 @@ public partial class UpdateWorkerTests
|
|
151
153
|
<add key="nuget_BrokenFeed" value="https://api.nuget.org/BrokenFeed" />
|
152
154
|
</packageSources>
|
153
155
|
</configuration>
|
154
|
-
""")
|
155
|
-
|
156
|
+
""")
|
157
|
+
]);
|
156
158
|
}
|
157
159
|
|
158
160
|
[Fact]
|
@@ -161,24 +163,24 @@ public partial class UpdateWorkerTests
|
|
161
163
|
// update Newtonsoft.Json from 9.0.1 to 13.0.1
|
162
164
|
await TestUpdateForProject("Newtonsoft.Json", "9.0.1", "13.0.1",
|
163
165
|
// initial
|
164
|
-
projectContents:
|
166
|
+
projectContents: """
|
165
167
|
<Project Sdk="Microsoft.NET.Sdk">
|
166
168
|
<PropertyGroup>
|
167
169
|
<TargetFramework>net6.0</TargetFramework>
|
168
170
|
</PropertyGroup>
|
169
|
-
|
171
|
+
|
170
172
|
<ItemGroup>
|
171
173
|
<PackageReference Include="Newtonsoft.Json" Version="[9.0.1]" />
|
172
174
|
</ItemGroup>
|
173
175
|
</Project>
|
174
176
|
""",
|
175
177
|
// expected
|
176
|
-
expectedProjectContents:
|
178
|
+
expectedProjectContents: """
|
177
179
|
<Project Sdk="Microsoft.NET.Sdk">
|
178
180
|
<PropertyGroup>
|
179
181
|
<TargetFramework>net6.0</TargetFramework>
|
180
182
|
</PropertyGroup>
|
181
|
-
|
183
|
+
|
182
184
|
<ItemGroup>
|
183
185
|
<PackageReference Include="Newtonsoft.Json" Version="[13.0.1]" />
|
184
186
|
</ItemGroup>
|
@@ -194,11 +196,11 @@ public partial class UpdateWorkerTests
|
|
194
196
|
// initial
|
195
197
|
projectContents: """
|
196
198
|
<Project Sdk="Microsoft.NET.Sdk">
|
197
|
-
|
199
|
+
|
198
200
|
<PropertyGroup>
|
199
201
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
200
202
|
</PropertyGroup>
|
201
|
-
|
203
|
+
|
202
204
|
<ItemGroup>
|
203
205
|
<PackageReference Include="Mongo2Go" Version="3.1.3" />
|
204
206
|
</ItemGroup>
|
@@ -208,11 +210,11 @@ public partial class UpdateWorkerTests
|
|
208
210
|
// expected
|
209
211
|
expectedProjectContents: """
|
210
212
|
<Project Sdk="Microsoft.NET.Sdk">
|
211
|
-
|
213
|
+
|
212
214
|
<PropertyGroup>
|
213
215
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
214
216
|
</PropertyGroup>
|
215
|
-
|
217
|
+
|
216
218
|
<ItemGroup>
|
217
219
|
<PackageReference Include="Mongo2Go" Version="3.1.3" />
|
218
220
|
<PackageReference Include="System.Text.Json" Version="5.0.2" />
|
@@ -233,7 +235,7 @@ public partial class UpdateWorkerTests
|
|
233
235
|
<PropertyGroup>
|
234
236
|
<TargetFramework>netstandard2.0</TargetFramework>
|
235
237
|
</PropertyGroup>
|
236
|
-
|
238
|
+
|
237
239
|
<ItemGroup>
|
238
240
|
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.0">
|
239
241
|
<PrivateAssets>all</PrivateAssets>
|
@@ -248,7 +250,7 @@ public partial class UpdateWorkerTests
|
|
248
250
|
<PropertyGroup>
|
249
251
|
<TargetFramework>netstandard2.0</TargetFramework>
|
250
252
|
</PropertyGroup>
|
251
|
-
|
253
|
+
|
252
254
|
<ItemGroup>
|
253
255
|
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
|
254
256
|
<PrivateAssets>all</PrivateAssets>
|
@@ -270,7 +272,7 @@ public partial class UpdateWorkerTests
|
|
270
272
|
<PropertyGroup>
|
271
273
|
<TargetFramework>netstandard2.0</TargetFramework>
|
272
274
|
</PropertyGroup>
|
273
|
-
|
275
|
+
|
274
276
|
<ItemGroup>
|
275
277
|
<PackageReference Include="Newtonsoft.JSON" Version="9.0.1" />
|
276
278
|
<PackageReference Update="Newtonsoft.Json" Version="9.0.1" />
|
@@ -283,7 +285,7 @@ public partial class UpdateWorkerTests
|
|
283
285
|
<PropertyGroup>
|
284
286
|
<TargetFramework>netstandard2.0</TargetFramework>
|
285
287
|
</PropertyGroup>
|
286
|
-
|
288
|
+
|
287
289
|
<ItemGroup>
|
288
290
|
<PackageReference Include="Newtonsoft.JSON" Version="13.0.1" />
|
289
291
|
<PackageReference Update="Newtonsoft.Json" Version="13.0.1" />
|
@@ -303,7 +305,7 @@ public partial class UpdateWorkerTests
|
|
303
305
|
<PropertyGroup>
|
304
306
|
<TargetFramework>netstandard2.0</TargetFramework>
|
305
307
|
</PropertyGroup>
|
306
|
-
|
308
|
+
|
307
309
|
<ItemGroup>
|
308
310
|
<PackageReference Include="Newtonsoft.Json" />
|
309
311
|
<PackageReference Update="Newtonsoft.Json" Version="9.0.1" />
|
@@ -316,7 +318,7 @@ public partial class UpdateWorkerTests
|
|
316
318
|
<PropertyGroup>
|
317
319
|
<TargetFramework>netstandard2.0</TargetFramework>
|
318
320
|
</PropertyGroup>
|
319
|
-
|
321
|
+
|
320
322
|
<ItemGroup>
|
321
323
|
<PackageReference Include="Newtonsoft.Json" />
|
322
324
|
<PackageReference Update="Newtonsoft.Json" Version="13.0.1" />
|
@@ -336,52 +338,52 @@ public partial class UpdateWorkerTests
|
|
336
338
|
<PropertyGroup>
|
337
339
|
<TargetFramework>netstandard2.0</TargetFramework>
|
338
340
|
</PropertyGroup>
|
339
|
-
|
341
|
+
|
340
342
|
<ItemGroup>
|
341
343
|
<PackageReference Include="Newtonsoft.Json" />
|
342
344
|
</ItemGroup>
|
343
345
|
</Project>
|
344
346
|
""",
|
345
|
-
additionalFiles:
|
346
|
-
|
347
|
+
additionalFiles:
|
348
|
+
[
|
347
349
|
("Directory.Packages.props", """
|
348
350
|
<Project>
|
349
351
|
<PropertyGroup>
|
350
352
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
351
353
|
</PropertyGroup>
|
352
|
-
|
354
|
+
|
353
355
|
<ItemGroup>
|
354
356
|
<PackageVersion Include="Newtonsoft.Json" Version="9.0.1" />
|
355
357
|
</ItemGroup>
|
356
358
|
</Project>
|
357
359
|
""")
|
358
|
-
|
360
|
+
],
|
359
361
|
// expected
|
360
362
|
expectedProjectContents: """
|
361
363
|
<Project Sdk="Microsoft.NET.Sdk">
|
362
364
|
<PropertyGroup>
|
363
365
|
<TargetFramework>netstandard2.0</TargetFramework>
|
364
366
|
</PropertyGroup>
|
365
|
-
|
367
|
+
|
366
368
|
<ItemGroup>
|
367
369
|
<PackageReference Include="Newtonsoft.Json" />
|
368
370
|
</ItemGroup>
|
369
371
|
</Project>
|
370
372
|
""",
|
371
|
-
additionalFilesExpected:
|
372
|
-
|
373
|
+
additionalFilesExpected:
|
374
|
+
[
|
373
375
|
("Directory.Packages.props", """
|
374
376
|
<Project>
|
375
377
|
<PropertyGroup>
|
376
378
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
377
379
|
</PropertyGroup>
|
378
|
-
|
380
|
+
|
379
381
|
<ItemGroup>
|
380
382
|
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
|
381
383
|
</ItemGroup>
|
382
384
|
</Project>
|
383
385
|
""")
|
384
|
-
|
386
|
+
]);
|
385
387
|
}
|
386
388
|
|
387
389
|
[Fact]
|
@@ -395,52 +397,52 @@ public partial class UpdateWorkerTests
|
|
395
397
|
<PropertyGroup>
|
396
398
|
<TargetFramework>netstandard2.0</TargetFramework>
|
397
399
|
</PropertyGroup>
|
398
|
-
|
400
|
+
|
399
401
|
<ItemGroup>
|
400
402
|
<PackageReference Include="Newtonsoft.Json" />
|
401
403
|
</ItemGroup>
|
402
404
|
</Project>
|
403
405
|
""",
|
404
|
-
additionalFiles:
|
405
|
-
|
406
|
+
additionalFiles:
|
407
|
+
[
|
406
408
|
("Directory.Packages.props", """
|
407
409
|
<Project>
|
408
410
|
<PropertyGroup>
|
409
411
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
410
412
|
</PropertyGroup>
|
411
|
-
|
413
|
+
|
412
414
|
<ItemGroup>
|
413
415
|
<PackageVersion Include="Newtonsoft.Json" Version="[9.0.1]" />
|
414
416
|
</ItemGroup>
|
415
417
|
</Project>
|
416
418
|
""")
|
417
|
-
|
419
|
+
],
|
418
420
|
// expected
|
419
421
|
expectedProjectContents: """
|
420
422
|
<Project Sdk="Microsoft.NET.Sdk">
|
421
423
|
<PropertyGroup>
|
422
424
|
<TargetFramework>netstandard2.0</TargetFramework>
|
423
425
|
</PropertyGroup>
|
424
|
-
|
426
|
+
|
425
427
|
<ItemGroup>
|
426
428
|
<PackageReference Include="Newtonsoft.Json" />
|
427
429
|
</ItemGroup>
|
428
430
|
</Project>
|
429
431
|
""",
|
430
|
-
additionalFilesExpected:
|
431
|
-
|
432
|
+
additionalFilesExpected:
|
433
|
+
[
|
432
434
|
("Directory.Packages.props", """
|
433
435
|
<Project>
|
434
436
|
<PropertyGroup>
|
435
437
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
436
438
|
</PropertyGroup>
|
437
|
-
|
439
|
+
|
438
440
|
<ItemGroup>
|
439
441
|
<PackageVersion Include="Newtonsoft.Json" Version="[13.0.1]" />
|
440
442
|
</ItemGroup>
|
441
443
|
</Project>
|
442
444
|
""")
|
443
|
-
|
445
|
+
]);
|
444
446
|
}
|
445
447
|
|
446
448
|
[Fact]
|
@@ -454,7 +456,7 @@ public partial class UpdateWorkerTests
|
|
454
456
|
<TargetFramework>netstandard2.0</TargetFramework>
|
455
457
|
<NewtonsoftJsonPackageVersion>9.0.1</NewtonsoftJsonPackageVersion>
|
456
458
|
</PropertyGroup>
|
457
|
-
|
459
|
+
|
458
460
|
<ItemGroup>
|
459
461
|
<PackageReference Include="Newtonsoft.Json" Version="[$(NewtonsoftJsonPackageVersion)]" />
|
460
462
|
</ItemGroup>
|
@@ -467,7 +469,7 @@ public partial class UpdateWorkerTests
|
|
467
469
|
<TargetFramework>netstandard2.0</TargetFramework>
|
468
470
|
<NewtonsoftJsonPackageVersion>13.0.1</NewtonsoftJsonPackageVersion>
|
469
471
|
</PropertyGroup>
|
470
|
-
|
472
|
+
|
471
473
|
<ItemGroup>
|
472
474
|
<PackageReference Include="Newtonsoft.Json" Version="[$(NewtonsoftJsonPackageVersion)]" />
|
473
475
|
</ItemGroup>
|
@@ -486,7 +488,7 @@ public partial class UpdateWorkerTests
|
|
486
488
|
<TargetFramework>netstandard2.0</TargetFramework>
|
487
489
|
<NewtonsoftJsonPackageVersion>9.0.1</NewtonsoftJsonPackageVersion>
|
488
490
|
</PropertyGroup>
|
489
|
-
|
491
|
+
|
490
492
|
<ItemGroup>
|
491
493
|
<PackageReference Include="Newtonsoft.Json" Version="$(newtonsoftjsonpackageversion)" />
|
492
494
|
</ItemGroup>
|
@@ -499,7 +501,7 @@ public partial class UpdateWorkerTests
|
|
499
501
|
<TargetFramework>netstandard2.0</TargetFramework>
|
500
502
|
<NewtonsoftJsonPackageVersion>13.0.1</NewtonsoftJsonPackageVersion>
|
501
503
|
</PropertyGroup>
|
502
|
-
|
504
|
+
|
503
505
|
<ItemGroup>
|
504
506
|
<PackageReference Include="Newtonsoft.Json" Version="$(newtonsoftjsonpackageversion)" />
|
505
507
|
</ItemGroup>
|
@@ -518,7 +520,7 @@ public partial class UpdateWorkerTests
|
|
518
520
|
<TargetFramework>netstandard2.0</TargetFramework>
|
519
521
|
<NewtonsoftJsonPackageVersion>9.0.1</NewtonsoftJsonPackageVersion>
|
520
522
|
</PropertyGroup>
|
521
|
-
|
523
|
+
|
522
524
|
<ItemGroup>
|
523
525
|
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
524
526
|
</ItemGroup>
|
@@ -531,7 +533,7 @@ public partial class UpdateWorkerTests
|
|
531
533
|
<TargetFramework>netstandard2.0</TargetFramework>
|
532
534
|
<NewtonsoftJsonPackageVersion>13.0.1</NewtonsoftJsonPackageVersion>
|
533
535
|
</PropertyGroup>
|
534
|
-
|
536
|
+
|
535
537
|
<ItemGroup>
|
536
538
|
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
537
539
|
</ItemGroup>
|
@@ -550,7 +552,7 @@ public partial class UpdateWorkerTests
|
|
550
552
|
<TargetFramework>netstandard2.0</TargetFramework>
|
551
553
|
<NewtonsoftJsonPackageVersion>[9.0.1]</NewtonsoftJsonPackageVersion>
|
552
554
|
</PropertyGroup>
|
553
|
-
|
555
|
+
|
554
556
|
<ItemGroup>
|
555
557
|
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
556
558
|
</ItemGroup>
|
@@ -563,7 +565,7 @@ public partial class UpdateWorkerTests
|
|
563
565
|
<TargetFramework>netstandard2.0</TargetFramework>
|
564
566
|
<NewtonsoftJsonPackageVersion>[13.0.1]</NewtonsoftJsonPackageVersion>
|
565
567
|
</PropertyGroup>
|
566
|
-
|
568
|
+
|
567
569
|
<ItemGroup>
|
568
570
|
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
569
571
|
</ItemGroup>
|
@@ -582,7 +584,7 @@ public partial class UpdateWorkerTests
|
|
582
584
|
<TargetFramework>netstandard2.0</TargetFramework>
|
583
585
|
<NewtonsoftJsonPackageVersion>9.0.1</NewtonsoftJsonPackageVersion>
|
584
586
|
</PropertyGroup>
|
585
|
-
|
587
|
+
|
586
588
|
<ItemGroup>
|
587
589
|
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
|
588
590
|
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
@@ -596,7 +598,7 @@ public partial class UpdateWorkerTests
|
|
596
598
|
<TargetFramework>netstandard2.0</TargetFramework>
|
597
599
|
<NewtonsoftJsonPackageVersion>13.0.1</NewtonsoftJsonPackageVersion>
|
598
600
|
</PropertyGroup>
|
599
|
-
|
601
|
+
|
600
602
|
<ItemGroup>
|
601
603
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
602
604
|
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
@@ -616,7 +618,7 @@ public partial class UpdateWorkerTests
|
|
616
618
|
<TargetFramework>netstandard2.0</TargetFramework>
|
617
619
|
<NewtonsoftJsonPackageVersion>9.0.1</NewtonsoftJsonPackageVersion>
|
618
620
|
</PropertyGroup>
|
619
|
-
|
621
|
+
|
620
622
|
<ItemGroup>
|
621
623
|
<PackageReference Include="Newtonsoft.Json" />
|
622
624
|
<PackageReference Update="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
@@ -630,7 +632,7 @@ public partial class UpdateWorkerTests
|
|
630
632
|
<TargetFramework>netstandard2.0</TargetFramework>
|
631
633
|
<NewtonsoftJsonPackageVersion>13.0.1</NewtonsoftJsonPackageVersion>
|
632
634
|
</PropertyGroup>
|
633
|
-
|
635
|
+
|
634
636
|
<ItemGroup>
|
635
637
|
<PackageReference Include="Newtonsoft.Json" />
|
636
638
|
<PackageReference Update="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
@@ -650,54 +652,54 @@ public partial class UpdateWorkerTests
|
|
650
652
|
<PropertyGroup>
|
651
653
|
<TargetFramework>netstandard2.0</TargetFramework>
|
652
654
|
</PropertyGroup>
|
653
|
-
|
655
|
+
|
654
656
|
<ItemGroup>
|
655
657
|
<PackageReference Include="Newtonsoft.Json" />
|
656
658
|
</ItemGroup>
|
657
659
|
</Project>
|
658
660
|
""",
|
659
|
-
additionalFiles:
|
660
|
-
|
661
|
+
additionalFiles:
|
662
|
+
[
|
661
663
|
("Directory.Packages.props", """
|
662
664
|
<Project>
|
663
665
|
<PropertyGroup>
|
664
666
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
665
667
|
<NewtonsoftJsonPackageVersion>9.0.1</NewtonsoftJsonPackageVersion>
|
666
668
|
</PropertyGroup>
|
667
|
-
|
669
|
+
|
668
670
|
<ItemGroup>
|
669
671
|
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
670
672
|
</ItemGroup>
|
671
673
|
</Project>
|
672
674
|
""")
|
673
|
-
|
675
|
+
],
|
674
676
|
// expected
|
675
677
|
expectedProjectContents: """
|
676
678
|
<Project Sdk="Microsoft.NET.Sdk">
|
677
679
|
<PropertyGroup>
|
678
680
|
<TargetFramework>netstandard2.0</TargetFramework>
|
679
681
|
</PropertyGroup>
|
680
|
-
|
682
|
+
|
681
683
|
<ItemGroup>
|
682
684
|
<PackageReference Include="Newtonsoft.Json" />
|
683
685
|
</ItemGroup>
|
684
686
|
</Project>
|
685
687
|
""",
|
686
|
-
additionalFilesExpected:
|
687
|
-
|
688
|
+
additionalFilesExpected:
|
689
|
+
[
|
688
690
|
("Directory.Packages.props", """
|
689
691
|
<Project>
|
690
692
|
<PropertyGroup>
|
691
693
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
692
694
|
<NewtonsoftJsonPackageVersion>13.0.1</NewtonsoftJsonPackageVersion>
|
693
695
|
</PropertyGroup>
|
694
|
-
|
696
|
+
|
695
697
|
<ItemGroup>
|
696
698
|
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
697
699
|
</ItemGroup>
|
698
700
|
</Project>
|
699
701
|
""")
|
700
|
-
|
702
|
+
]);
|
701
703
|
}
|
702
704
|
|
703
705
|
[Fact]
|
@@ -711,54 +713,54 @@ public partial class UpdateWorkerTests
|
|
711
713
|
<PropertyGroup>
|
712
714
|
<TargetFramework>netstandard2.0</TargetFramework>
|
713
715
|
</PropertyGroup>
|
714
|
-
|
716
|
+
|
715
717
|
<ItemGroup>
|
716
718
|
<PackageReference Include="Newtonsoft.Json" />
|
717
719
|
</ItemGroup>
|
718
720
|
</Project>
|
719
721
|
""",
|
720
|
-
additionalFiles:
|
721
|
-
|
722
|
+
additionalFiles:
|
723
|
+
[
|
722
724
|
("Directory.Packages.props", """
|
723
725
|
<Project>
|
724
726
|
<PropertyGroup>
|
725
727
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
726
728
|
<NewtonsoftJsonPackageVersion>[9.0.1]</NewtonsoftJsonPackageVersion>
|
727
729
|
</PropertyGroup>
|
728
|
-
|
730
|
+
|
729
731
|
<ItemGroup>
|
730
732
|
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
731
733
|
</ItemGroup>
|
732
734
|
</Project>
|
733
735
|
""")
|
734
|
-
|
736
|
+
],
|
735
737
|
// expected
|
736
738
|
expectedProjectContents: """
|
737
739
|
<Project Sdk="Microsoft.NET.Sdk">
|
738
740
|
<PropertyGroup>
|
739
741
|
<TargetFramework>netstandard2.0</TargetFramework>
|
740
742
|
</PropertyGroup>
|
741
|
-
|
743
|
+
|
742
744
|
<ItemGroup>
|
743
745
|
<PackageReference Include="Newtonsoft.Json" />
|
744
746
|
</ItemGroup>
|
745
747
|
</Project>
|
746
748
|
""",
|
747
|
-
additionalFilesExpected:
|
748
|
-
|
749
|
+
additionalFilesExpected:
|
750
|
+
[
|
749
751
|
("Directory.Packages.props", """
|
750
752
|
<Project>
|
751
753
|
<PropertyGroup>
|
752
754
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
753
755
|
<NewtonsoftJsonPackageVersion>[13.0.1]</NewtonsoftJsonPackageVersion>
|
754
756
|
</PropertyGroup>
|
755
|
-
|
757
|
+
|
756
758
|
<ItemGroup>
|
757
759
|
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
758
760
|
</ItemGroup>
|
759
761
|
</Project>
|
760
762
|
""")
|
761
|
-
|
763
|
+
]);
|
762
764
|
}
|
763
765
|
|
764
766
|
[Fact]
|
@@ -772,54 +774,54 @@ public partial class UpdateWorkerTests
|
|
772
774
|
<PropertyGroup>
|
773
775
|
<TargetFramework>netstandard2.0</TargetFramework>
|
774
776
|
</PropertyGroup>
|
775
|
-
|
777
|
+
|
776
778
|
<ItemGroup>
|
777
779
|
<PackageReference Include="Newtonsoft.Json" VersionOverride="9.0.1" />
|
778
780
|
</ItemGroup>
|
779
781
|
</Project>
|
780
782
|
""",
|
781
|
-
additionalFiles:
|
782
|
-
|
783
|
+
additionalFiles:
|
784
|
+
[
|
783
785
|
("Directory.Packages.props", """
|
784
786
|
<Project>
|
785
787
|
<PropertyGroup>
|
786
788
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
787
789
|
<NewtonsoftJsonPackageVersion>9.0.1</NewtonsoftJsonPackageVersion>
|
788
790
|
</PropertyGroup>
|
789
|
-
|
791
|
+
|
790
792
|
<ItemGroup>
|
791
793
|
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
792
794
|
</ItemGroup>
|
793
795
|
</Project>
|
794
796
|
""")
|
795
|
-
|
797
|
+
],
|
796
798
|
// expected
|
797
799
|
expectedProjectContents: """
|
798
800
|
<Project Sdk="Microsoft.NET.Sdk">
|
799
801
|
<PropertyGroup>
|
800
802
|
<TargetFramework>netstandard2.0</TargetFramework>
|
801
803
|
</PropertyGroup>
|
802
|
-
|
804
|
+
|
803
805
|
<ItemGroup>
|
804
806
|
<PackageReference Include="Newtonsoft.Json" VersionOverride="13.0.1" />
|
805
807
|
</ItemGroup>
|
806
808
|
</Project>
|
807
809
|
""",
|
808
|
-
additionalFilesExpected:
|
809
|
-
|
810
|
+
additionalFilesExpected:
|
811
|
+
[
|
810
812
|
("Directory.Packages.props", """
|
811
813
|
<Project>
|
812
814
|
<PropertyGroup>
|
813
815
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
814
816
|
<NewtonsoftJsonPackageVersion>13.0.1</NewtonsoftJsonPackageVersion>
|
815
817
|
</PropertyGroup>
|
816
|
-
|
818
|
+
|
817
819
|
<ItemGroup>
|
818
820
|
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
819
821
|
</ItemGroup>
|
820
822
|
</Project>
|
821
823
|
""")
|
822
|
-
|
824
|
+
]);
|
823
825
|
}
|
824
826
|
|
825
827
|
[Fact]
|
@@ -835,20 +837,20 @@ public partial class UpdateWorkerTests
|
|
835
837
|
</PropertyGroup>
|
836
838
|
</Project>
|
837
839
|
""",
|
838
|
-
additionalFiles:
|
839
|
-
|
840
|
+
additionalFiles:
|
841
|
+
[
|
840
842
|
("Directory.Packages.props", """
|
841
843
|
<Project>
|
842
844
|
<PropertyGroup>
|
843
845
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
844
846
|
</PropertyGroup>
|
845
|
-
|
847
|
+
|
846
848
|
<ItemGroup>
|
847
849
|
<GlobalPackageReference Include="Newtonsoft.Json" Version="9.0.1" />
|
848
850
|
</ItemGroup>
|
849
851
|
</Project>
|
850
852
|
""")
|
851
|
-
|
853
|
+
],
|
852
854
|
// expected
|
853
855
|
expectedProjectContents: """
|
854
856
|
<Project Sdk="Microsoft.NET.Sdk">
|
@@ -857,20 +859,20 @@ public partial class UpdateWorkerTests
|
|
857
859
|
</PropertyGroup>
|
858
860
|
</Project>
|
859
861
|
""",
|
860
|
-
additionalFilesExpected:
|
861
|
-
|
862
|
+
additionalFilesExpected:
|
863
|
+
[
|
862
864
|
("Directory.Packages.props", """
|
863
865
|
<Project>
|
864
866
|
<PropertyGroup>
|
865
867
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
866
868
|
</PropertyGroup>
|
867
|
-
|
869
|
+
|
868
870
|
<ItemGroup>
|
869
871
|
<GlobalPackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
870
872
|
</ItemGroup>
|
871
873
|
</Project>
|
872
874
|
""")
|
873
|
-
|
875
|
+
]);
|
874
876
|
}
|
875
877
|
|
876
878
|
[Fact]
|
@@ -886,21 +888,21 @@ public partial class UpdateWorkerTests
|
|
886
888
|
</PropertyGroup>
|
887
889
|
</Project>
|
888
890
|
""",
|
889
|
-
additionalFiles:
|
890
|
-
|
891
|
+
additionalFiles:
|
892
|
+
[
|
891
893
|
("Directory.Packages.props", """
|
892
894
|
<Project>
|
893
895
|
<PropertyGroup>
|
894
896
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
895
897
|
<NewtonsoftJsonPackageVersion>9.0.1</NewtonsoftJsonPackageVersion>
|
896
898
|
</PropertyGroup>
|
897
|
-
|
899
|
+
|
898
900
|
<ItemGroup>
|
899
901
|
<GlobalPackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
900
902
|
</ItemGroup>
|
901
903
|
</Project>
|
902
904
|
""")
|
903
|
-
|
905
|
+
],
|
904
906
|
// expected
|
905
907
|
expectedProjectContents: """
|
906
908
|
<Project Sdk="Microsoft.NET.Sdk">
|
@@ -909,21 +911,21 @@ public partial class UpdateWorkerTests
|
|
909
911
|
</PropertyGroup>
|
910
912
|
</Project>
|
911
913
|
""",
|
912
|
-
additionalFilesExpected:
|
913
|
-
|
914
|
+
additionalFilesExpected:
|
915
|
+
[
|
914
916
|
("Directory.Packages.props", """
|
915
917
|
<Project>
|
916
918
|
<PropertyGroup>
|
917
919
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
918
920
|
<NewtonsoftJsonPackageVersion>13.0.1</NewtonsoftJsonPackageVersion>
|
919
921
|
</PropertyGroup>
|
920
|
-
|
922
|
+
|
921
923
|
<ItemGroup>
|
922
924
|
<GlobalPackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
923
925
|
</ItemGroup>
|
924
926
|
</Project>
|
925
927
|
""")
|
926
|
-
|
928
|
+
]);
|
927
929
|
}
|
928
930
|
|
929
931
|
[Fact]
|
@@ -936,14 +938,14 @@ public partial class UpdateWorkerTests
|
|
936
938
|
<PropertyGroup>
|
937
939
|
<TargetFramework>netstandard2.0</TargetFramework>
|
938
940
|
</PropertyGroup>
|
939
|
-
|
941
|
+
|
940
942
|
<ItemGroup>
|
941
943
|
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
942
944
|
</ItemGroup>
|
943
945
|
</Project>
|
944
946
|
""",
|
945
|
-
additionalFiles:
|
946
|
-
|
947
|
+
additionalFiles:
|
948
|
+
[
|
947
949
|
// initial props file
|
948
950
|
("Directory.Build.props", """
|
949
951
|
<Project>
|
@@ -952,21 +954,21 @@ public partial class UpdateWorkerTests
|
|
952
954
|
</PropertyGroup>
|
953
955
|
</Project>
|
954
956
|
""")
|
955
|
-
|
957
|
+
],
|
956
958
|
// expected project
|
957
959
|
expectedProjectContents: """
|
958
960
|
<Project Sdk="Microsoft.NET.Sdk">
|
959
961
|
<PropertyGroup>
|
960
962
|
<TargetFramework>netstandard2.0</TargetFramework>
|
961
963
|
</PropertyGroup>
|
962
|
-
|
964
|
+
|
963
965
|
<ItemGroup>
|
964
966
|
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
965
967
|
</ItemGroup>
|
966
968
|
</Project>
|
967
969
|
""",
|
968
|
-
additionalFilesExpected:
|
969
|
-
|
970
|
+
additionalFilesExpected:
|
971
|
+
[
|
970
972
|
// expected props file
|
971
973
|
("Directory.Build.props", """
|
972
974
|
<Project>
|
@@ -975,7 +977,7 @@ public partial class UpdateWorkerTests
|
|
975
977
|
</PropertyGroup>
|
976
978
|
</Project>
|
977
979
|
""")
|
978
|
-
|
980
|
+
]);
|
979
981
|
}
|
980
982
|
|
981
983
|
[Fact]
|
@@ -986,18 +988,18 @@ public partial class UpdateWorkerTests
|
|
986
988
|
projectContents: """
|
987
989
|
<Project Sdk="Microsoft.NET.Sdk">
|
988
990
|
<Import Project="my-properties.props" />
|
989
|
-
|
991
|
+
|
990
992
|
<PropertyGroup>
|
991
993
|
<TargetFramework>netstandard2.0</TargetFramework>
|
992
994
|
</PropertyGroup>
|
993
|
-
|
995
|
+
|
994
996
|
<ItemGroup>
|
995
997
|
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
996
998
|
</ItemGroup>
|
997
999
|
</Project>
|
998
1000
|
""",
|
999
|
-
additionalFiles:
|
1000
|
-
|
1001
|
+
additionalFiles:
|
1002
|
+
[
|
1001
1003
|
// initial props file
|
1002
1004
|
("my-properties.props", """
|
1003
1005
|
<Project>
|
@@ -1006,23 +1008,23 @@ public partial class UpdateWorkerTests
|
|
1006
1008
|
</PropertyGroup>
|
1007
1009
|
</Project>
|
1008
1010
|
""")
|
1009
|
-
|
1011
|
+
],
|
1010
1012
|
// expected project
|
1011
1013
|
expectedProjectContents: """
|
1012
1014
|
<Project Sdk="Microsoft.NET.Sdk">
|
1013
1015
|
<Import Project="my-properties.props" />
|
1014
|
-
|
1016
|
+
|
1015
1017
|
<PropertyGroup>
|
1016
1018
|
<TargetFramework>netstandard2.0</TargetFramework>
|
1017
1019
|
</PropertyGroup>
|
1018
|
-
|
1020
|
+
|
1019
1021
|
<ItemGroup>
|
1020
1022
|
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
1021
1023
|
</ItemGroup>
|
1022
1024
|
</Project>
|
1023
1025
|
""",
|
1024
|
-
additionalFilesExpected:
|
1025
|
-
|
1026
|
+
additionalFilesExpected:
|
1027
|
+
[
|
1026
1028
|
// expected props file
|
1027
1029
|
("my-properties.props", """
|
1028
1030
|
<Project>
|
@@ -1031,7 +1033,7 @@ public partial class UpdateWorkerTests
|
|
1031
1033
|
</PropertyGroup>
|
1032
1034
|
</Project>
|
1033
1035
|
""")
|
1034
|
-
|
1036
|
+
]);
|
1035
1037
|
}
|
1036
1038
|
|
1037
1039
|
[Fact]
|
@@ -1045,14 +1047,14 @@ public partial class UpdateWorkerTests
|
|
1045
1047
|
<PropertyGroup>
|
1046
1048
|
<TargetFramework>netstandard2.0</TargetFramework>
|
1047
1049
|
</PropertyGroup>
|
1048
|
-
|
1050
|
+
|
1049
1051
|
<ItemGroup>
|
1050
1052
|
<PackageReference Include="Newtonsoft.Json" />
|
1051
1053
|
</ItemGroup>
|
1052
1054
|
</Project>
|
1053
1055
|
""",
|
1054
|
-
additionalFiles:
|
1055
|
-
|
1056
|
+
additionalFiles:
|
1057
|
+
[
|
1056
1058
|
// initial props files
|
1057
1059
|
("Directory.Packages.props", """
|
1058
1060
|
<Project>
|
@@ -1060,7 +1062,7 @@ public partial class UpdateWorkerTests
|
|
1060
1062
|
<PropertyGroup>
|
1061
1063
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
1062
1064
|
</PropertyGroup>
|
1063
|
-
|
1065
|
+
|
1064
1066
|
<ItemGroup>
|
1065
1067
|
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
1066
1068
|
</ItemGroup>
|
@@ -1073,21 +1075,21 @@ public partial class UpdateWorkerTests
|
|
1073
1075
|
</PropertyGroup>
|
1074
1076
|
</Project>
|
1075
1077
|
""")
|
1076
|
-
|
1078
|
+
],
|
1077
1079
|
// expected
|
1078
1080
|
expectedProjectContents: """
|
1079
1081
|
<Project Sdk="Microsoft.NET.Sdk">
|
1080
1082
|
<PropertyGroup>
|
1081
1083
|
<TargetFramework>netstandard2.0</TargetFramework>
|
1082
1084
|
</PropertyGroup>
|
1083
|
-
|
1085
|
+
|
1084
1086
|
<ItemGroup>
|
1085
1087
|
<PackageReference Include="Newtonsoft.Json" />
|
1086
1088
|
</ItemGroup>
|
1087
1089
|
</Project>
|
1088
1090
|
""",
|
1089
|
-
additionalFilesExpected:
|
1090
|
-
|
1091
|
+
additionalFilesExpected:
|
1092
|
+
[
|
1091
1093
|
// expected props files
|
1092
1094
|
("Directory.Packages.props", """
|
1093
1095
|
<Project>
|
@@ -1095,7 +1097,7 @@ public partial class UpdateWorkerTests
|
|
1095
1097
|
<PropertyGroup>
|
1096
1098
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
1097
1099
|
</PropertyGroup>
|
1098
|
-
|
1100
|
+
|
1099
1101
|
<ItemGroup>
|
1100
1102
|
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
1101
1103
|
</ItemGroup>
|
@@ -1108,7 +1110,7 @@ public partial class UpdateWorkerTests
|
|
1108
1110
|
</PropertyGroup>
|
1109
1111
|
</Project>
|
1110
1112
|
""")
|
1111
|
-
|
1113
|
+
]);
|
1112
1114
|
}
|
1113
1115
|
|
1114
1116
|
[Fact]
|
@@ -1122,14 +1124,14 @@ public partial class UpdateWorkerTests
|
|
1122
1124
|
<PropertyGroup>
|
1123
1125
|
<TargetFramework>netstandard2.0</TargetFramework>
|
1124
1126
|
</PropertyGroup>
|
1125
|
-
|
1127
|
+
|
1126
1128
|
<ItemGroup>
|
1127
1129
|
<PackageReference Include="Newtonsoft.Json" />
|
1128
1130
|
</ItemGroup>
|
1129
1131
|
</Project>
|
1130
1132
|
""",
|
1131
|
-
additionalFiles:
|
1132
|
-
|
1133
|
+
additionalFiles:
|
1134
|
+
[
|
1133
1135
|
// initial props files
|
1134
1136
|
("Directory.Packages.props", """
|
1135
1137
|
<Project>
|
@@ -1138,7 +1140,7 @@ public partial class UpdateWorkerTests
|
|
1138
1140
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
1139
1141
|
<NewtonsoftJsonPackageVersion>$(NewtonsoftJsonVersion)</NewtonsoftJsonPackageVersion>
|
1140
1142
|
</PropertyGroup>
|
1141
|
-
|
1143
|
+
|
1142
1144
|
<ItemGroup>
|
1143
1145
|
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
1144
1146
|
</ItemGroup>
|
@@ -1151,21 +1153,21 @@ public partial class UpdateWorkerTests
|
|
1151
1153
|
</PropertyGroup>
|
1152
1154
|
</Project>
|
1153
1155
|
""")
|
1154
|
-
|
1156
|
+
],
|
1155
1157
|
// expected
|
1156
1158
|
expectedProjectContents: """
|
1157
1159
|
<Project Sdk="Microsoft.NET.Sdk">
|
1158
1160
|
<PropertyGroup>
|
1159
1161
|
<TargetFramework>netstandard2.0</TargetFramework>
|
1160
1162
|
</PropertyGroup>
|
1161
|
-
|
1163
|
+
|
1162
1164
|
<ItemGroup>
|
1163
1165
|
<PackageReference Include="Newtonsoft.Json" />
|
1164
1166
|
</ItemGroup>
|
1165
1167
|
</Project>
|
1166
1168
|
""",
|
1167
|
-
additionalFilesExpected:
|
1168
|
-
|
1169
|
+
additionalFilesExpected:
|
1170
|
+
[
|
1169
1171
|
// expected props files
|
1170
1172
|
("Directory.Packages.props", """
|
1171
1173
|
<Project>
|
@@ -1174,7 +1176,7 @@ public partial class UpdateWorkerTests
|
|
1174
1176
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
1175
1177
|
<NewtonsoftJsonPackageVersion>$(NewtonsoftJsonVersion)</NewtonsoftJsonPackageVersion>
|
1176
1178
|
</PropertyGroup>
|
1177
|
-
|
1179
|
+
|
1178
1180
|
<ItemGroup>
|
1179
1181
|
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
1180
1182
|
</ItemGroup>
|
@@ -1187,7 +1189,7 @@ public partial class UpdateWorkerTests
|
|
1187
1189
|
</PropertyGroup>
|
1188
1190
|
</Project>
|
1189
1191
|
""")
|
1190
|
-
|
1192
|
+
]);
|
1191
1193
|
}
|
1192
1194
|
|
1193
1195
|
[Fact]
|
@@ -1201,14 +1203,14 @@ public partial class UpdateWorkerTests
|
|
1201
1203
|
<PropertyGroup>
|
1202
1204
|
<TargetFramework>netstandard2.0</TargetFramework>
|
1203
1205
|
</PropertyGroup>
|
1204
|
-
|
1206
|
+
|
1205
1207
|
<ItemGroup>
|
1206
1208
|
<PackageReference Include="Newtonsoft.Json" />
|
1207
1209
|
</ItemGroup>
|
1208
1210
|
</Project>
|
1209
1211
|
""",
|
1210
|
-
additionalFiles:
|
1211
|
-
|
1212
|
+
additionalFiles:
|
1213
|
+
[
|
1212
1214
|
// initial props files
|
1213
1215
|
("Directory.Packages.props", """
|
1214
1216
|
<Project>
|
@@ -1217,7 +1219,7 @@ public partial class UpdateWorkerTests
|
|
1217
1219
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
1218
1220
|
<NewtonsoftJsonPackageVersion>$(NewtonsoftJsonVersion)</NewtonsoftJsonPackageVersion>
|
1219
1221
|
</PropertyGroup>
|
1220
|
-
|
1222
|
+
|
1221
1223
|
<ItemGroup>
|
1222
1224
|
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
1223
1225
|
</ItemGroup>
|
@@ -1231,21 +1233,21 @@ public partial class UpdateWorkerTests
|
|
1231
1233
|
</PropertyGroup>
|
1232
1234
|
</Project>
|
1233
1235
|
""")
|
1234
|
-
|
1236
|
+
],
|
1235
1237
|
// expected
|
1236
1238
|
expectedProjectContents: """
|
1237
1239
|
<Project Sdk="Microsoft.NET.Sdk">
|
1238
1240
|
<PropertyGroup>
|
1239
1241
|
<TargetFramework>netstandard2.0</TargetFramework>
|
1240
1242
|
</PropertyGroup>
|
1241
|
-
|
1243
|
+
|
1242
1244
|
<ItemGroup>
|
1243
1245
|
<PackageReference Include="Newtonsoft.Json" />
|
1244
1246
|
</ItemGroup>
|
1245
1247
|
</Project>
|
1246
1248
|
""",
|
1247
|
-
additionalFilesExpected:
|
1248
|
-
|
1249
|
+
additionalFilesExpected:
|
1250
|
+
[
|
1249
1251
|
// expected props files
|
1250
1252
|
("Directory.Packages.props", """
|
1251
1253
|
<Project>
|
@@ -1254,7 +1256,7 @@ public partial class UpdateWorkerTests
|
|
1254
1256
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
1255
1257
|
<NewtonsoftJsonPackageVersion>$(NewtonsoftJsonVersion)</NewtonsoftJsonPackageVersion>
|
1256
1258
|
</PropertyGroup>
|
1257
|
-
|
1259
|
+
|
1258
1260
|
<ItemGroup>
|
1259
1261
|
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
|
1260
1262
|
</ItemGroup>
|
@@ -1268,7 +1270,7 @@ public partial class UpdateWorkerTests
|
|
1268
1270
|
</PropertyGroup>
|
1269
1271
|
</Project>
|
1270
1272
|
""")
|
1271
|
-
|
1273
|
+
]);
|
1272
1274
|
}
|
1273
1275
|
|
1274
1276
|
[Fact]
|
@@ -1347,8 +1349,8 @@ public partial class UpdateWorkerTests
|
|
1347
1349
|
</ItemGroup>
|
1348
1350
|
</Project>
|
1349
1351
|
""",
|
1350
|
-
additionalFiles:
|
1351
|
-
|
1352
|
+
additionalFiles:
|
1353
|
+
[
|
1352
1354
|
("Versions.props", """
|
1353
1355
|
<Project>
|
1354
1356
|
<PropertyGroup>
|
@@ -1357,7 +1359,7 @@ public partial class UpdateWorkerTests
|
|
1357
1359
|
</PropertyGroup>
|
1358
1360
|
</Project>
|
1359
1361
|
""")
|
1360
|
-
|
1362
|
+
],
|
1361
1363
|
expectedProjectContents: """
|
1362
1364
|
<Project Sdk="Microsoft.NET.Sdk">
|
1363
1365
|
<Import Project="Versions.props" />
|
@@ -1370,8 +1372,8 @@ public partial class UpdateWorkerTests
|
|
1370
1372
|
</ItemGroup>
|
1371
1373
|
</Project>
|
1372
1374
|
""",
|
1373
|
-
additionalFilesExpected:
|
1374
|
-
|
1375
|
+
additionalFilesExpected:
|
1376
|
+
[
|
1375
1377
|
("Versions.props", """
|
1376
1378
|
<Project>
|
1377
1379
|
<PropertyGroup>
|
@@ -1380,7 +1382,7 @@ public partial class UpdateWorkerTests
|
|
1380
1382
|
</PropertyGroup>
|
1381
1383
|
</Project>
|
1382
1384
|
""")
|
1383
|
-
|
1385
|
+
]);
|
1384
1386
|
}
|
1385
1387
|
|
1386
1388
|
[Fact]
|
@@ -1428,8 +1430,8 @@ public partial class UpdateWorkerTests
|
|
1428
1430
|
</ItemGroup>
|
1429
1431
|
</Project>
|
1430
1432
|
""",
|
1431
|
-
additionalFiles:
|
1432
|
-
|
1433
|
+
additionalFiles:
|
1434
|
+
[
|
1433
1435
|
("Directory.Packages.props", """
|
1434
1436
|
<Project>
|
1435
1437
|
<PropertyGroup>
|
@@ -1444,7 +1446,7 @@ public partial class UpdateWorkerTests
|
|
1444
1446
|
</ItemGroup>
|
1445
1447
|
</Project>
|
1446
1448
|
""")
|
1447
|
-
|
1449
|
+
],
|
1448
1450
|
expectedProjectContents: """
|
1449
1451
|
<Project Sdk="Microsoft.NET.Sdk">
|
1450
1452
|
<PropertyGroup>
|
@@ -1458,8 +1460,8 @@ public partial class UpdateWorkerTests
|
|
1458
1460
|
</ItemGroup>
|
1459
1461
|
</Project>
|
1460
1462
|
""",
|
1461
|
-
additionalFilesExpected:
|
1462
|
-
|
1463
|
+
additionalFilesExpected:
|
1464
|
+
[
|
1463
1465
|
("Directory.Packages.props", """
|
1464
1466
|
<Project>
|
1465
1467
|
<PropertyGroup>
|
@@ -1474,7 +1476,7 @@ public partial class UpdateWorkerTests
|
|
1474
1476
|
</ItemGroup>
|
1475
1477
|
</Project>
|
1476
1478
|
""")
|
1477
|
-
|
1479
|
+
]);
|
1478
1480
|
}
|
1479
1481
|
|
1480
1482
|
[Fact]
|
@@ -1563,13 +1565,13 @@ public partial class UpdateWorkerTests
|
|
1563
1565
|
await TestUpdateForProject("Microsoft.VisualStudio.Sdk.TestFramework.Xunit", "17.2.7", "17.6.16",
|
1564
1566
|
projectContents: """
|
1565
1567
|
<Project Sdk="Microsoft.NET.Sdk">
|
1566
|
-
|
1568
|
+
|
1567
1569
|
<PropertyGroup>
|
1568
1570
|
<TargetFramework>$(PreferredTargetFramework)</TargetFramework>
|
1569
1571
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
1570
1572
|
<RootNamespace />
|
1571
1573
|
</PropertyGroup>
|
1572
|
-
|
1574
|
+
|
1573
1575
|
<ItemGroup>
|
1574
1576
|
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
1575
1577
|
<PackageReference Include="Microsoft.VisualStudio.Sdk.TestFramework" />
|
@@ -1581,8 +1583,8 @@ public partial class UpdateWorkerTests
|
|
1581
1583
|
|
1582
1584
|
</Project>
|
1583
1585
|
""",
|
1584
|
-
additionalFiles:
|
1585
|
-
|
1586
|
+
additionalFiles:
|
1587
|
+
[
|
1586
1588
|
("Directory.Packages.props", """
|
1587
1589
|
<Project>
|
1588
1590
|
<PropertyGroup>
|
@@ -1608,16 +1610,16 @@ public partial class UpdateWorkerTests
|
|
1608
1610
|
</PropertyGroup>
|
1609
1611
|
</Project>
|
1610
1612
|
""")
|
1611
|
-
|
1613
|
+
],
|
1612
1614
|
expectedProjectContents: """
|
1613
1615
|
<Project Sdk="Microsoft.NET.Sdk">
|
1614
|
-
|
1616
|
+
|
1615
1617
|
<PropertyGroup>
|
1616
1618
|
<TargetFramework>$(PreferredTargetFramework)</TargetFramework>
|
1617
1619
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
1618
1620
|
<RootNamespace />
|
1619
1621
|
</PropertyGroup>
|
1620
|
-
|
1622
|
+
|
1621
1623
|
<ItemGroup>
|
1622
1624
|
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
1623
1625
|
<PackageReference Include="Microsoft.VisualStudio.Sdk.TestFramework" />
|
@@ -1629,8 +1631,8 @@ public partial class UpdateWorkerTests
|
|
1629
1631
|
|
1630
1632
|
</Project>
|
1631
1633
|
""",
|
1632
|
-
additionalFilesExpected:
|
1633
|
-
|
1634
|
+
additionalFilesExpected:
|
1635
|
+
[
|
1634
1636
|
("Directory.Packages.props", """
|
1635
1637
|
<Project>
|
1636
1638
|
<PropertyGroup>
|
@@ -1656,7 +1658,7 @@ public partial class UpdateWorkerTests
|
|
1656
1658
|
</PropertyGroup>
|
1657
1659
|
</Project>
|
1658
1660
|
""")
|
1659
|
-
|
1661
|
+
]);
|
1660
1662
|
}
|
1661
1663
|
|
1662
1664
|
[Fact]
|
@@ -1666,19 +1668,19 @@ public partial class UpdateWorkerTests
|
|
1666
1668
|
// initial
|
1667
1669
|
projectContents: """
|
1668
1670
|
<Project Sdk="Microsoft.NET.Sdk">
|
1669
|
-
|
1671
|
+
|
1670
1672
|
<PropertyGroup>
|
1671
1673
|
<TargetFramework>net5.0</TargetFramework>
|
1672
1674
|
</PropertyGroup>
|
1673
|
-
|
1675
|
+
|
1674
1676
|
<ItemGroup>
|
1675
1677
|
<PackageReference Include="Mongo2Go" />
|
1676
1678
|
</ItemGroup>
|
1677
1679
|
|
1678
1680
|
</Project>
|
1679
1681
|
""",
|
1680
|
-
additionalFiles:
|
1681
|
-
|
1682
|
+
additionalFiles:
|
1683
|
+
[
|
1682
1684
|
// initial props files
|
1683
1685
|
("Directory.Packages.props", """
|
1684
1686
|
<Project>
|
@@ -1690,15 +1692,15 @@ public partial class UpdateWorkerTests
|
|
1690
1692
|
</ItemGroup>
|
1691
1693
|
</Project>
|
1692
1694
|
""")
|
1693
|
-
|
1695
|
+
],
|
1694
1696
|
// expected
|
1695
1697
|
expectedProjectContents: """
|
1696
1698
|
<Project Sdk="Microsoft.NET.Sdk">
|
1697
|
-
|
1699
|
+
|
1698
1700
|
<PropertyGroup>
|
1699
1701
|
<TargetFramework>net5.0</TargetFramework>
|
1700
1702
|
</PropertyGroup>
|
1701
|
-
|
1703
|
+
|
1702
1704
|
<ItemGroup>
|
1703
1705
|
<PackageReference Include="Mongo2Go" />
|
1704
1706
|
<PackageReference Include="System.Text.Json" />
|
@@ -1706,8 +1708,8 @@ public partial class UpdateWorkerTests
|
|
1706
1708
|
|
1707
1709
|
</Project>
|
1708
1710
|
""",
|
1709
|
-
additionalFilesExpected:
|
1710
|
-
|
1711
|
+
additionalFilesExpected:
|
1712
|
+
[
|
1711
1713
|
// expected props files
|
1712
1714
|
("Directory.Packages.props", """
|
1713
1715
|
<Project>
|
@@ -1720,7 +1722,7 @@ public partial class UpdateWorkerTests
|
|
1720
1722
|
</ItemGroup>
|
1721
1723
|
</Project>
|
1722
1724
|
""")
|
1723
|
-
|
1725
|
+
]);
|
1724
1726
|
}
|
1725
1727
|
|
1726
1728
|
[Fact]
|
@@ -1730,20 +1732,20 @@ public partial class UpdateWorkerTests
|
|
1730
1732
|
// initial
|
1731
1733
|
projectContents: """
|
1732
1734
|
<Project Sdk="Microsoft.NET.Sdk">
|
1733
|
-
|
1735
|
+
|
1734
1736
|
<PropertyGroup>
|
1735
1737
|
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
|
1736
1738
|
<TargetFramework>net5.0</TargetFramework>
|
1737
1739
|
</PropertyGroup>
|
1738
|
-
|
1740
|
+
|
1739
1741
|
<ItemGroup>
|
1740
1742
|
<PackageReference Include="Mongo2Go" />
|
1741
1743
|
</ItemGroup>
|
1742
1744
|
|
1743
1745
|
</Project>
|
1744
1746
|
""",
|
1745
|
-
additionalFiles:
|
1746
|
-
|
1747
|
+
additionalFiles:
|
1748
|
+
[
|
1747
1749
|
// initial props files
|
1748
1750
|
("Directory.Packages.props", """
|
1749
1751
|
<Project>
|
@@ -1756,24 +1758,24 @@ public partial class UpdateWorkerTests
|
|
1756
1758
|
</ItemGroup>
|
1757
1759
|
</Project>
|
1758
1760
|
""")
|
1759
|
-
|
1761
|
+
],
|
1760
1762
|
// expected
|
1761
1763
|
expectedProjectContents: """
|
1762
1764
|
<Project Sdk="Microsoft.NET.Sdk">
|
1763
|
-
|
1765
|
+
|
1764
1766
|
<PropertyGroup>
|
1765
1767
|
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
|
1766
1768
|
<TargetFramework>net5.0</TargetFramework>
|
1767
1769
|
</PropertyGroup>
|
1768
|
-
|
1770
|
+
|
1769
1771
|
<ItemGroup>
|
1770
1772
|
<PackageReference Include="Mongo2Go" />
|
1771
1773
|
</ItemGroup>
|
1772
1774
|
|
1773
1775
|
</Project>
|
1774
1776
|
""",
|
1775
|
-
additionalFilesExpected:
|
1776
|
-
|
1777
|
+
additionalFilesExpected:
|
1778
|
+
[
|
1777
1779
|
// expected props files
|
1778
1780
|
("Directory.Packages.props", """
|
1779
1781
|
<Project>
|
@@ -1787,7 +1789,7 @@ public partial class UpdateWorkerTests
|
|
1787
1789
|
</ItemGroup>
|
1788
1790
|
</Project>
|
1789
1791
|
""")
|
1790
|
-
|
1792
|
+
]);
|
1791
1793
|
}
|
1792
1794
|
|
1793
1795
|
[Fact]
|
@@ -1795,17 +1797,17 @@ public partial class UpdateWorkerTests
|
|
1795
1797
|
{
|
1796
1798
|
await TestUpdateForProject("Newtonsoft.Json", "12.0.1", "13.0.1",
|
1797
1799
|
projectContents: """
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1806
|
-
|
1807
|
-
additionalFiles:
|
1808
|
-
|
1800
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
1801
|
+
<PropertyGroup>
|
1802
|
+
<TargetFramework>net7.0</TargetFramework>
|
1803
|
+
</PropertyGroup>
|
1804
|
+
<ItemGroup>
|
1805
|
+
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
|
1806
|
+
</ItemGroup>
|
1807
|
+
</Project>
|
1808
|
+
""",
|
1809
|
+
additionalFiles:
|
1810
|
+
[
|
1809
1811
|
("Directory.Build.props", """
|
1810
1812
|
<Project>
|
1811
1813
|
<Import Project="Versions.Props" />
|
@@ -1819,20 +1821,20 @@ public partial class UpdateWorkerTests
|
|
1819
1821
|
</PropertyGroup>
|
1820
1822
|
</Project>
|
1821
1823
|
""")
|
1822
|
-
|
1824
|
+
],
|
1823
1825
|
// no change
|
1824
1826
|
expectedProjectContents: """
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
additionalFilesExpected:
|
1835
|
-
|
1827
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
1828
|
+
<PropertyGroup>
|
1829
|
+
<TargetFramework>net7.0</TargetFramework>
|
1830
|
+
</PropertyGroup>
|
1831
|
+
<ItemGroup>
|
1832
|
+
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
|
1833
|
+
</ItemGroup>
|
1834
|
+
</Project>
|
1835
|
+
""",
|
1836
|
+
additionalFilesExpected:
|
1837
|
+
[
|
1836
1838
|
// no change
|
1837
1839
|
("Directory.Build.props", """
|
1838
1840
|
<Project>
|
@@ -1847,7 +1849,7 @@ public partial class UpdateWorkerTests
|
|
1847
1849
|
</PropertyGroup>
|
1848
1850
|
</Project>
|
1849
1851
|
""")
|
1850
|
-
|
1852
|
+
]
|
1851
1853
|
);
|
1852
1854
|
}
|
1853
1855
|
|
@@ -1857,25 +1859,25 @@ public partial class UpdateWorkerTests
|
|
1857
1859
|
// the version attribute in the project has an all lowercase name
|
1858
1860
|
await TestUpdateForProject("Newtonsoft.Json", "12.0.1", "13.0.1",
|
1859
1861
|
projectContents: """
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
|
1864
|
-
|
1865
|
-
|
1866
|
-
|
1867
|
-
|
1868
|
-
|
1862
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
1863
|
+
<PropertyGroup>
|
1864
|
+
<TargetFramework>net7.0</TargetFramework>
|
1865
|
+
</PropertyGroup>
|
1866
|
+
<ItemGroup>
|
1867
|
+
<PackageReference Include="Newtonsoft.Json" version="12.0.1" />
|
1868
|
+
</ItemGroup>
|
1869
|
+
</Project>
|
1870
|
+
""",
|
1869
1871
|
expectedProjectContents: """
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1872
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
1873
|
+
<PropertyGroup>
|
1874
|
+
<TargetFramework>net7.0</TargetFramework>
|
1875
|
+
</PropertyGroup>
|
1876
|
+
<ItemGroup>
|
1877
|
+
<PackageReference Include="Newtonsoft.Json" version="13.0.1" />
|
1878
|
+
</ItemGroup>
|
1879
|
+
</Project>
|
1880
|
+
"""
|
1879
1881
|
);
|
1880
1882
|
}
|
1881
1883
|
|
@@ -1885,17 +1887,17 @@ public partial class UpdateWorkerTests
|
|
1885
1887
|
// the version attribute in the project has an all lowercase name
|
1886
1888
|
await TestUpdateForProject("Newtonsoft.Json", "12.0.1", "13.0.1",
|
1887
1889
|
projectContents: """
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
additionalFiles:
|
1898
|
-
|
1890
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
1891
|
+
<PropertyGroup>
|
1892
|
+
<TargetFramework>net7.0</TargetFramework>
|
1893
|
+
</PropertyGroup>
|
1894
|
+
<ItemGroup>
|
1895
|
+
<PackageReference Include="Newtonsoft.Json" version="$(NewtonsoftJsonVersion)" />
|
1896
|
+
</ItemGroup>
|
1897
|
+
</Project>
|
1898
|
+
""",
|
1899
|
+
additionalFiles:
|
1900
|
+
[
|
1899
1901
|
("Directory.Build.props", """
|
1900
1902
|
<Project>
|
1901
1903
|
<Import Project="Versions.props" />
|
@@ -1908,20 +1910,20 @@ public partial class UpdateWorkerTests
|
|
1908
1910
|
</PropertyGroup>
|
1909
1911
|
</Project>
|
1910
1912
|
""")
|
1911
|
-
|
1913
|
+
],
|
1912
1914
|
// no change
|
1913
1915
|
expectedProjectContents: """
|
1914
|
-
|
1915
|
-
|
1916
|
-
|
1917
|
-
|
1918
|
-
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
additionalFilesExpected:
|
1924
|
-
|
1916
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
1917
|
+
<PropertyGroup>
|
1918
|
+
<TargetFramework>net7.0</TargetFramework>
|
1919
|
+
</PropertyGroup>
|
1920
|
+
<ItemGroup>
|
1921
|
+
<PackageReference Include="Newtonsoft.Json" version="$(NewtonsoftJsonVersion)" />
|
1922
|
+
</ItemGroup>
|
1923
|
+
</Project>
|
1924
|
+
""",
|
1925
|
+
additionalFilesExpected:
|
1926
|
+
[
|
1925
1927
|
// no change
|
1926
1928
|
("Directory.Build.props", """
|
1927
1929
|
<Project>
|
@@ -1936,7 +1938,7 @@ public partial class UpdateWorkerTests
|
|
1936
1938
|
</PropertyGroup>
|
1937
1939
|
</Project>
|
1938
1940
|
""")
|
1939
|
-
|
1941
|
+
]
|
1940
1942
|
);
|
1941
1943
|
}
|
1942
1944
|
|
@@ -1946,17 +1948,17 @@ public partial class UpdateWorkerTests
|
|
1946
1948
|
await TestUpdateForProject("xunit.assert", "2.5.2", "2.5.3",
|
1947
1949
|
isTransitive: true,
|
1948
1950
|
projectContents: """
|
1949
|
-
|
1950
|
-
|
1951
|
-
|
1952
|
-
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
additionalFiles:
|
1959
|
-
|
1951
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
1952
|
+
<PropertyGroup>
|
1953
|
+
<TargetFramework>net7.0</TargetFramework>
|
1954
|
+
</PropertyGroup>
|
1955
|
+
<ItemGroup>
|
1956
|
+
<PackageReference Include="xunit" />
|
1957
|
+
</ItemGroup>
|
1958
|
+
</Project>
|
1959
|
+
""",
|
1960
|
+
additionalFiles:
|
1961
|
+
[
|
1960
1962
|
("Directory.Packages.props", """
|
1961
1963
|
<Project>
|
1962
1964
|
<PropertyGroup>
|
@@ -1969,19 +1971,19 @@ public partial class UpdateWorkerTests
|
|
1969
1971
|
</ItemGroup>
|
1970
1972
|
</Project>
|
1971
1973
|
""")
|
1972
|
-
|
1974
|
+
],
|
1973
1975
|
expectedProjectContents: """
|
1974
|
-
|
1975
|
-
|
1976
|
-
|
1977
|
-
|
1978
|
-
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
1982
|
-
|
1983
|
-
additionalFilesExpected:
|
1984
|
-
|
1976
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
1977
|
+
<PropertyGroup>
|
1978
|
+
<TargetFramework>net7.0</TargetFramework>
|
1979
|
+
</PropertyGroup>
|
1980
|
+
<ItemGroup>
|
1981
|
+
<PackageReference Include="xunit" />
|
1982
|
+
</ItemGroup>
|
1983
|
+
</Project>
|
1984
|
+
""",
|
1985
|
+
additionalFilesExpected:
|
1986
|
+
[
|
1985
1987
|
("Directory.Packages.props", """
|
1986
1988
|
<Project>
|
1987
1989
|
<PropertyGroup>
|
@@ -1994,7 +1996,7 @@ public partial class UpdateWorkerTests
|
|
1994
1996
|
</ItemGroup>
|
1995
1997
|
</Project>
|
1996
1998
|
""")
|
1997
|
-
|
1999
|
+
]
|
1998
2000
|
);
|
1999
2001
|
}
|
2000
2002
|
|
@@ -2004,17 +2006,17 @@ public partial class UpdateWorkerTests
|
|
2004
2006
|
await TestUpdateForProject("xunit.assert", "2.5.2", "2.5.3",
|
2005
2007
|
isTransitive: true,
|
2006
2008
|
projectContents: """
|
2007
|
-
|
2008
|
-
|
2009
|
-
|
2010
|
-
|
2011
|
-
|
2012
|
-
|
2013
|
-
|
2014
|
-
|
2015
|
-
|
2016
|
-
additionalFiles:
|
2017
|
-
|
2009
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
2010
|
+
<PropertyGroup>
|
2011
|
+
<TargetFramework>net7.0</TargetFramework>
|
2012
|
+
</PropertyGroup>
|
2013
|
+
<ItemGroup>
|
2014
|
+
<PackageReference Include="xunit" />
|
2015
|
+
</ItemGroup>
|
2016
|
+
</Project>
|
2017
|
+
""",
|
2018
|
+
additionalFiles:
|
2019
|
+
[
|
2018
2020
|
("Directory.Packages.props", """
|
2019
2021
|
<Project>
|
2020
2022
|
<PropertyGroup>
|
@@ -2027,19 +2029,19 @@ public partial class UpdateWorkerTests
|
|
2027
2029
|
</ItemGroup>
|
2028
2030
|
</Project>
|
2029
2031
|
""")
|
2030
|
-
|
2032
|
+
],
|
2031
2033
|
expectedProjectContents: """
|
2032
|
-
|
2033
|
-
|
2034
|
-
|
2035
|
-
|
2036
|
-
|
2037
|
-
|
2038
|
-
|
2039
|
-
|
2040
|
-
|
2041
|
-
additionalFilesExpected:
|
2042
|
-
|
2034
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
2035
|
+
<PropertyGroup>
|
2036
|
+
<TargetFramework>net7.0</TargetFramework>
|
2037
|
+
</PropertyGroup>
|
2038
|
+
<ItemGroup>
|
2039
|
+
<PackageReference Include="xunit" />
|
2040
|
+
</ItemGroup>
|
2041
|
+
</Project>
|
2042
|
+
""",
|
2043
|
+
additionalFilesExpected:
|
2044
|
+
[
|
2043
2045
|
("Directory.Packages.props", """
|
2044
2046
|
<Project>
|
2045
2047
|
<PropertyGroup>
|
@@ -2052,7 +2054,7 @@ public partial class UpdateWorkerTests
|
|
2052
2054
|
</ItemGroup>
|
2053
2055
|
</Project>
|
2054
2056
|
""")
|
2055
|
-
|
2057
|
+
]
|
2056
2058
|
);
|
2057
2059
|
}
|
2058
2060
|
|
@@ -2061,25 +2063,25 @@ public partial class UpdateWorkerTests
|
|
2061
2063
|
{
|
2062
2064
|
await TestUpdateForProject("AWSSDK.Core", "3.7.204.13", "3.7.204.14",
|
2063
2065
|
projectContents: """
|
2064
|
-
|
2065
|
-
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
2070
|
-
|
2071
|
-
|
2072
|
-
|
2066
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
2067
|
+
<PropertyGroup>
|
2068
|
+
<TargetFramework>net7.0</TargetFramework>
|
2069
|
+
</PropertyGroup>
|
2070
|
+
<ItemGroup>
|
2071
|
+
<PackageReference Include="AWSSDK.Core" Version="3.7.204.13" />
|
2072
|
+
</ItemGroup>
|
2073
|
+
</Project>
|
2074
|
+
""",
|
2073
2075
|
expectedProjectContents: """
|
2074
|
-
|
2075
|
-
|
2076
|
-
|
2077
|
-
|
2078
|
-
|
2079
|
-
|
2080
|
-
|
2081
|
-
|
2082
|
-
|
2076
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
2077
|
+
<PropertyGroup>
|
2078
|
+
<TargetFramework>net7.0</TargetFramework>
|
2079
|
+
</PropertyGroup>
|
2080
|
+
<ItemGroup>
|
2081
|
+
<PackageReference Include="AWSSDK.Core" Version="3.7.204.14" />
|
2082
|
+
</ItemGroup>
|
2083
|
+
</Project>
|
2084
|
+
"""
|
2083
2085
|
);
|
2084
2086
|
}
|
2085
2087
|
|
@@ -2088,25 +2090,25 @@ public partial class UpdateWorkerTests
|
|
2088
2090
|
{
|
2089
2091
|
await TestUpdateForProject("Microsoft.Windows.Compatibility", "7.0.0", "8.0.0",
|
2090
2092
|
projectContents: """
|
2091
|
-
|
2092
|
-
|
2093
|
-
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2093
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
2094
|
+
<PropertyGroup>
|
2095
|
+
<TargetFramework>net5.0</TargetFramework>
|
2096
|
+
</PropertyGroup>
|
2097
|
+
<ItemGroup>
|
2098
|
+
<PackageReference Include="Microsoft.Windows.Compatibility" Version="7.0.0" />
|
2099
|
+
</ItemGroup>
|
2100
|
+
</Project>
|
2101
|
+
""",
|
2100
2102
|
expectedProjectContents: """
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2104
|
-
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2109
|
-
|
2103
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
2104
|
+
<PropertyGroup>
|
2105
|
+
<TargetFramework>net5.0</TargetFramework>
|
2106
|
+
</PropertyGroup>
|
2107
|
+
<ItemGroup>
|
2108
|
+
<PackageReference Include="Microsoft.Windows.Compatibility" Version="8.0.0" />
|
2109
|
+
</ItemGroup>
|
2110
|
+
</Project>
|
2111
|
+
"""
|
2110
2112
|
);
|
2111
2113
|
}
|
2112
2114
|
|
@@ -2115,31 +2117,31 @@ public partial class UpdateWorkerTests
|
|
2115
2117
|
{
|
2116
2118
|
await TestUpdateForProject("Newtonsoft.Json", "12.0.1", "13.0.1",
|
2117
2119
|
projectContents: """
|
2118
|
-
|
2119
|
-
|
2120
|
-
|
2121
|
-
|
2122
|
-
|
2123
|
-
|
2124
|
-
|
2125
|
-
|
2126
|
-
|
2127
|
-
|
2128
|
-
|
2129
|
-
|
2120
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
2121
|
+
<PropertyGroup>
|
2122
|
+
<TargetFramework>netstandard2.0</TargetFramework>
|
2123
|
+
<NewtonsoftJsonVersion Condition="$(UseLegacyVersion7) == 'true'">7.0.1</NewtonsoftJsonVersion>
|
2124
|
+
<NewtonsoftJsonVersion>12.0.1</NewtonsoftJsonVersion>
|
2125
|
+
<NewtonsoftJsonVersion Condition="$(UseLegacyVersion9) == 'true'">9.0.1</NewtonsoftJsonVersion>
|
2126
|
+
</PropertyGroup>
|
2127
|
+
<ItemGroup>
|
2128
|
+
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
|
2129
|
+
</ItemGroup>
|
2130
|
+
</Project>
|
2131
|
+
""",
|
2130
2132
|
expectedProjectContents: """
|
2131
|
-
|
2132
|
-
|
2133
|
-
|
2134
|
-
|
2135
|
-
|
2136
|
-
|
2137
|
-
|
2138
|
-
|
2139
|
-
|
2140
|
-
|
2141
|
-
|
2142
|
-
|
2133
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
2134
|
+
<PropertyGroup>
|
2135
|
+
<TargetFramework>netstandard2.0</TargetFramework>
|
2136
|
+
<NewtonsoftJsonVersion Condition="$(UseLegacyVersion7) == 'true'">7.0.1</NewtonsoftJsonVersion>
|
2137
|
+
<NewtonsoftJsonVersion>13.0.1</NewtonsoftJsonVersion>
|
2138
|
+
<NewtonsoftJsonVersion Condition="$(UseLegacyVersion9) == 'true'">9.0.1</NewtonsoftJsonVersion>
|
2139
|
+
</PropertyGroup>
|
2140
|
+
<ItemGroup>
|
2141
|
+
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
|
2142
|
+
</ItemGroup>
|
2143
|
+
</Project>
|
2144
|
+
"""
|
2143
2145
|
);
|
2144
2146
|
}
|
2145
2147
|
|
@@ -2148,29 +2150,29 @@ public partial class UpdateWorkerTests
|
|
2148
2150
|
{
|
2149
2151
|
await TestUpdateForProject("Newtonsoft.Json", "12.0.1", "13.0.1",
|
2150
2152
|
projectContents: """
|
2151
|
-
|
2152
|
-
|
2153
|
-
|
2154
|
-
|
2155
|
-
|
2156
|
-
|
2157
|
-
|
2158
|
-
|
2159
|
-
|
2160
|
-
|
2161
|
-
|
2153
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
2154
|
+
<PropertyGroup>
|
2155
|
+
<TargetFramework>netstandard2.0</TargetFramework>
|
2156
|
+
<NewtonsoftJsonVersion Condition="$(NewtonsoftJsonVersion) == ''">12.0.1</NewtonsoftJsonVersion>
|
2157
|
+
<NewtonsoftJsonVersion Condition="$(UseLegacyVersion9) == 'true'">9.0.1</NewtonsoftJsonVersion>
|
2158
|
+
</PropertyGroup>
|
2159
|
+
<ItemGroup>
|
2160
|
+
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
|
2161
|
+
</ItemGroup>
|
2162
|
+
</Project>
|
2163
|
+
""",
|
2162
2164
|
expectedProjectContents: """
|
2163
|
-
|
2164
|
-
|
2165
|
-
|
2166
|
-
|
2167
|
-
|
2168
|
-
|
2169
|
-
|
2170
|
-
|
2171
|
-
|
2172
|
-
|
2173
|
-
|
2165
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
2166
|
+
<PropertyGroup>
|
2167
|
+
<TargetFramework>netstandard2.0</TargetFramework>
|
2168
|
+
<NewtonsoftJsonVersion Condition="$(NewtonsoftJsonVersion) == ''">13.0.1</NewtonsoftJsonVersion>
|
2169
|
+
<NewtonsoftJsonVersion Condition="$(UseLegacyVersion9) == 'true'">9.0.1</NewtonsoftJsonVersion>
|
2170
|
+
</PropertyGroup>
|
2171
|
+
<ItemGroup>
|
2172
|
+
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
|
2173
|
+
</ItemGroup>
|
2174
|
+
</Project>
|
2175
|
+
"""
|
2174
2176
|
);
|
2175
2177
|
}
|
2176
2178
|
}
|