-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[WIP] build-test - fix several thousands C# and NuGet warnings #19109
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,8 @@ | |
<CLRTestKind>SharedLibrary</CLRTestKind> | ||
<IsTestProject>false</IsTestProject> | ||
<!-- System.Composition and System.Composition.AttributedModel use different versioning conventions --> | ||
<SystemCompositionVersions>1.3.0-preview3-26501-04</SystemCompositionVersions> | ||
<XUnitNetcoreExtensionsVersion>2.2.0-preview1-02902-01</XUnitNetcoreExtensionsVersion> | ||
<SystemCompositionVersions>1.3.0-$(MicrosoftPrivateCoreFxNETCoreAppPackageVersion.Substring(6))</SystemCompositionVersions> | ||
<XUnitNetcoreExtensionsVersion>2.2.0-preview1-03025-01</XUnitNetcoreExtensionsVersion> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Composition packages version has been updated to always point to latest v1.3.0 available. Version |
||
<!-- Xunit Abstractions is differently versioned then the rest of XUnit --> | ||
<XUnitAbstractionsVersion>2.0.1</XUnitAbstractionsVersion> | ||
<CoreFXXUnitPackageVersion>2.2.0-beta2-build3300</CoreFXXUnitPackageVersion> | ||
|
@@ -28,14 +28,25 @@ | |
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions"> | ||
<Version>$(MicrosoftDotnetPlatformAbstractionsVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.Private.CoreFx.NETCoreApp"> | ||
<Version>$(MicrosoftPrivateCoreFxNETCoreAppPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.DotNet.BuildTools.TestSuite"> | ||
<Version>1.0.0-prerelease-00704-04</Version> | ||
</PackageReference> | ||
<PackageReference Include="xunit"> | ||
<Version>$(CoreFXXUnitPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="xunit.core"> | ||
<Version>$(CoreFXXUnitPackageVersion)</Version> | ||
<NoWarn>NU1605</NoWarn> | ||
</PackageReference> | ||
<PackageReference Include="xunit.assert"> | ||
<Version>$(CoreFXXUnitPackageVersion)</Version> | ||
<NoWarn>NU1605</NoWarn> | ||
</PackageReference> | ||
<PackageReference Include="xunit.abstractions"> | ||
<Version>$(XUnitAbstractionsVersion)</Version> | ||
|
@@ -49,11 +60,17 @@ | |
<PackageReference Include="xunit.runner.utility"> | ||
<Version>$(CoreFXXUnitPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="microsoft.xunit.netcore.extensions"> | ||
<Version>$(XUnitNetcoreExtensionsVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="CoreFx.Private.TestUtilities"> | ||
<Version>$(MicrosoftPrivateCoreFxNETCoreAppPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="System.Linq.Expressions"> | ||
<Version>4.3.0</Version> | ||
</PackageReference> | ||
<PackageReference Include="System.Text.RegularExpressions"> | ||
<Version>4.3.0</Version> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.xunit.netcore.extensions"> | ||
<Version>$(XUnitNetcoreExtensionsVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="System.CodeDom"> | ||
<Version>$(MicrosoftPrivateCoreFxNETCoreAppPackageVersion)</Version> | ||
|
@@ -132,7 +149,7 @@ | |
</PackageReference> | ||
<PackageReference Include="System.Security.Cryptography.Pkcs"> | ||
<Version>$(MicrosoftPrivateCoreFxNETCoreAppPackageVersion)</Version> | ||
</PackageReference> | ||
</PackageReference> | ||
<PackageReference Include="System.Security.Cryptography.Xml"> | ||
<Version>$(MicrosoftPrivateCoreFxNETCoreAppPackageVersion)</Version> | ||
</PackageReference> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,24 +7,9 @@ | |
<IsTestProject>false</IsTestProject> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="xunit.performance.api"> | ||
<Version>$(XunitPerformanceApiPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="xunit.performance.core"> | ||
<Version>$(XunitPerformanceApiPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="xunit.performance.execution"> | ||
<Version>$(XunitPerformanceApiPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="xunit.performance.metrics"> | ||
<Version>$(XunitPerformanceApiPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent"> | ||
<Version>$(MicrosoftDiagnosticsTracingTraceEventPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.NETCore.Platforms"> | ||
<Version>$(MicrosoftNETCorePlatformsPackageVersion)</Version> | ||
</PackageReference> | ||
</PackageReference> | ||
<PackageReference Include="System.Collections.NonGeneric"> | ||
<Version>4.4.0-beta-24913-02</Version> | ||
</PackageReference> | ||
|
@@ -43,8 +28,15 @@ | |
<PackageReference Include="System.Linq.Expressions"> | ||
<Version>4.4.0-beta-24913-02</Version> | ||
</PackageReference> | ||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe"> | ||
<Version>$(MicrosoftPrivateCoreFxNETCoreAppPackageVersion)</Version> | ||
<NoWarn>NU1605</NoWarn> | ||
</PackageReference> | ||
<PackageReference Include="System.Memory"> | ||
<Version>$(MicrosoftPrivateCoreFxNETCoreAppPackageVersion)</Version> | ||
<NoWarn>NU1603</NoWarn> | ||
<!-- Warnings NU1603 and NU1605 are raised due to the presence of v4.6.0-preview3-2650x-xx assemblies on myget--> | ||
<!-- They prevent usage of newer 4.6.0-preview1 assemblies since NuGet treats preview3 as version always higher than preview1 --> | ||
</PackageReference> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Warnings suppression is due to: https://github.com/dotnet/corefx/issues/31395 |
||
<PackageReference Include="System.Numerics.Vectors"> | ||
<Version>$(MicrosoftPrivateCoreFxNETCoreAppPackageVersion)</Version> | ||
|
@@ -61,9 +53,6 @@ | |
<PackageReference Include="System.Runtime"> | ||
<Version>4.4.0-beta-24913-02</Version> | ||
</PackageReference> | ||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe"> | ||
<Version>$(MicrosoftPrivateCoreFxNETCoreAppPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="System.Runtime.Extensions"> | ||
<Version>4.4.0-beta-24913-02</Version> | ||
</PackageReference> | ||
|
@@ -103,13 +92,28 @@ | |
<PackageReference Include="xunit.runner.utility"> | ||
<Version>$(XunitPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="xunit.performance.api"> | ||
<Version>$(XunitPerformanceApiPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="xunit.performance.core"> | ||
<Version>$(XunitPerformanceApiPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="xunit.performance.execution"> | ||
<Version>$(XunitPerformanceApiPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="xunit.performance.metrics"> | ||
<Version>$(XunitPerformanceApiPackageVersion)</Version> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent"> | ||
<Version>$(MicrosoftDiagnosticsTracingTraceEventPackageVersion)</Version> | ||
</PackageReference> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<TargetFramework>netstandard1.4</TargetFramework> | ||
<TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier> | ||
<TargetFrameworkIdentifier>.NETStandard,Version=v1.4</TargetFrameworkIdentifier> | ||
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback> | ||
<ContainsPackageReferences>true</ContainsPackageReferences> | ||
<PrereleaseResolveNuGetPackages>false</PrereleaseResolveNuGetPackages> | ||
<PrereleaseResolveNuGetPackages>false</PrereleaseResolveNuGetPackages> | ||
</PropertyGroup> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> | ||
<Target Name="Build" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ | |
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences> | ||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute> | ||
<!-- Disable some C# warnings for the tests. --> | ||
<NoWarn>78,162,164,168,169,219,251,252,414,429,642,649,652,675,1691,1717,1718,3001,3002,3003,3005,3008</NoWarn> | ||
<NoWarn>78,162,164,168,169,219,251,252,414,429,618,642,649,652,675,1685,1691,1717,1718,3001,3002,3003,3005,3008</NoWarn> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We shouldn't hide CS0618, it is listing code being used that was marked There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with this for production code, but I think it is fine to disable it for tests. We need to have tests for obsolete APIs. It is pretty annoying to disable the warning individually around every test that is testing obsolete API. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. Testing code has different requirements with respect to code marked There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CS1685 sounds like RefAssemblies are misconfigured somewhere. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
<SkipSigning Condition="'$(CrossGen)' == 'true'">true</SkipSigning> | ||
<AssemblyKey>Test</AssemblyKey> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Package v1.0.0-prerelease-00629-04 is not available, updated to version resolved by NuGet