From 91770344c2f55ed6a0b7b076281b7390aae10371 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Wed, 25 Sep 2024 08:08:48 -0700 Subject: [PATCH 1/9] Enable NuGet Audit and fix issues (#107639) * Enable NuGet Audit and fix issues Microsoft.NET.HostModel can reference the live builds of the packages it depends on. These will be deployed by the SDK. Most other audit alerts were due to tasks pulling in old dependencies that aren't even used by the task. Avoid these by cherry-picking just the assemblies needed by the tasks and provided by MSBuild / SDK. This prevents NuGet from downloading the package closure with the vulnerable packages. We don't need those packages since the tasks aren't responsible for deploying them. A better solution in the future would be a targeting pack for MSBuild and the .NET SDK - so that components that contribute to these hosts have a surface area they can target without taking on responsibility for servicing. There is once case where we have a test that references NuGet.* packages which also bring in stale dependencies that overlap with framework assemblies. Avoid these by cherry-picking the NuGet packages in the same way. * Fix package path on linux * Only use live JSON from HostModel SDK pins S.R.M and a few others, so don't make them upgrade yet. * Add a couple missing assembly references * Refactor tasks dependencies Consolidate representation of msbuild-provided task dependencies * Fix audit warnings in tests * Remove MetadataLoadContext from WasmAppBuilder package * Update Analyzer.Testing packages * Reduce exposure of Microsoft.Build.Tasks.Core * Fix audit warnings that only occur on browser * Update Asn1 used by linker analyzer tests * React to breaking change in analyzer test SDK * Enable working DryIoc tests * Fix double-write when LibrariesConfiguration differs from Configuration * Fix LibrariesConfiguration update target * Clean up references and add comments. * Make HostModel references private This ensures projects referenced will not be rebuilt by tests. This also means the HostModel package will not list these as references, but that's OK since the SDK provides them and this is not a shipping package. * Use ProjectReferenceExclusion to avoid framework project references On .NETCore we want to use the targeting pack and avoid rebuilding libs. * Update src/libraries/System.Runtime.InteropServices.JavaScript/tests/JSImportGenerator.UnitTest/JSImportGenerator.Unit.Tests.csproj Co-authored-by: Jeremy Koritzinsky --------- Co-authored-by: Jeremy Koritzinsky --- Directory.Build.targets | 4 +-- NuGet.config | 4 +++ eng/PackageDownloadAndReference.targets | 33 +++++++++++++++++++ eng/Version.Details.xml | 12 +++++++ eng/Versions.props | 7 ++-- src/installer/Directory.Build.targets | 12 +++++++ .../Microsoft.NET.HostModel.csproj | 3 +- src/installer/tests/Directory.Build.targets | 6 ++++ ...ft.DotNet.CoreSetup.Packaging.Tests.csproj | 4 +++ ...tem.Net.Security.Kerberos.Shared.projitems | 1 + .../tests/DI.External.Tests/DryIoc.cs | 7 +--- ...yInjection.ExternalContainers.Tests.csproj | 10 ++++-- ...soft.Extensions.Logging.Generators.targets | 5 +++ .../src/Microsoft.NETCore.Platforms.csproj | 12 +++++-- .../tests/SerializableAssembly.csproj | 4 +-- ...rinsicsInSystemPrivateCoreLib.Tests.csproj | 2 ++ .../JSImportGenerator.Unit.Tests.csproj | 5 ++- .../ComInterfaceGenerator.Unit.Tests.csproj | 3 ++ .../CustomMarshallerAttributeFixerTest.cs | 2 +- .../LibraryImportGenerator.Unit.Tests.csproj | 3 ++ .../SerializationTypes.csproj | 6 ---- ...t.Json.SourceGeneration.Unit.Tests.targets | 5 +++ ...ystem.Text.RegularExpressions.Tests.csproj | 3 ++ .../wasm/symbolicator/WasmSymbolicator.csproj | 2 ++ .../AndroidAppBuilder.csproj | 3 -- .../AotCompilerTask/MonoAOTCompiler.csproj | 5 --- .../AppleAppBuilder/AppleAppBuilder.csproj | 3 -- .../Crossgen2Tasks/Crossgen2Tasks.csproj | 9 +++-- src/tasks/Directory.Build.targets | 22 +++++++++++++ .../LibraryBuilder/LibraryBuilder.csproj | 3 -- ...soft.NET.Sdk.WebAssembly.Pack.Tasks.csproj | 6 +--- .../Microsoft.NET.WebAssembly.Webcil.csproj | 5 --- .../MobileBuildTasks/MobileBuildTasks.csproj | 5 --- .../MonoTargetsTasks/MonoTargetsTasks.csproj | 14 -------- .../TestExclusionListTasks.csproj | 3 -- .../WasmAppBuilder/WasmAppBuilder.csproj | 28 +++------------- .../WasmBuildTasks/WasmBuildTasks.csproj | 2 -- .../WorkloadBuildTasks.csproj | 2 -- .../installer.tasks/installer.tasks.csproj | 15 +++------ .../src/ILLink.Tasks/ILLink.Tasks.csproj | 10 ++++-- .../ILLink.RoslynAnalyzer.Tests.csproj | 2 ++ .../Verifiers/CSharpCodeFixVerifier`2.cs | 2 +- 42 files changed, 176 insertions(+), 118 deletions(-) create mode 100644 eng/PackageDownloadAndReference.targets create mode 100644 src/tasks/Directory.Build.targets diff --git a/Directory.Build.targets b/Directory.Build.targets index bc5b847efc614c..e870a3f045c829 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -143,12 +143,12 @@ + ('@(DefaultReferenceExclusion)' != '' or '@(ProjectReferenceExclusion)' != '')"> <_transitiveProjectReferenceWithProjectName Include="@(ProjectReference->Metadata('NuGetPackageId'))" OriginalIdentity="%(Identity)" /> <_transitiveIncludedProjectReferenceWithProjectName Include="@(_transitiveProjectReferenceWithProjectName)" - Exclude="@(DefaultReferenceExclusion)" /> + Exclude="@(DefaultReferenceExclusion);@(ProjectReferenceExclusion)" /> <_transitiveExcludedProjectReferenceWithProjectName Include="@(_transitiveProjectReferenceWithProjectName)" Exclude="@(_transitiveIncludedProjectReferenceWithProjectName)" /> diff --git a/NuGet.config b/NuGet.config index c9f91b53273223..677d4b5ed50d64 100644 --- a/NuGet.config +++ b/NuGet.config @@ -21,6 +21,10 @@ + + + + diff --git a/eng/PackageDownloadAndReference.targets b/eng/PackageDownloadAndReference.targets new file mode 100644 index 00000000000000..28399ddaa2a9aa --- /dev/null +++ b/eng/PackageDownloadAndReference.targets @@ -0,0 +1,33 @@ + + + + + + + lib/$(TargetFramework) + %(Identity) + false + + + + + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 76c1e2b11504f2..ea8ff403a1527b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -402,10 +402,22 @@ + + https://github.com/NuGet/NuGet.Client + 8fef55f5a55a3b4f2c96cd1a9b5ddc51d4b927f8 + + + https://github.com/NuGet/NuGet.Client + 8fef55f5a55a3b4f2c96cd1a9b5ddc51d4b927f8 + https://github.com/NuGet/NuGet.Client 8fef55f5a55a3b4f2c96cd1a9b5ddc51d4b927f8 + + https://github.com/NuGet/NuGet.Client + 8fef55f5a55a3b4f2c96cd1a9b5ddc51d4b927f8 + https://github.com/dotnet/node 308c7d0f1fa19bd1e7b768ad13646f5206133cdb diff --git a/eng/Versions.props b/eng/Versions.props index 491874d4ff2aaf..de7b4385058cb2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -119,6 +119,7 @@ 5.0.0 4.8.6 8.0.0 + 8.0.1 5.0.0 4.5.5 9.0.0-rtm.24503.8 @@ -136,7 +137,7 @@ 9.0.0-rtm.24503.8 8.0.0 - 8.0.0 + 8.0.4 8.0.0 8.0.0 @@ -174,8 +175,10 @@ $(MicrosoftBuildVersion) $(MicrosoftBuildVersion) $(MicrosoftBuildVersion) + 6.2.4 6.2.4 6.2.4 + 6.2.4 7.0.412701 6.0 @@ -205,7 +208,7 @@ 2.46.3 2.45.0 2.45.0 - 1.1.2-beta1.23323.1 + 1.1.3-beta1.24423.1 1.7.2 10.2.0 17.0.46 diff --git a/src/installer/Directory.Build.targets b/src/installer/Directory.Build.targets index c4e8a8c8fb7011..22504bd85a7d23 100644 --- a/src/installer/Directory.Build.targets +++ b/src/installer/Directory.Build.targets @@ -5,6 +5,18 @@ $(ArchiveName)-pgo + + + + + + + + + + + - + diff --git a/src/installer/tests/Directory.Build.targets b/src/installer/tests/Directory.Build.targets index 9bfb4ffbea286e..1b67f398587725 100644 --- a/src/installer/tests/Directory.Build.targets +++ b/src/installer/tests/Directory.Build.targets @@ -1,5 +1,11 @@ + + + + + + + + + + diff --git a/src/libraries/Common/tests/System/Net/Security/Kerberos/System.Net.Security.Kerberos.Shared.projitems b/src/libraries/Common/tests/System/Net/Security/Kerberos/System.Net.Security.Kerberos.Shared.projitems index a184e0a870b294..f5a2b38e529ffd 100644 --- a/src/libraries/Common/tests/System/Net/Security/Kerberos/System.Net.Security.Kerberos.Shared.projitems +++ b/src/libraries/Common/tests/System/Net/Security/Kerberos/System.Net.Security.Kerberos.Shared.projitems @@ -36,5 +36,6 @@ + diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/DryIoc.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/DryIoc.cs index a57b843bf72fe3..3f943cd49e16ad 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/DryIoc.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/DryIoc.cs @@ -9,12 +9,7 @@ namespace Microsoft.Extensions.DependencyInjection.Specification { public class DryIocDependencyInjectionSpecificationTests : SkippableDependencyInjectionSpecificationTests { - public override bool SupportsIServiceProviderIsService => false; - - public override string[] SkippedTests => new[] - { - "ServiceScopeFactoryIsSingleton" - }; + public override string[] SkippedTests => []; protected override IServiceProvider CreateServiceProviderImpl(IServiceCollection serviceCollection) { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj index 07eea0b4021952..4ca8c97b32c5bc 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj @@ -18,9 +18,9 @@ - - - + + + @@ -28,6 +28,10 @@ + + diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.targets b/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.targets index dfc5b8e9ad7856..115a93167b3892 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.targets +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.targets @@ -19,6 +19,11 @@ + + + + + diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj b/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj index 24aa038645aecc..84e378bd855c6a 100644 --- a/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj +++ b/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj @@ -41,10 +41,16 @@ - - + + + + + + - + + + - - all - + diff --git a/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLib.Tests.csproj b/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLib.Tests.csproj index d180cd0e34b898..526ad7319b7969 100644 --- a/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLib.Tests.csproj +++ b/src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLib.Tests.csproj @@ -15,6 +15,8 @@ + + diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/JSImportGenerator.UnitTest/JSImportGenerator.Unit.Tests.csproj b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/JSImportGenerator.UnitTest/JSImportGenerator.Unit.Tests.csproj index f5fa756b2fc3e3..57de5cdbe53e83 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/JSImportGenerator.UnitTest/JSImportGenerator.Unit.Tests.csproj +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/JSImportGenerator.UnitTest/JSImportGenerator.Unit.Tests.csproj @@ -3,7 +3,7 @@ $(NetCoreAppCurrent) enable true - true + true @@ -25,6 +25,9 @@ + + + diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/ComInterfaceGenerator.Unit.Tests.csproj b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/ComInterfaceGenerator.Unit.Tests.csproj index 65bccc63b316c8..5b8906cbbf63e0 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/ComInterfaceGenerator.Unit.Tests.csproj +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/ComInterfaceGenerator.Unit.Tests.csproj @@ -33,6 +33,9 @@ + + + diff --git a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CustomMarshallerAttributeFixerTest.cs b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CustomMarshallerAttributeFixerTest.cs index 2380a0b9d8b4a7..d0c3100dcd22d0 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CustomMarshallerAttributeFixerTest.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CustomMarshallerAttributeFixerTest.cs @@ -22,7 +22,7 @@ internal class CustomMarshallerAttributeFixerTest : CSharpCodeFixVerifier SortDistinctDiagnostics(IEnumerable<(Project project, Diagnostic diagnostic)> diagnostics) + protected override ImmutableArray<(Project project, Diagnostic diagnostic)> SortDistinctDiagnostics(ImmutableArray<(Project project, Diagnostic diagnostic)> diagnostics) => diagnostics.OrderBy(d => d.diagnostic.Location.GetLineSpan().Path, StringComparer.Ordinal) .ThenBy(d => d.diagnostic.Location.SourceSpan.Start) .ThenBy(d => d.diagnostic.Location.SourceSpan.End) diff --git a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/LibraryImportGenerator.Unit.Tests.csproj b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/LibraryImportGenerator.Unit.Tests.csproj index 471d6602648375..827e95f37ed39c 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/LibraryImportGenerator.Unit.Tests.csproj +++ b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/LibraryImportGenerator.Unit.Tests.csproj @@ -48,6 +48,9 @@ + + + diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/XsdDataContractExporterTests/SerializationTypes/SerializationTypes.csproj b/src/libraries/System.Runtime.Serialization.Xml/tests/XsdDataContractExporterTests/SerializationTypes/SerializationTypes.csproj index 4967c15f1e066e..58cfda595c39d5 100644 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/XsdDataContractExporterTests/SerializationTypes/SerializationTypes.csproj +++ b/src/libraries/System.Runtime.Serialization.Xml/tests/XsdDataContractExporterTests/SerializationTypes/SerializationTypes.csproj @@ -13,12 +13,6 @@ false - - - all - - - diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Unit.Tests.targets b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Unit.Tests.targets index 56bf105dc1fddf..96e0f7a5885ec7 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Unit.Tests.targets +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Unit.Tests.targets @@ -7,6 +7,11 @@ + + + + + diff --git a/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/System.Text.RegularExpressions.Tests.csproj b/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/System.Text.RegularExpressions.Tests.csproj index fa554e131a54fb..e84848318f7060 100644 --- a/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/System.Text.RegularExpressions.Tests.csproj +++ b/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/System.Text.RegularExpressions.Tests.csproj @@ -81,6 +81,9 @@ + + + + + diff --git a/src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj b/src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj index 298896d2384fad..00b863c5ea59a4 100644 --- a/src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj +++ b/src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj @@ -10,9 +10,6 @@ - - - diff --git a/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj b/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj index 0afdb5563cc660..83bf896ccc9324 100644 --- a/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj +++ b/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj @@ -11,11 +11,6 @@ $(NoWarn),CS8604,CS8602 true - - - - - diff --git a/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj b/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj index fe87320a2da81f..a2c93c2f89d2a0 100644 --- a/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj +++ b/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj @@ -10,9 +10,6 @@ - - - diff --git a/src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj b/src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj index 0def5b7ce873e0..1805aad4e3adc8 100644 --- a/src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj +++ b/src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj @@ -6,8 +6,13 @@ $(NoWarn),CA1050 - - + + + + + + diff --git a/src/tasks/Directory.Build.targets b/src/tasks/Directory.Build.targets new file mode 100644 index 00000000000000..9ac11c543dc535 --- /dev/null +++ b/src/tasks/Directory.Build.targets @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/tasks/LibraryBuilder/LibraryBuilder.csproj b/src/tasks/LibraryBuilder/LibraryBuilder.csproj index 50cd1c06867ef8..7fa908222541d9 100644 --- a/src/tasks/LibraryBuilder/LibraryBuilder.csproj +++ b/src/tasks/LibraryBuilder/LibraryBuilder.csproj @@ -10,9 +10,6 @@ - - - diff --git a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.csproj b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.csproj index 3e1e01fb6b8fef..cd0c8abf3debd7 100644 --- a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.csproj +++ b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.csproj @@ -20,11 +20,7 @@ - - - - - + diff --git a/src/tasks/Microsoft.NET.WebAssembly.Webcil/Microsoft.NET.WebAssembly.Webcil.csproj b/src/tasks/Microsoft.NET.WebAssembly.Webcil/Microsoft.NET.WebAssembly.Webcil.csproj index 14ecec43bf1255..0d80423d1bd000 100644 --- a/src/tasks/Microsoft.NET.WebAssembly.Webcil/Microsoft.NET.WebAssembly.Webcil.csproj +++ b/src/tasks/Microsoft.NET.WebAssembly.Webcil/Microsoft.NET.WebAssembly.Webcil.csproj @@ -12,11 +12,6 @@ true - - - - - diff --git a/src/tasks/MobileBuildTasks/MobileBuildTasks.csproj b/src/tasks/MobileBuildTasks/MobileBuildTasks.csproj index 579323eb4aba23..a1fd7dbeb86962 100644 --- a/src/tasks/MobileBuildTasks/MobileBuildTasks.csproj +++ b/src/tasks/MobileBuildTasks/MobileBuildTasks.csproj @@ -13,11 +13,6 @@ - - - - - diff --git a/src/tasks/MonoTargetsTasks/MonoTargetsTasks.csproj b/src/tasks/MonoTargetsTasks/MonoTargetsTasks.csproj index 3c652477cad9e3..566b037b5099be 100644 --- a/src/tasks/MonoTargetsTasks/MonoTargetsTasks.csproj +++ b/src/tasks/MonoTargetsTasks/MonoTargetsTasks.csproj @@ -5,20 +5,6 @@ enable $(NoWarn),CA1050,CA1850 - - - - - - - - - - - - - - diff --git a/src/tasks/TestExclusionListTasks/TestExclusionListTasks.csproj b/src/tasks/TestExclusionListTasks/TestExclusionListTasks.csproj index 97871978faeb46..e5148d3df97f26 100644 --- a/src/tasks/TestExclusionListTasks/TestExclusionListTasks.csproj +++ b/src/tasks/TestExclusionListTasks/TestExclusionListTasks.csproj @@ -13,9 +13,6 @@ - - - diff --git a/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj b/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj index 34a689f680da40..39733bdb05f7f0 100644 --- a/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj +++ b/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj @@ -24,29 +24,13 @@ - - - - - - - - - - - - - - - - - - - + + + + @@ -54,8 +38,6 @@ - diff --git a/src/tasks/WasmBuildTasks/WasmBuildTasks.csproj b/src/tasks/WasmBuildTasks/WasmBuildTasks.csproj index 0f7f591c2b9993..b38881fbba2ec7 100644 --- a/src/tasks/WasmBuildTasks/WasmBuildTasks.csproj +++ b/src/tasks/WasmBuildTasks/WasmBuildTasks.csproj @@ -6,8 +6,6 @@ $(NoWarn),CA1050 - - diff --git a/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj b/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj index 50249f07c44e07..67e092c8b4fa13 100644 --- a/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj +++ b/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj @@ -9,8 +9,6 @@ - - diff --git a/src/tasks/installer.tasks/installer.tasks.csproj b/src/tasks/installer.tasks/installer.tasks.csproj index fee44e8622b82e..031a237ecc1860 100644 --- a/src/tasks/installer.tasks/installer.tasks.csproj +++ b/src/tasks/installer.tasks/installer.tasks.csproj @@ -6,19 +6,12 @@ - - - - - - - + + + - - - - + diff --git a/src/tools/illink/src/ILLink.Tasks/ILLink.Tasks.csproj b/src/tools/illink/src/ILLink.Tasks/ILLink.Tasks.csproj index ea27178d3faabe..6332aeb7bc356c 100644 --- a/src/tools/illink/src/ILLink.Tasks/ILLink.Tasks.csproj +++ b/src/tools/illink/src/ILLink.Tasks/ILLink.Tasks.csproj @@ -50,12 +50,16 @@ - - - + + + + + + + + diff --git a/src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpCodeFixVerifier`2.cs b/src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpCodeFixVerifier`2.cs index 808fc4b772884f..96de52df41d3c9 100644 --- a/src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpCodeFixVerifier`2.cs +++ b/src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpCodeFixVerifier`2.cs @@ -43,7 +43,7 @@ public Test () }); } - protected override ImmutableArray<(Project project, Diagnostic diagnostic)> SortDistinctDiagnostics (IEnumerable<(Project project, Diagnostic diagnostic)> diagnostics) + protected override ImmutableArray<(Project project, Diagnostic diagnostic)> SortDistinctDiagnostics (ImmutableArray<(Project project, Diagnostic diagnostic)> diagnostics) { // Only include non-suppressed diagnostics in the result. Our tests suppress diagnostics // with 'UnconditionalSuppressMessageAttribute', and expect them not to be reported. From 36deaa7ab4d740a4fc53930f85b26b3fb95805ac Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Wed, 25 Sep 2024 17:49:02 -0700 Subject: [PATCH 2/9] Remove live System.Text.Json reference from HostModel (#108263) --- .../Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/installer/managed/Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj b/src/installer/managed/Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj index 6c09125e72a41d..9f58898b582951 100644 --- a/src/installer/managed/Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj +++ b/src/installer/managed/Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj @@ -21,7 +21,8 @@ - + + From b5bacdc2933c52a6e3f5d2974d61e89b6b2056e7 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Mon, 14 Oct 2024 09:23:16 -0700 Subject: [PATCH 3/9] Reduce changes to src/installer Since we're no longer trying to reference live S.T.J we don't need these. --- src/installer/Directory.Build.targets | 12 ------------ src/installer/tests/Directory.Build.targets | 6 ------ ...Microsoft.DotNet.CoreSetup.Packaging.Tests.csproj | 2 -- 3 files changed, 20 deletions(-) diff --git a/src/installer/Directory.Build.targets b/src/installer/Directory.Build.targets index 22504bd85a7d23..c4e8a8c8fb7011 100644 --- a/src/installer/Directory.Build.targets +++ b/src/installer/Directory.Build.targets @@ -5,18 +5,6 @@ $(ArchiveName)-pgo - - - - - - - - - - - - - - - - - - From 9362251fff7be9ba09956048d9466fbfbcb29000 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Mon, 14 Oct 2024 09:33:44 -0700 Subject: [PATCH 4/9] Update JSON toolset version --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index de7b4385058cb2..04db23407f84ba 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -137,7 +137,7 @@ 9.0.0-rtm.24503.8 8.0.0 - 8.0.4 + 8.0.5 8.0.0 8.0.0 From 73ed35f0c2479f24a7bc7012e2c14c81b7aa2ba3 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Wed, 9 Oct 2024 13:39:53 -0700 Subject: [PATCH 5/9] Don't error for NuGet audit on non-official builds (#108718) --- Directory.Build.props | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Directory.Build.props b/Directory.Build.props index 13cdf30eb7a92a..688fcaec63b4f6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -387,6 +387,8 @@ strict;nullablePublicOnly true + + $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 $(NoWarn);CS8500;CS8969 From 0b29e61006064d424e6734b5291d0bbe288cc9e0 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Mon, 14 Oct 2024 11:41:09 -0700 Subject: [PATCH 6/9] Reference live S.T.JSON from DI.ExternalContainers.Tests --- ...ensions.DependencyInjection.ExternalContainers.Tests.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj index 4ca8c97b32c5bc..adfba313f909ba 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj @@ -18,6 +18,7 @@ + @@ -28,7 +29,7 @@ - From 740eff60cac22ae361d687438c4ea5bc03122b5e Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Mon, 14 Oct 2024 12:38:51 -0700 Subject: [PATCH 7/9] Update STJ in Wasm.Build.Tests --- src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj b/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj index cd39a7102485df..b7ce410a2a6499 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj +++ b/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj @@ -48,6 +48,7 @@ + From 880fa5de8d0860537a52672d28080bba0a6c39da Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Tue, 15 Oct 2024 10:58:57 -0700 Subject: [PATCH 8/9] Make SystemTextJsonToolsetVersion 8.0.4 We cannot count on VS and MSBuild updating by the time 9.0 ships GA. Fix WASM projects which only target .NET by referencing the LKG and dropping all assets. For Microsoft.NET.HostModel and other build tasks, keep them on the version we can garuntee is present in VS. NoWarn the Audit warnings here. This is safe because we can ensure one of two things. 1. The package is non-shipping and customers won't see the warning and the referencing repo in the product will ensure an update or exclusion of the dependency. (HostModel) 2. The project excludes the reference entirely as making it PrivateAssets (not in package) and ExcludeAssets=runtime (no possibility of using runtime). --- eng/Versions.props | 2 +- .../Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj | 4 +++- src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj | 3 ++- src/mono/wasm/symbolicator/WasmSymbolicator.csproj | 2 +- src/tasks/Directory.Build.targets | 4 ++-- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 04db23407f84ba..de7b4385058cb2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -137,7 +137,7 @@ 9.0.0-rtm.24503.8 8.0.0 - 8.0.5 + 8.0.4 8.0.0 8.0.0 diff --git a/src/installer/managed/Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj b/src/installer/managed/Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj index 9f58898b582951..21d1fb3ff7121c 100644 --- a/src/installer/managed/Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj +++ b/src/installer/managed/Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj @@ -22,7 +22,9 @@ - + + diff --git a/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj b/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj index b7ce410a2a6499..640dd40a88c172 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj +++ b/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj @@ -48,7 +48,8 @@ - + + diff --git a/src/mono/wasm/symbolicator/WasmSymbolicator.csproj b/src/mono/wasm/symbolicator/WasmSymbolicator.csproj index cab59420a1f59d..ca524db7aadc82 100644 --- a/src/mono/wasm/symbolicator/WasmSymbolicator.csproj +++ b/src/mono/wasm/symbolicator/WasmSymbolicator.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/tasks/Directory.Build.targets b/src/tasks/Directory.Build.targets index 9ac11c543dc535..b6a5059ec468c0 100644 --- a/src/tasks/Directory.Build.targets +++ b/src/tasks/Directory.Build.targets @@ -11,9 +11,9 @@ - + - + From 8c30618c4743bd275e1868559431efca56adb938 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Tue, 15 Oct 2024 13:23:35 -0700 Subject: [PATCH 9/9] Fix STJ audit warning in installer tests --- src/installer/tests/Directory.Build.targets | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/installer/tests/Directory.Build.targets b/src/installer/tests/Directory.Build.targets index 9bfb4ffbea286e..a02456f0889f7b 100644 --- a/src/installer/tests/Directory.Build.targets +++ b/src/installer/tests/Directory.Build.targets @@ -1,5 +1,10 @@ + + + + +