Skip to content

Commit

Permalink
Set FlagNetStandard1XDependencies=true and fix issues (#96795)
Browse files Browse the repository at this point in the history
The only product change is upgrading Microsoft.DiaSymReader from 1.4.0 to 2.0.0 in ILCompiler.TypeSystem.csproj, the rest are test changes.
  • Loading branch information
akoeplinger authored Jan 25, 2024
1 parent f86af94 commit 754a554
Show file tree
Hide file tree
Showing 29 changed files with 73 additions and 467 deletions.
9 changes: 8 additions & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<!-- Opt-in/out repo features -->
<UsingToolIbcOptimization>false</UsingToolIbcOptimization>
<UsingToolXliff>false</UsingToolXliff>
<FlagNetStandard1XDependencies Condition="'$(FlagNetStandard1XDependencies)' == ''">true</FlagNetStandard1XDependencies>
<!-- Use SDK compilers in full source-build. -->
<UsingToolMicrosoftNetCompilers Condition="'$(DotNetBuildFromSourceFlavor)' != 'Product'">true</UsingToolMicrosoftNetCompilers>
</PropertyGroup>
Expand Down Expand Up @@ -129,6 +130,7 @@
<SystemIOFileSystemAccessControlVersion>5.0.0</SystemIOFileSystemAccessControlVersion>
<SystemMemoryVersion>4.5.5</SystemMemoryVersion>
<SystemReflectionMetadataVersion>7.0.0</SystemReflectionMetadataVersion>
<SystemReflectionMetadataLoadContextVersion>7.0.0</SystemReflectionMetadataLoadContextVersion>
<SystemSecurityAccessControlVersion>6.0.0</SystemSecurityAccessControlVersion>
<SystemSecurityCryptographyCngVersion>5.0.0</SystemSecurityCryptographyCngVersion>
<SystemSecurityCryptographyOpenSslVersion>5.0.0</SystemSecurityCryptographyOpenSslVersion>
Expand Down Expand Up @@ -163,6 +165,7 @@
<optimizationlinuxarm64MIBCRuntimeVersion>1.0.0-prerelease.24071.2</optimizationlinuxarm64MIBCRuntimeVersion>
<optimizationPGOCoreCLRVersion>1.0.0-prerelease.24071.2</optimizationPGOCoreCLRVersion>
<!-- Not auto-updated. -->
<MicrosoftDiaSymReaderVersion>2.0.0</MicrosoftDiaSymReaderVersion>
<MicrosoftDiaSymReaderNativeVersion>16.11.29-beta1.23404.4</MicrosoftDiaSymReaderNativeVersion>
<SystemCommandLineVersion>2.0.0-beta4.23407.1</SystemCommandLineVersion>
<TraceEventVersion>3.1.7</TraceEventVersion>
Expand All @@ -186,14 +189,15 @@
<MicrosoftDotNetXHarnessCLIVersion>9.0.0-prerelease.24066.3</MicrosoftDotNetXHarnessCLIVersion>
<MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>9.0.0-alpha.0.24065.1</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>
<NUnitVersion>3.12.0</NUnitVersion>
<NUnitTestAdapterVersion>4.1.0</NUnitTestAdapterVersion>
<NUnit3TestAdapterVersion>4.5.0</NUnit3TestAdapterVersion>
<CoverletCollectorVersion>6.0.0</CoverletCollectorVersion>
<NewtonsoftJsonVersion>13.0.3</NewtonsoftJsonVersion>
<NewtonsoftJsonBsonVersion>1.0.2</NewtonsoftJsonBsonVersion>
<SQLitePCLRawbundle_greenVersion>2.0.4</SQLitePCLRawbundle_greenVersion>
<MoqVersion>4.18.4</MoqVersion>
<FluentAssertionsVersion>6.7.0</FluentAssertionsVersion>
<FsCheckVersion>2.14.3</FsCheckVersion>
<CommandLineParserVersion>2.9.1</CommandLineParserVersion>
<!-- Android gRPC client tests -->
<GoogleProtobufVersion>3.19.4</GoogleProtobufVersion>
<GrpcAspNetCoreVersion>2.46.0</GrpcAspNetCoreVersion>
Expand All @@ -203,6 +207,9 @@
<GrpcDotnetClientVersion>2.45.0</GrpcDotnetClientVersion>
<GrpcToolsVersion>2.45.0</GrpcToolsVersion>
<CompilerPlatformTestingVersion>1.1.2-beta1.23323.1</CompilerPlatformTestingVersion>
<CompilerPlatformTestingDiffPlexVersion>1.7.2</CompilerPlatformTestingDiffPlexVersion>
<CompilerPlatformTestingMicrosoftVisualBasicVersion>10.2.0</CompilerPlatformTestingMicrosoftVisualBasicVersion>
<CompilerPlatformTestingMicrosoftVisualStudioCompositionVersion>17.0.46</CompilerPlatformTestingMicrosoftVisualStudioCompositionVersion>
<!-- Docs -->
<MicrosoftPrivateIntellisenseVersion>8.0.0-preview-20230918.1</MicrosoftPrivateIntellisenseVersion>
<!-- Mono Cecil -->
Expand Down
7 changes: 0 additions & 7 deletions eng/testing/xunit/xunit.targets
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<Project>
<ItemGroup>
<!-- Upgrade the NETStandard.Library transitive xunit dependency to avoid transitive 1.x NS dependencies. -->
<PackageReference Include="NETStandard.Library"
Version="$(NetStandardLibraryVersion)"
Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
</ItemGroup>

<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<AutoGenerateBindingRedirects Condition="'$(AutoGenerateBindingRedirects)' == ''">true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType Condition="'$(GenerateBindingRedirectsOutputType)' == ''">true</GenerateBindingRedirectsOutputType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<ItemGroup>
<PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="$(SystemRuntimeCompilerServicesUnsafeVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.0.0-alpha0002" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />

<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(MicrosoftCodeAnalysisCSharpVersion)" />
<PackageReference Include="Microsoft.DotNet.Cecil" Version="$(MicrosoftDotNetCecilVersion)" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="5.0.1" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="$(SystemReflectionMetadataLoadContextVersion)" />

<ProjectReference Include="$(ToolsProjectRoot)illink/test/Mono.Linker.Tests.Cases/**/*.csproj" />
<ProjectReference Include="$(ToolsProjectRoot)illink/test/Mono.Linker.Tests.Cases.Expectations/Mono.Linker.Tests.Cases.Expectations.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Condition="'$(EnableDiaSymReaderUse)' == 'true'" Include="Microsoft.DiaSymReader">
<Version>1.4.0</Version>
</PackageReference>
<PackageReference Condition="'$(EnableDiaSymReaderUse)' == 'true'" Include="Microsoft.DiaSymReader" Version="$(MicrosoftDiaSymReaderVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@
<ProjectReference Include="..\..\managed\Microsoft.NET.HostModel\Microsoft.NET.HostModel.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Win32.Registry" Version="4.3.0" />
</ItemGroup>

</Project>
2 changes: 0 additions & 2 deletions src/libraries/Common/tests/TestUtilities/TestUtilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@
<PackageReference Include="xunit.core" Version="$(XUnitVersion)" ExcludeAssets="build" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<!-- Upgrade the NetStandard.Library transitive xunit dependency to avoid 1.x NS dependencies. -->
<PackageReference Include="NETStandard.Library" Version="$(NetStandardLibraryVersion)" />
<!-- Use the arcade fork of xunit.assert for AOT-compat -->
<PackageReference Include="Microsoft.DotNet.XUnitAssert" Version="$(MicrosoftDotNetXUnitAssertVersion)" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.DependencyInjection.Abstractions\src\Microsoft.Extensions.DependencyInjection.Abstractions.csproj" />
<PackageReference Include="xunit.assert" Version="$(XUnitVersion)" />
<PackageReference Include="xunit.extensibility.core" Version="$(XUnitVersion)" />

<!-- Upgrade the NETStandard.Library transitive xunit dependency to avoid transitive 1.x NS dependencies. -->
<PackageReference Include="NETStandard.Library"
Version="$(NetStandardLibraryVersion)"
PrivateAssets="all"
Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkMinimum)</TargetFrameworks>
<EnableDefaultItems>true</EnableDefaultItems>
<NoWarn>$(NoWarn);CS8002</NoWarn>

<!-- third party DI containers bring in NS1.x dependencies -->
<FlagNetStandard1XDependencies>false</FlagNetStandard1XDependencies>
</PropertyGroup>

<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
Expand Down
Loading

0 comments on commit 754a554

Please sign in to comment.