dependabot-nuget 0.245.0 → 0.246.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (22) hide show
  1. checksums.yaml +4 -4
  2. data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/PackagesConfigUpdater.cs +42 -7
  3. data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/SdkPackageUpdater.cs +164 -90
  4. data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/UpdaterWorker.cs +38 -2
  5. data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/MSBuildHelper.cs +57 -17
  6. data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/NuGetHelper.cs +1 -1
  7. data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTestBase.cs +115 -14
  8. data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/{UpdateWorker.DirsProj.cs → UpdateWorkerTests.DirsProj.cs} +22 -24
  9. data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.PackagesConfig.cs +66 -0
  10. data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.Sdk.cs +355 -83
  11. data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MSBuildHelperTests.cs +7 -4
  12. data/lib/dependabot/nuget/file_parser/project_file_parser.rb +0 -4
  13. data/lib/dependabot/nuget/file_parser.rb +15 -1
  14. data/lib/dependabot/nuget/http_response_helpers.rb +14 -0
  15. data/lib/dependabot/nuget/metadata_finder.rb +6 -2
  16. data/lib/dependabot/nuget/nuget_client.rb +8 -13
  17. data/lib/dependabot/nuget/update_checker/dependency_finder.rb +23 -13
  18. data/lib/dependabot/nuget/update_checker/nupkg_fetcher.rb +75 -11
  19. data/lib/dependabot/nuget/update_checker/repository_finder.rb +4 -10
  20. data/lib/dependabot/nuget/update_checker.rb +2 -3
  21. metadata +7 -7
  22. data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/SdkPackageUpdaterTests.cs +0 -317
@@ -6,10 +6,61 @@ using System.Threading.Tasks;
6
6
 
7
7
  using Xunit;
8
8
 
9
+ using TestFile = (string Path, string Content);
10
+ using TestProject = (string Path, string Content, System.Guid ProjectId);
11
+
9
12
  namespace NuGetUpdater.Core.Test.Update;
10
13
 
11
14
  public abstract class UpdateWorkerTestBase
