Skip to content

Commit 525a45d

Browse files
authored
[Java.Interop.Dynamic-Tests] Use Microsoft.CSharp NuGet package (#1067)
Each CI job reports the following warnings: C:\hostedtoolcache\windows\dotnet\sdk\7.0.100-rc.1.22431.12\Microsoft.Common.CurrentVersion.targets(2350,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.CSharp". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. C:\hostedtoolcache\windows\dotnet\sdk\7.0.100-rc.1.22431.12\Microsoft.Common.CurrentVersion.targets(2350,5): warning MSB3243: No way to resolve conflict between "Microsoft.CSharp, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "Microsoft.CSharp". Choosing "Microsoft.CSharp, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. Fix these warnings by using a `@(PackageReference)` to [`Microsoft.CSharp`][0] instead of a `@(Reference)`. [0]: https://www.nuget.org/packages/Microsoft.CSharp
1 parent 149d70f commit 525a45d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Directory.Build.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<PackageReference Update="Microsoft.Build.Framework" Version="17.3.2" />
1818
<PackageReference Update="Microsoft.Build.Utilities.Core" Version="17.3.2" />
1919
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" />
20+
<PackageReference Update="Microsoft.CSharp" Version="4.7.0" />
2021
<PackageReference Update="Microsoft.DotNet.GenAPI" Version="7.0.0-beta.22103.1" />
2122
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.5.0-preview-20221003-04" />
2223
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />

tests/Java.Interop.Dynamic-Tests/Java.Interop.Dynamic-Tests.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
</PropertyGroup>
1414

1515
<ItemGroup>
16-
<Reference Include="Microsoft.CSharp" />
17-
</ItemGroup>
18-
19-
<ItemGroup>
16+
<PackageReference Include="Microsoft.CSharp" />
2017
<PackageReference Include="Microsoft.NET.Test.Sdk" />
2118
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" />
2219
<PackageReference Include="nunit" />

0 commit comments

Comments
 (0)