Skip to content

Commit 20d1679

Browse files
authored
fix(dotnet-windows): specify versions for dotnet packages to prevent errors in Windows (#4782)
Fixes errors preventing Windows environment test from succeeding. ``` @jsii/dotnet-runtime: Failed to restore D:\a\jsii\jsii\packages\@jsii\dotnet-runtime\src\Amazon.JSII.Analyzers.UnitTests\Amazon.JSII.Analyzers.UnitTests.csproj (in 41.02 sec). @jsii/dotnet-runtime: Failed to restore D:\a\jsii\jsii\packages\@jsii\dotnet-runtime\src\Amazon.JSII.Runtime.UnitTests\Amazon.JSII.Runtime.UnitTests.csproj (in 41.02 sec). ``` ``` @jsii/dotnet-runtime-test: Failed to restore D:\a\jsii\jsii\packages\@jsii\dotnet-runtime-test\test\Amazon.JSII.Runtime.IntegrationTests\Amazon.JSII.Runtime.IntegrationTests.csproj (in 18.44 sec). ``` Several instances of NU1604 `Warning as Error`: ``` @jsii/dotnet-runtime-test: D:\a\jsii\jsii\packages\@jsii\dotnet-runtime-test\test\Amazon.JSII.Runtime.IntegrationTests\Amazon.JSII.Runtime.IntegrationTests.csproj : error NU1604: Warning As Error: Project dependency Microsoft.Extensions.Logging does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results. ``` --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
1 parent 032a24e commit 20d1679

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/Amazon.JSII.Runtime.IntegrationTests.csproj

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
</ItemGroup>
2121

2222
<ItemGroup>
23-
<PackageReference Include="Microsoft.Extensions.Logging" />
24-
<PackageReference Include="Microsoft.NET.Test.Sdk" />
25-
<PackageReference Include="Newtonsoft.Json" />
26-
<PackageReference Include="xunit" />
27-
<PackageReference Include="xunit.runner.visualstudio" />
28-
<PackageReference Include="XunitXml.TestLogger" />
23+
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.1" />
24+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
25+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
26+
<PackageReference Include="xunit" Version="2.9.3" />
27+
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1" />
28+
<PackageReference Include="XunitXml.TestLogger" Version="3.1.17" />
2929
</ItemGroup>
3030

3131
<ItemGroup>

packages/@jsii/dotnet-runtime/src/Amazon.JSII.Analyzers.UnitTests/Amazon.JSII.Analyzers.UnitTests.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
</PropertyGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" />
19-
<PackageReference Include="Microsoft.NET.Test.Sdk" />
20-
<PackageReference Include="xunit" />
21-
<PackageReference Include="xunit.runner.visualstudio" />
18+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="[4.12.0,)" />
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="[17.12.0,)" />
20+
<PackageReference Include="xunit" Version="[2.9.3,)" />
21+
<PackageReference Include="xunit.runner.visualstudio" Version="[3.0.1,)" />
2222
<ProjectReference Include="..\Amazon.JSII.Analyzers\Amazon.JSII.Analyzers.csproj" />
2323
</ItemGroup>
2424

packages/@jsii/dotnet-runtime/src/Amazon.JSII.Analyzers/Amazon.JSII.Analyzers.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
</PropertyGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" PrivateAssets="all" />
17-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" PrivateAssets="all" />
18-
<PackageReference Include="Microsoft.CodeQuality.Analyzers" PrivateAssets="all" />
16+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="[3.11.0,)" PrivateAssets="all" />
17+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="[4.12.0,)" PrivateAssets="all" />
18+
<PackageReference Include="Microsoft.CodeQuality.Analyzers" Version="[3.3.2,)" PrivateAssets="all" />
1919
</ItemGroup>
2020

2121
<ItemGroup>

packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Amazon.JSII.Runtime.UnitTests.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
</PropertyGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="Microsoft.NET.Test.Sdk" />
22-
<PackageReference Include="NSubstitute" />
23-
<PackageReference Include="xunit" />
24-
<PackageReference Include="xunit.runner.visualstudio" />
21+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="[17.12.0,)" />
22+
<PackageReference Include="NSubstitute" Version="[5.3.0,)" />
23+
<PackageReference Include="xunit" Version="[2.9.3,)" />
24+
<PackageReference Include="xunit.runner.visualstudio" Version="[3.0.1,)" />
2525
</ItemGroup>
2626

2727
<ItemGroup>

packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Amazon.JSII.Runtime.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
</PropertyGroup>
2424

2525
<ItemGroup>
26-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
27-
<PackageReference Include="Microsoft.Extensions.Logging" />
28-
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
29-
<PackageReference Include="Newtonsoft.Json" />
26+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="[9.0.1,)" />
27+
<PackageReference Include="Microsoft.Extensions.Logging" Version="[9.0.1,)" />
28+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="[9.0.1,)" />
29+
<PackageReference Include="Newtonsoft.Json" Version="[13.0.3,)" />
3030
</ItemGroup>
3131

3232
<ItemGroup>

0 commit comments

Comments
 (0)