12
15
  {
16
+ protected static Task TestNoChange(
17
+ string dependencyName,
18
+ string oldVersion,
19
+ string newVersion,
20
+ bool useSolution,
21
+ string projectContents,
22
+ bool isTransitive = false,
23
+ (string Path, string Content)[]? additionalFiles = null,
24
+ string projectFilePath = "test-project.csproj")
25
+ {
26
+ return useSolution
27
+ ? TestNoChangeforSolution(dependencyName, oldVersion, newVersion, projectFiles: [(projectFilePath, projectContents)], isTransitive, additionalFiles)
28
+ : TestNoChangeforProject(dependencyName, oldVersion, newVersion, projectContents, isTransitive, additionalFiles, projectFilePath);
29
+ }
30
+
31
+ protected static Task TestUpdate(
32
+ string dependencyName,
33
+ string oldVersion,
34
+ string newVersion,
35
+ bool useSolution,
36
+ string projectContents,
37
+ string expectedProjectContents,
38
+ bool isTransitive = false,
39
+ TestFile[]? additionalFiles = null,
40
+ TestFile[]? additionalFilesExpected = null,
41
+ string projectFilePath = "test-project.csproj")
42
+ {
43
+ return useSolution
44
+ ? TestUpdateForSolution(dependencyName, oldVersion, newVersion, projectFiles: [(projectFilePath, projectContents)], projectFilesExpected: [(projectFilePath, expectedProjectContents)], isTransitive, additionalFiles, additionalFilesExpected)
45
+ : TestUpdateForProject(dependencyName, oldVersion, newVersion, projectFile: (projectFilePath, projectContents), expectedProjectContents, isTransitive, additionalFiles, additionalFilesExpected);
46
+ }
47
+
48
+ protected static Task TestUpdate(
49
+ string dependencyName,
50
+ string oldVersion,
51
+ string newVersion,
52
+ bool useSolution,
53
+ TestFile projectFile,
54
+ string expectedProjectContents,
55
+ bool isTransitive = false,
56
+ TestFile[]? additionalFiles = null,
57
+ TestFile[]? additionalFilesExpected = null)
58
+ {
59
+ return useSolution
60
+ ? TestUpdateForSolution(dependencyName, oldVersion, newVersion, projectFiles: [projectFile], projectFilesExpected: [(projectFile.Path, expectedProjectContents)], isTransitive, additionalFiles, additionalFilesExpected)
61
+ : TestUpdateForProject(dependencyName, oldVersion, newVersion, projectFile, expectedProjectContents, isTransitive, additionalFiles, additionalFilesExpected);
62
+ }
63
+
13
64
  protected static Task TestNoChangeforProject(
14
65
  string dependencyName,
15
66
  string oldVersion,
@@ -35,8 +86,8 @@ public abstract class UpdateWorkerTestBase
35
86
  string projectContents,
36
87
  string expectedProjectContents,
37
88
  bool isTransitive = false,
38
- (string Path, string Content)[]? additionalFiles = null,
39
- (string Path, string Content)[]? additionalFilesExpected = null,
89
+ TestFile[]? additionalFiles = null,
90
+ TestFile[]? additionalFilesExpected = null,
40
91
  string projectFilePath = "test-project.csproj")
41
92
  => TestUpdateForProject(
42
93
  dependencyName,
@@ -52,42 +103,92 @@ public abstract class UpdateWorkerTestBase
52
103
  string dependencyName,
53
104
  string oldVersion,
54
105
  string newVersion,
55
- (string Path, string Content) projectFile,
106
+ TestFile projectFile,
56
107
  string expectedProjectContents,
57
108
  bool isTransitive = false,
58
- (string Path, string Content)[]? additionalFiles = null,
59
- (string Path, string Content)[]? additionalFilesExpected = null)
109
+ TestFile[]? additionalFiles = null,
110
+ TestFile[]? additionalFilesExpected = null)
60
111
  {
61
112
  additionalFiles ??= [];
62
113
  additionalFilesExpected ??= [];
63
114
 
64
115
  var projectFilePath = projectFile.Path;
65
- var projectName = Path.GetFileNameWithoutExtension(projectFilePath);
116
+ var testFiles = new[] { projectFile }.Concat(additionalFiles).ToArray();
117
+
118
+ var actualResult = await RunUpdate(testFiles, async temporaryDirectory =>
119
+ {
120
+ var worker = new UpdaterWorker(new Logger(verbose: true));
121
+ await worker.RunAsync(temporaryDirectory, projectFilePath, dependencyName, oldVersion, newVersion, isTransitive);
122
+ });
123
+
124
+ var expectedResult = additionalFilesExpected.Prepend((projectFilePath, expectedProjectContents)).ToArray();
125
+
126
+ AssertContainsFiles(expectedResult, actualResult);
127
+ }
128
+
129
+ protected static Task TestNoChangeforSolution(
130
+ string dependencyName,
131
+ string oldVersion,
132
+ string newVersion,
133
+ TestFile[] projectFiles,
134
+ bool isTransitive = false,
135
+ TestFile[]? additionalFiles = null)
136
+ => TestUpdateForSolution(
137
+ dependencyName,
138
+ oldVersion,
139
+ newVersion,
140
+ projectFiles,
141
+ projectFilesExpected: projectFiles,
142
+ isTransitive,
143
+ additionalFiles,
144
+ additionalFilesExpected: additionalFiles);
145
+
146
+ protected static async Task TestUpdateForSolution(
147
+ string dependencyName,
148
+ string oldVersion,
149
+ string newVersion,
150
+ TestFile[] projectFiles,
151
+ TestFile[] projectFilesExpected,
152
+ bool isTransitive = false,
153
+ TestFile[]? additionalFiles = null,
154
+ TestFile[]? additionalFilesExpected = null)
155
+ {
156
+ additionalFiles ??= [];
157
+ additionalFilesExpected ??= [];
158
+
159
+ var testProjects = projectFiles.Select(file => new TestProject(file.Path, file.Content, Guid.NewGuid())).ToArray();
160
+ var projectDeclarations = testProjects.Select(project => $$"""
161
+ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{Path.GetFileNameWithoutExtension(project.Path)}}", "{{project.Path}}", "{{project.ProjectId}}"
162
+ EndProject
163
+ """);
164
+ var debugConfiguration = testProjects.Select(project => $$"""
165
+ {{project.ProjectId}}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
166
+ {{project.ProjectId}}.Debug|Any CPU.Build.0 = Debug|Any CPU
167
+ {{project.ProjectId}}..Release|Any CPU.ActiveCfg = Release|Any CPU
168
+ {{project.ProjectId}}..Release|Any CPU.Build.0 = Release|Any CPU
169
+ """);
170
+
66
171
  var slnName = "test-solution.sln";
67
172
  var slnContent = $$"""
68
173
  Microsoft Visual Studio Solution File, Format Version 12.00
69
174
  # Visual Studio 14
70
175
  VisualStudioVersion = 14.0.22705.0
71
176
  MinimumVisualStudioVersion = 10.0.40219.1
72
- Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{projectName}}", "{{projectFilePath}}", "{782E0C0A-10D3-444D-9640-263D03D2B20C}"
73
- EndProject
177
+ {{string.Join(Environment.NewLine, projectDeclarations)}}
74
178
  Global
75
179
  GlobalSection(SolutionConfigurationPlatforms) = preSolution
76
180
  Debug|Any CPU = Debug|Any CPU
77
181
  Release|Any CPU = Release|Any CPU
78
182
  EndGlobalSection
79
183
  GlobalSection(ProjectConfigurationPlatforms) = postSolution
80
- {782E0C0A-10D3-444D-9640-263D03D2B20C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
81
- {782E0C0A-10D3-444D-9640-263D03D2B20C}.Debug|Any CPU.Build.0 = Debug|Any CPU
82
- {782E0C0A-10D3-444D-9640-263D03D2B20C}.Release|Any CPU.ActiveCfg = Release|Any CPU
83
- {782E0C0A-10D3-444D-9640-263D03D2B20C}.Release|Any CPU.Build.0 = Release|Any CPU
184
+ {{string.Join(Environment.NewLine, debugConfiguration)}}
84
185
  EndGlobalSection
85
186
  GlobalSection(SolutionProperties) = preSolution
86
187
  HideSolutionNode = FALSE
87
188
  EndGlobalSection
88
189
  EndGlobal
89
190
  """;
90
- var testFiles = new[] { (slnName, slnContent), projectFile }.Concat(additionalFiles).ToArray();
191
+ var testFiles = new[] { (slnName, slnContent) }.Concat(projectFiles).Concat(additionalFiles).ToArray();
91
192
 
92
193
  var actualResult = await RunUpdate(testFiles, async temporaryDirectory =>
93
194
  {
@@ -96,7 +197,7 @@ public abstract class UpdateWorkerTestBase
96
197
  await worker.RunAsync(temporaryDirectory, slnPath, dependencyName, oldVersion, newVersion, isTransitive);
97
198
  });
98
199
 
99
- var expectedResult = additionalFilesExpected.Prepend((projectFilePath, expectedProjectContents)).ToArray();
200
+ var expectedResult = projectFilesExpected.Concat(additionalFilesExpected).ToArray();
100
201
 
101
202
  AssertContainsFiles(expectedResult, actualResult);
102
203
  }
