dependabot-nuget 0.242.1 → 0.244.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 +44 -24
- 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 +78 -54
- 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 +228 -75
- 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 +114 -45
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/SdkPackageUpdaterTests.cs +103 -87
- data/lib/dependabot/nuget/file_parser/project_file_parser.rb +109 -39
- data/lib/dependabot/nuget/file_parser.rb +23 -4
- data/lib/dependabot/nuget/file_updater.rb +44 -7
- data/lib/dependabot/nuget/native_helpers.rb +27 -8
- data/lib/dependabot/nuget/nuget_client.rb +66 -23
- 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 +7 -5
- 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/property_updater.rb +7 -4
- 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 +82 -82
- data/lib/dependabot/nuget/update_checker/version_finder.rb +9 -5
- data/lib/dependabot/nuget/update_checker.rb +6 -3
- data/lib/dependabot/nuget/version.rb +18 -7
- data/lib/dependabot/nuget.rb +0 -2
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be3a65448fe495f267cc054563bd29fd5a2142bb07613e2ed70a1cd21490bae5
|
4
|
+
data.tar.gz: 1fa876f1715e1ab11ccd5e0c323e58cd60b68d08560efe63a4c563755d36b1ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b22d903bfd1bab554a9513aac135e7f4ea8e055ce8e6a5f163c9d8331e87c258805d333043953c5b7beeaeba6404792694150e7e9c035de29cd1568a09b2fc22
|
7
|
+
data.tar.gz: 00abcf17c29b5f98242b8ca97ab28c79f88e7c2425430f08d549364b16b160d640841ccd2e2b4c01978e96d7b0b4d51826795247f8087d1af6a4962abfba7809
|
@@ -24,6 +24,8 @@ insert_final_newline = true
|
|
24
24
|
#### .NET Coding Conventions ####
|
25
25
|
[*.{cs,vb}]
|
26
26
|
|
27
|
+
max_line_length = 0
|
28
|
+
|
27
29
|
# Organize usings
|
28
30
|
dotnet_separate_import_directive_groups = true
|
29
31
|
dotnet_sort_system_directives_first = true
|
@@ -131,7 +133,8 @@ csharp_new_line_before_catch = true
|
|
131
133
|
csharp_new_line_before_else = true
|
132
134
|
csharp_new_line_before_finally = true
|
133
135
|
csharp_new_line_before_members_in_anonymous_types = true
|
134
|
-
|
136
|
+
# The following line is commented out to work around a Rider formatter bug. `true` is the default value.
|
137
|
+
# csharp_new_line_before_members_in_object_initializers = true
|
135
138
|
csharp_new_line_before_open_brace = all
|
136
139
|
csharp_new_line_between_query_expression_clauses = true
|
137
140
|
|
@@ -143,6 +146,9 @@ csharp_indent_case_contents_when_block = true
|
|
143
146
|
csharp_indent_labels = one_less_than_current
|
144
147
|
csharp_indent_switch_labels = true
|
145
148
|
|
149
|
+
resharper_outdent_statement_labels = true
|
150
|
+
resharper_indent_raw_literal_string = indent
|
151
|
+
|
146
152
|
# Space preferences
|
147
153
|
csharp_space_after_cast = false
|
148
154
|
csharp_space_after_colon_in_inheritance_clause = true
|
@@ -256,31 +262,31 @@ dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase
|
|
256
262
|
|
257
263
|
dotnet_naming_symbols.interfaces.applicable_kinds = interface
|
258
264
|
dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
259
|
-
dotnet_naming_symbols.interfaces.required_modifiers =
|
265
|
+
dotnet_naming_symbols.interfaces.required_modifiers =
|
260
266
|
|
261
267
|
dotnet_naming_symbols.enums.applicable_kinds = enum
|
262
268
|
dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
263
|
-
dotnet_naming_symbols.enums.required_modifiers =
|
269
|
+
dotnet_naming_symbols.enums.required_modifiers =
|
264
270
|
|
265
271
|
dotnet_naming_symbols.events.applicable_kinds = event
|
266
272
|
dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
267
|
-
dotnet_naming_symbols.events.required_modifiers =
|
273
|
+
dotnet_naming_symbols.events.required_modifiers =
|
268
274
|
|
269
275
|
dotnet_naming_symbols.methods.applicable_kinds = method
|
270
276
|
dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
271
|
-
dotnet_naming_symbols.methods.required_modifiers =
|
277
|
+
dotnet_naming_symbols.methods.required_modifiers =
|
272
278
|
|
273
279
|
dotnet_naming_symbols.properties.applicable_kinds = property
|
274
280
|
dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
275
|
-
dotnet_naming_symbols.properties.required_modifiers =
|
281
|
+
dotnet_naming_symbols.properties.required_modifiers =
|
276
282
|
|
277
283
|
dotnet_naming_symbols.public_fields.applicable_kinds = field
|
278
284
|
dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal
|
279
|
-
dotnet_naming_symbols.public_fields.required_modifiers =
|
285
|
+
dotnet_naming_symbols.public_fields.required_modifiers =
|
280
286
|
|
281
287
|
dotnet_naming_symbols.private_fields.applicable_kinds = field
|
282
288
|
dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
|
283
|
-
dotnet_naming_symbols.private_fields.required_modifiers =
|
289
|
+
dotnet_naming_symbols.private_fields.required_modifiers =
|
284
290
|
|
285
291
|
dotnet_naming_symbols.private_static_fields.applicable_kinds = field
|
286
292
|
dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
|
@@ -288,15 +294,15 @@ dotnet_naming_symbols.private_static_fields.required_modifiers = static
|
|
288
294
|
|
289
295
|
dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum
|
290
296
|
dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
291
|
-
dotnet_naming_symbols.types_and_namespaces.required_modifiers =
|
297
|
+
dotnet_naming_symbols.types_and_namespaces.required_modifiers =
|
292
298
|
|
293
299
|
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
294
300
|
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
295
|
-
dotnet_naming_symbols.non_field_members.required_modifiers =
|
301
|
+
dotnet_naming_symbols.non_field_members.required_modifiers =
|
296
302
|
|
297
303
|
dotnet_naming_symbols.type_parameters.applicable_kinds = namespace
|
298
304
|
dotnet_naming_symbols.type_parameters.applicable_accessibilities = *
|
299
|
-
dotnet_naming_symbols.type_parameters.required_modifiers =
|
305
|
+
dotnet_naming_symbols.type_parameters.required_modifiers =
|
300
306
|
|
301
307
|
dotnet_naming_symbols.private_constant_fields.applicable_kinds = field
|
302
308
|
dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
|
@@ -304,7 +310,7 @@ dotnet_naming_symbols.private_constant_fields.required_modifiers = const
|
|
304
310
|
|
305
311
|
dotnet_naming_symbols.local_variables.applicable_kinds = local
|
306
312
|
dotnet_naming_symbols.local_variables.applicable_accessibilities = local
|
307
|
-
dotnet_naming_symbols.local_variables.required_modifiers =
|
313
|
+
dotnet_naming_symbols.local_variables.required_modifiers =
|
308
314
|
|
309
315
|
dotnet_naming_symbols.local_constants.applicable_kinds = local
|
310
316
|
dotnet_naming_symbols.local_constants.applicable_accessibilities = local
|
@@ -312,7 +318,7 @@ dotnet_naming_symbols.local_constants.required_modifiers = const
|
|
312
318
|
|
313
319
|
dotnet_naming_symbols.parameters.applicable_kinds = parameter
|
314
320
|
dotnet_naming_symbols.parameters.applicable_accessibilities = *
|
315
|
-
dotnet_naming_symbols.parameters.required_modifiers =
|
321
|
+
dotnet_naming_symbols.parameters.required_modifiers =
|
316
322
|
|
317
323
|
dotnet_naming_symbols.public_constant_fields.applicable_kinds = field
|
318
324
|
dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal
|
@@ -328,37 +334,40 @@ dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readon
|
|
328
334
|
|
329
335
|
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
|
330
336
|
dotnet_naming_symbols.local_functions.applicable_accessibilities = *
|
331
|
-
dotnet_naming_symbols.local_functions.required_modifiers =
|
337
|
+
dotnet_naming_symbols.local_functions.required_modifiers =
|
332
338
|
|
333
339
|
# Naming styles
|
334
340
|
|
335
|
-
dotnet_naming_style.pascalcase.required_prefix =
|
336
|
-
dotnet_naming_style.pascalcase.required_suffix =
|
337
|
-
dotnet_naming_style.pascalcase.word_separator =
|
341
|
+
dotnet_naming_style.pascalcase.required_prefix =
|
342
|
+
dotnet_naming_style.pascalcase.required_suffix =
|
343
|
+
dotnet_naming_style.pascalcase.word_separator =
|
338
344
|
dotnet_naming_style.pascalcase.capitalization = pascal_case
|
339
345
|
|
340
346
|
dotnet_naming_style.ipascalcase.required_prefix = I
|
341
|
-
dotnet_naming_style.ipascalcase.required_suffix =
|
342
|
-
dotnet_naming_style.ipascalcase.word_separator =
|
347
|
+
dotnet_naming_style.ipascalcase.required_suffix =
|
348
|
+
dotnet_naming_style.ipascalcase.word_separator =
|
343
349
|
dotnet_naming_style.ipascalcase.capitalization = pascal_case
|
344
350
|
|
345
351
|
dotnet_naming_style.tpascalcase.required_prefix = T
|
346
|
-
dotnet_naming_style.tpascalcase.required_suffix =
|
347
|
-
dotnet_naming_style.tpascalcase.word_separator =
|
352
|
+
dotnet_naming_style.tpascalcase.required_suffix =
|
353
|
+
dotnet_naming_style.tpascalcase.word_separator =
|
348
354
|
dotnet_naming_style.tpascalcase.capitalization = pascal_case
|
349
355
|
|
350
356
|
dotnet_naming_style._camelcase.required_prefix = _
|
351
|
-
dotnet_naming_style._camelcase.required_suffix =
|
352
|
-
dotnet_naming_style._camelcase.word_separator =
|
357
|
+
dotnet_naming_style._camelcase.required_suffix =
|
358
|
+
dotnet_naming_style._camelcase.word_separator =
|
353
359
|
dotnet_naming_style._camelcase.capitalization = camel_case
|
354
360
|
|
355
|
-
dotnet_naming_style.camelcase.required_prefix =
|
356
|
-
dotnet_naming_style.camelcase.required_suffix =
|
357
|
-
dotnet_naming_style.camelcase.word_separator =
|
361
|
+
dotnet_naming_style.camelcase.required_prefix =
|
362
|
+
dotnet_naming_style.camelcase.required_suffix =
|
363
|
+
dotnet_naming_style.camelcase.word_separator =
|
358
364
|
dotnet_naming_style.camelcase.capitalization = camel_case
|
359
365
|
|
360
366
|
dotnet_naming_style.s_camelcase.required_prefix = s_
|
361
|
-
dotnet_naming_style.s_camelcase.required_suffix =
|
362
|
-
dotnet_naming_style.s_camelcase.word_separator =
|
367
|
+
dotnet_naming_style.s_camelcase.required_suffix =
|
368
|
+
dotnet_naming_style.s_camelcase.word_separator =
|
363
369
|
dotnet_naming_style.s_camelcase.capitalization = camel_case
|
364
370
|
|
371
|
+
[NuGetUpdater.Core.Test/FrameworkChecker/SupportedFrameworkFacts.cs]
|
372
|
+
generated_code = true
|
373
|
+
disable_formatter = true
|
@@ -8,6 +8,7 @@ using System.Globalization;
|
|
8
8
|
using System.IO;
|
9
9
|
using System.Linq;
|
10
10
|
using System.Reflection;
|
11
|
+
|
11
12
|
using NuGet.Common;
|
12
13
|
using NuGet.Packaging;
|
13
14
|
using NuGet.Packaging.Core;
|
@@ -84,7 +85,7 @@ namespace NuGet.CommandLine
|
|
84
85
|
}
|
85
86
|
|
86
87
|
builder.Properties.AddRange(assemblyMetadata.Properties);
|
87
|
-
// Let the id be
|
88
|
+
// Let the id be overridden by AssemblyMetadataAttribute
|
88
89
|
// This preserves the existing behavior if no id metadata
|
89
90
|
// is provided by the assembly.
|
90
91
|
if (builder.Properties.ContainsKey("id"))
|
@@ -11,9 +11,9 @@ internal sealed class Program
|
|
11
11
|
internal static async Task<int> Main(string[] args)
|
12
12
|
{
|
13
13
|
var exitCode = 0;
|
14
|
-
Action<int> setExitCode =
|
14
|
+
Action<int> setExitCode = code => exitCode = code;
|
15
15
|
|
16
|
-
var command = new RootCommand
|
16
|
+
var command = new RootCommand
|
17
17
|
{
|
18
18
|
FrameworkCheckCommand.GetCommand(setExitCode),
|
19
19
|
UpdateCommand.GetCommand(setExitCode),
|
@@ -16,186 +16,187 @@ public partial class EntryPointTests
|
|
16
16
|
[Fact]
|
17
17
|
public async Task WithSolution()
|
18
18
|
{
|
19
|
-
await Run(path =>
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
"""
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
"""
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
""")
|
108
|
-
});
|
19
|
+
await Run(path =>
|
20
|
+
[
|
21
|
+
"update",
|
22
|
+
"--repo-root",
|
23
|
+
path,
|
24
|
+
"--solution-or-project",
|
25
|
+
Path.Combine(path, "path/to/solution.sln"),
|
26
|
+
"--dependency",
|
27
|
+
"Newtonsoft.Json",
|
28
|
+
"--new-version",
|
29
|
+
"13.0.1",
|
30
|
+
"--previous-version",
|
31
|
+
"7.0.1",
|
32
|
+
],
|
33
|
+
[
|
34
|
+
("path/to/solution.sln", """
|
35
|
+
Microsoft Visual Studio Solution File, Format Version 12.00
|
36
|
+
# Visual Studio 14
|
37
|
+
VisualStudioVersion = 14.0.22705.0
|
38
|
+
MinimumVisualStudioVersion = 10.0.40219.1
|
39
|
+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "my", "my.csproj", "{782E0C0A-10D3-444D-9640-263D03D2B20C}"
|
40
|
+
EndProject
|
41
|
+
Global
|
42
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
43
|
+
Debug|Any CPU = Debug|Any CPU
|
44
|
+
Release|Any CPU = Release|Any CPU
|
45
|
+
EndGlobalSection
|
46
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
47
|
+
{782E0C0A-10D3-444D-9640-263D03D2B20C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
48
|
+
{782E0C0A-10D3-444D-9640-263D03D2B20C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
49
|
+
{782E0C0A-10D3-444D-9640-263D03D2B20C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
50
|
+
{782E0C0A-10D3-444D-9640-263D03D2B20C}.Release|Any CPU.Build.0 = Release|Any CPU
|
51
|
+
EndGlobalSection
|
52
|
+
GlobalSection(SolutionProperties) = preSolution
|
53
|
+
HideSolutionNode = FALSE
|
54
|
+
EndGlobalSection
|
55
|
+
EndGlobal
|
56
|
+
"""),
|
57
|
+
("path/to/my.csproj", """
|
58
|
+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
59
|
+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
60
|
+
<PropertyGroup>
|
61
|
+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
62
|
+
</PropertyGroup>
|
63
|
+
<ItemGroup>
|
64
|
+
<None Include="packages.config" />
|
65
|
+
</ItemGroup>
|
66
|
+
<ItemGroup>
|
67
|
+
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
|
68
|
+
<HintPath>packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
69
|
+
<Private>True</Private>
|
70
|
+
</Reference>
|
71
|
+
</ItemGroup>
|
72
|
+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
73
|
+
</Project>
|
74
|
+
"""),
|
75
|
+
("path/to/packages.config", """
|
76
|
+
<packages>
|
77
|
+
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
|
78
|
+
</packages>
|
79
|
+
""")
|
80
|
+
],
|
81
|
+
[
|
82
|
+
("path/to/my.csproj", """
|
83
|
+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
84
|
+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
85
|
+
<PropertyGroup>
|
86
|
+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
87
|
+
</PropertyGroup>
|
88
|
+
<ItemGroup>
|
89
|
+
<None Include="packages.config" />
|
90
|
+
</ItemGroup>
|
91
|
+
<ItemGroup>
|
92
|
+
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
|
93
|
+
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
94
|
+
<Private>True</Private>
|
95
|
+
</Reference>
|
96
|
+
</ItemGroup>
|
97
|
+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
98
|
+
</Project>
|
99
|
+
"""),
|
100
|
+
("path/to/packages.config", """
|
101
|
+
<?xml version="1.0" encoding="utf-8"?>
|
102
|
+
<packages>
|
103
|
+
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net45" />
|
104
|
+
</packages>
|
105
|
+
""")
|
106
|
+
]);
|
109
107
|
}
|
110
108
|
|
111
109
|
[Fact]
|
112
110
|
public async Task WithProject()
|
113
111
|
{
|
114
|
-
await Run(path =>
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
"""
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
""")
|
181
|
-
});
|
112
|
+
await Run(path =>
|
113
|
+
[
|
114
|
+
"update",
|
115
|
+
"--repo-root",
|
116
|
+
path,
|
117
|
+
"--solution-or-project",
|
118
|
+
Path.Combine(path, "path/to/my.csproj"),
|
119
|
+
"--dependency",
|
120
|
+
"Newtonsoft.Json",
|
121
|
+
"--new-version",
|
122
|
+
"13.0.1",
|
123
|
+
"--previous-version",
|
124
|
+
"7.0.1",
|
125
|
+
"--verbose"
|
126
|
+
],
|
127
|
+
[
|
128
|
+
("path/to/my.csproj", """
|
129
|
+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
130
|
+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
131
|
+
<PropertyGroup>
|
132
|
+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
133
|
+
</PropertyGroup>
|
134
|
+
<ItemGroup>
|
135
|
+
<None Include="packages.config" />
|
136
|
+
</ItemGroup>
|
137
|
+
<ItemGroup>
|
138
|
+
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
|
139
|
+
<HintPath>packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
140
|
+
<Private>True</Private>
|
141
|
+
</Reference>
|
142
|
+
</ItemGroup>
|
143
|
+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
144
|
+
</Project>
|
145
|
+
"""),
|
146
|
+
("path/to/packages.config", """
|
147
|
+
<packages>
|
148
|
+
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
|
149
|
+
</packages>
|
150
|
+
""")
|
151
|
+
],
|
152
|
+
[
|
153
|
+
("path/to/my.csproj", """
|
154
|
+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
155
|
+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
156
|
+
<PropertyGroup>
|
157
|
+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
158
|
+
</PropertyGroup>
|
159
|
+
<ItemGroup>
|
160
|
+
<None Include="packages.config" />
|
161
|
+
</ItemGroup>
|
162
|
+
<ItemGroup>
|
163
|
+
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
|
164
|
+
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
165
|
+
<Private>True</Private>
|
166
|
+
</Reference>
|
167
|
+
</ItemGroup>
|
168
|
+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
169
|
+
</Project>
|
170
|
+
"""),
|
171
|
+
("path/to/packages.config", """
|
172
|
+
<?xml version="1.0" encoding="utf-8"?>
|
173
|
+
<packages>
|
174
|
+
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net45" />
|
175
|
+
</packages>
|
176
|
+
""")
|
177
|
+
]);
|
182
178
|
}
|
183
179
|
|
184
180
|
[Fact]
|
185
181
|
public async Task WithDirsProjAndDirectoryBuildPropsThatIsOutOfDirectoryButStillMatchingThePackage()
|
186
182
|
{
|
187
|
-
await Run(path =>
|
188
|
-
|
183
|
+
await Run(path =>
|
184
|
+
[
|
189
185
|
"update",
|
190
|
-
"--repo-root",
|
191
|
-
|
192
|
-
"--
|
193
|
-
"
|
194
|
-
"--
|
186
|
+
"--repo-root",
|
187
|
+
path,
|
188
|
+
"--solution-or-project",
|
189
|
+
$"{path}/some-dir/dirs.proj",
|
190
|
+
"--dependency",
|
191
|
+
"NuGet.Versioning",
|
192
|
+
"--new-version",
|
193
|
+
"6.6.1",
|
194
|
+
"--previous-version",
|
195
|
+
"6.1.0",
|
195
196
|
"--verbose"
|
196
|
-
|
197
|
-
initialFiles:
|
198
|
-
|
197
|
+
],
|
198
|
+
initialFiles:
|
199
|
+
[
|
199
200
|
("some-dir/dirs.proj", """
|
200
201
|
<Project Sdk="Microsoft.Build.Traversal">
|
201
202
|
<ItemGroup>
|
@@ -232,16 +233,16 @@ public partial class EntryPointTests
|
|
232
233
|
"""),
|
233
234
|
("other-dir/Directory.Build.props", """
|
234
235
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
235
|
-
|
236
|
+
|
236
237
|
<ItemGroup>
|
237
238
|
<PackageReference Include="NuGet.Versioning" Version="6.1.0" />
|
238
239
|
</ItemGroup>
|
239
240
|
|
240
241
|
</Project>
|
241
242
|
""")
|
242
|
-
|
243
|
-
expectedFiles:
|
244
|
-
|
243
|
+
],
|
244
|
+
expectedFiles:
|
245
|
+
[
|
245
246
|
("some-dir/dirs.proj", """
|
246
247
|
<Project Sdk="Microsoft.Build.Traversal">
|
247
248
|
<ItemGroup>
|
@@ -250,7 +251,8 @@ public partial class EntryPointTests
|
|
250
251
|
</ItemGroup>
|
251
252
|
</Project>
|
252
253
|
"""),
|
253
|
-
("some-dir/project1/project.csproj",
|
254
|
+
("some-dir/project1/project.csproj",
|
255
|
+
"""
|
254
256
|
<Project Sdk="Microsoft.NET.Sdk">
|
255
257
|
<PropertyGroup>
|
256
258
|
<OutputType>Exe</OutputType>
|
@@ -278,20 +280,20 @@ public partial class EntryPointTests
|
|
278
280
|
"""),
|
279
281
|
("other-dir/Directory.Build.props", """
|
280
282
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
281
|
-
|
283
|
+
|
282
284
|
<ItemGroup>
|
283
285
|
<PackageReference Include="NuGet.Versioning" Version="6.1.0" />
|
284
286
|
</ItemGroup>
|
285
287
|
|
286
288
|
</Project>
|
287
289
|
""")
|
288
|
-
|
290
|
+
]
|
289
291
|
);
|
290
292
|
}
|
291
293
|
|
292
294
|
private static async Task Run(Func<string, string[]> getArgs, (string Path, string Content)[] initialFiles, (string, string)[] expectedFiles)
|
293
295
|
{
|
294
|
-
var actualFiles = await RunUpdate(initialFiles, async
|
296
|
+
var actualFiles = await RunUpdate(initialFiles, async path =>
|
295
297
|
{
|
296
298
|
var sb = new StringBuilder();
|
297
299
|
var writer = new StringWriter(sb);
|