@@ -1,5 +1,3 @@
1
- using System;
2
- using System.Collections.Generic;
3
1
  using System.IO;
4
2
  using System.Linq;
5
3
  using System.Threading.Tasks;
@@ -24,7 +22,7 @@ public partial class UpdateWorkerTests
24
22
  // initial
25
23
  projectContents: """
26
24
  <Project Sdk="Microsoft.Build.NoTargets">
27
-
25
+
28
26
  <ItemGroup>
29
27
  <ProjectReference Include="src/test-project.csproj" />
30
28
  </ItemGroup>
@@ -39,7 +37,7 @@ public partial class UpdateWorkerTests
39
37
  <PropertyGroup>
40
38
  <TargetFramework>netstandard2.0</TargetFramework>
41
39
  </PropertyGroup>
42
-
40
+
43
41
  <ItemGroup>
44
42
  <PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
45
43
  </ItemGroup>
@@ -49,7 +47,7 @@ public partial class UpdateWorkerTests
49
47
  // expected
50
48
  expectedProjectContents: """
51
49
  <Project Sdk="Microsoft.Build.NoTargets">
52
-
50
+
53
51
  <ItemGroup>
54
52
  <ProjectReference Include="src/test-project.csproj" />
55
53
  </ItemGroup>
@@ -64,7 +62,7 @@ public partial class UpdateWorkerTests
64
62
  <PropertyGroup>
65
63
  <TargetFramework>netstandard2.0</TargetFramework>
66
64
  </PropertyGroup>
67
-
65
+
68
66
  <ItemGroup>
69
67
  <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
70
68
  </ItemGroup>
@@ -101,7 +99,7 @@ public partial class UpdateWorkerTests
101
99
  // initial
102
100
  projectContents: """
103
101
  <Project Sdk="Microsoft.Build.NoTargets">
104
-
102
+
105
103
  <ItemGroup>
106
104
  <ProjectReference Include="src/dirs.proj" />
107
105
  </ItemGroup>
@@ -113,7 +111,7 @@ public partial class UpdateWorkerTests
113
111
  ("src/dirs.proj",
114
112
  """
115
113
  <Project Sdk="Microsoft.Build.NoTargets">
116
-
114
+
117
115
  <ItemGroup>
118
116
  <ProjectReference Include="test-project/test-project.csproj" />
119
117
  </ItemGroup>
@@ -126,7 +124,7 @@ public partial class UpdateWorkerTests
126
124
  <PropertyGroup>
127
125
  <TargetFramework>netstandard2.0</TargetFramework>
128
126
  </PropertyGroup>
129
-
127
+
130
128
  <ItemGroup>
131
129
  <PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
132
130
  </ItemGroup>
@@ -136,7 +134,7 @@ public partial class UpdateWorkerTests
136
134
  // expected
137
135
  expectedProjectContents: """
138
136
  <Project Sdk="Microsoft.Build.NoTargets">
139
-
137
+
140
138
  <ItemGroup>
141
139
  <ProjectReference Include="src/dirs.proj" />
142
140
  </ItemGroup>
@@ -148,7 +146,7 @@ public partial class UpdateWorkerTests
148
146
  ("src/dirs.proj",
149
147
  """
150
148
  <Project Sdk="Microsoft.Build.NoTargets">
151
-
149
+
152
150
  <ItemGroup>
153
151
  <ProjectReference Include="test-project/test-project.csproj" />
154
152
  </ItemGroup>
@@ -161,7 +159,7 @@ public partial class UpdateWorkerTests
161
159
  <PropertyGroup>
162
160
  <TargetFramework>netstandard2.0</TargetFramework>
163
161
  </PropertyGroup>
164
-
162
+
165
163
  <ItemGroup>
166
164
  <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
167
165
  </ItemGroup>
@@ -177,7 +175,7 @@ public partial class UpdateWorkerTests
177
175
  // initial
178
176
  projectContents: """
179
177
  <Project Sdk="Microsoft.Build.NoTargets">
180
-
178
+
181
179
  <ItemGroup>
182
180
  <ProjectReference Include="src/*.proj" />
183
181
  </ItemGroup>
@@ -189,7 +187,7 @@ public partial class UpdateWorkerTests
189
187
  ("src/dirs.proj",
190
188
  """
191
189
  <Project Sdk="Microsoft.Build.NoTargets">
192
-
190
+
193
191
  <ItemGroup>
194
192
  <ProjectReference Include="test-project/test-project.csproj" />
195
193
  </ItemGroup>
@@ -202,7 +200,7 @@ public partial class UpdateWorkerTests
202
200
  <PropertyGroup>
203
201
  <TargetFramework>netstandard2.0</TargetFramework>
204
202
  </PropertyGroup>
205
-
203
+
206
204
  <ItemGroup>
207
205
  <PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
208
206
  </ItemGroup>
@@ -212,7 +210,7 @@ public partial class UpdateWorkerTests
212
210
  // expected
213
211
  expectedProjectContents: """
214
212
  <Project Sdk="Microsoft.Build.NoTargets">
215
-
213
+
216
214
  <ItemGroup>
217
215
  <ProjectReference Include="src/*.proj" />
218
216
  </ItemGroup>
@@ -224,7 +222,7 @@ public partial class UpdateWorkerTests
224
222
  ("src/dirs.proj",
225
223
  """
226
224
  <Project Sdk="Microsoft.Build.NoTargets">
227
-
225
+
228
226
  <ItemGroup>
229
227
  <ProjectReference Include="test-project/test-project.csproj" />
230
228
  </ItemGroup>
@@ -237,7 +235,7 @@ public partial class UpdateWorkerTests
237
235
  <PropertyGroup>
238
236
  <TargetFramework>netstandard2.0</TargetFramework>
239
237
  </PropertyGroup>
240
-
238
+
241
239
  <ItemGroup>
242
240
  <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
243
241
  </ItemGroup>
@@ -253,7 +251,7 @@ public partial class UpdateWorkerTests
253
251
  // initial
254
252
  projectContents: """
255
253
  <Project Sdk="Microsoft.Build.NoTargets">
256
-
254
+
257
255
  <ItemGroup>
258
256
  <ProjectReference Include="**/*.proj" />
259
257
  </ItemGroup>
@@ -265,7 +263,7 @@ public partial class UpdateWorkerTests
265
263
  ("src/dirs.proj",
266
264
  """
267
265
  <Project Sdk="Microsoft.Build.NoTargets">
268
-
266
+
269
267
  <ItemGroup>
270
268
  <ProjectReference Include="test-project/test-project.csproj" />
271
269
  </ItemGroup>
@@ -278,7 +276,7 @@ public partial class UpdateWorkerTests
278
276
  <PropertyGroup>
279
277
  <TargetFramework>netstandard2.0</TargetFramework>
280
278
  </PropertyGroup>
281
-
279
+
282
280
  <ItemGroup>
283
281
  <PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
284
282
  </ItemGroup>
@@ -288,7 +286,7 @@ public partial class UpdateWorkerTests
288
286
  // expected
289
287
  expectedProjectContents: """
290
288
  <Project Sdk="Microsoft.Build.NoTargets">
291
-
289
+
292
290
  <ItemGroup>
293
291
  <ProjectReference Include="**/*.proj" />
294
292
  </ItemGroup>
@@ -300,7 +298,7 @@ public partial class UpdateWorkerTests
300
298
  ("src/dirs.proj",
301
299
  """
302
300
  <Project Sdk="Microsoft.Build.NoTargets">
303
-
301
+
304
302
  <ItemGroup>
305
303
  <ProjectReference Include="test-project/test-project.csproj" />
306
304
  </ItemGroup>
@@ -313,7 +311,7 @@ public partial class UpdateWorkerTests
313
311
  <PropertyGroup>
314
312
  <TargetFramework>netstandard2.0</TargetFramework>
315
313
  </PropertyGroup>
316
-
314
+
317
315
  <ItemGroup>
318
316
  <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
319
317
  </ItemGroup>
@@ -1072,6 +1072,72 @@ public partial class UpdateWorkerTests
1072
1072
  """);
1073
1073
  }
1074
1074
 
1075
+ [Fact]
1076
+ public async Task PackageCanBeUpdatedWhenAnotherInstalledPackageHasBeenDelisted()
1077
+ {
1078
+ // updating one package (Newtonsoft.Json) when another installed package (FSharp.Core/5.0.3-beta.21369.4) has been delisted
1079
+ await TestUpdateForProject("Newtonsoft.Json", "7.0.1", "13.0.1",
1080
+ // existing
1081
+ projectContents: """
1082
+ <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1083
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1084
+ <PropertyGroup>
1085
+ <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
1086
+ </PropertyGroup>
1087
+ <ItemGroup>
1088
+ <None Include="packages.config" />
1089
+ </ItemGroup>
1090
+ <ItemGroup>
1091
+ <Reference Include="FSharp.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
1092
+ <HintPath>packages\FSharp.Core.5.0.3-beta.21369.4\lib\netstandard2.0\FSharp.Core.dll</HintPath>
1093
+ <Private>True</Private>
1094
+ </Reference>
1095
+ <Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
1096
+ <HintPath>packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
1097
+ <Private>True</Private>
1098
+ </Reference>
1099
+ </ItemGroup>
1100
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1101
+ </Project>
1102
+ """,
1103
+ packagesConfigContents: """
1104
+ <packages>
1105
+ <package id="FSharp.Core" version="5.0.3-beta.21369.4" targetFramework="net462" />
1106
+ <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net462" />
1107
+ </packages>
1108
+ """,
1109
+ // expected
1110
+ expectedProjectContents: """
1111
+ <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1112
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1113
+ <PropertyGroup>
1114
+ <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
1115
+ </PropertyGroup>
1116
+ <ItemGroup>
1117
+ <None Include="packages.config" />
1118
+ </ItemGroup>
1119
+ <ItemGroup>
1120
+ <Reference Include="FSharp.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
1121
+ <HintPath>packages\FSharp.Core.5.0.3-beta.21369.4\lib\netstandard2.0\FSharp.Core.dll</HintPath>
1122
+ <Private>True</Private>
1123
+ </Reference>
1124
+ <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
1125
+ <HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
1126
+ <Private>True</Private>
1127
+ </Reference>
1128
+ </ItemGroup>
1129
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1130
+ </Project>
1131
+ """,
1132
+ expectedPackagesConfigContents: """
1133
+ <?xml version="1.0" encoding="utf-8"?>
1134
+ <packages>
1135
+ <package id="FSharp.Core" version="5.0.3-beta.21369.4" targetFramework="net462" />
1136
+ <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
1137
+ </packages>
1138
+ """);
1139
+ }
1140
+
1075
1141
  protected static Task TestUpdateForProject(
1076
1142
  string dependencyName,
1077
1143
  string oldVersion,