Skip to content

Commit 70479ed

Browse files
[main] Update dependencies from dotnet/runtime (#41988)
[main] Update dependencies from dotnet/runtime - Make sure we pass properties as individual arguments to msbuild - Merge branch 'main' into darc-main-261c903f-8620-4b37-a41b-d596da608082 - Stop using obsolete X509Certificate2 ctor - Fix passing correct config to publishCommand.GetOutputDirectory() - Fix another missed configuration setting - Revert X509CertificateLoader.LoadCertificate change in RegistryTests.cs - Use LoadPkcs12 instead, X509ContentType.Pfx is equivalent to Pkcs12 - Fix Signature
1 parent 3330a9f commit 70479ed

File tree

8 files changed

+136
-118
lines changed

8 files changed

+136
-118
lines changed

eng/Version.Details.xml

Lines changed: 76 additions & 76 deletions
Large diffs are not rendered by default.

eng/Versions.props

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@
7979
<SystemCollectionsImmutablePackageVersion>8.0.0</SystemCollectionsImmutablePackageVersion>
8080
<SystemDiagnosticsFileVersionInfoVersion>4.0.0</SystemDiagnosticsFileVersionInfoVersion>
8181
<SystemReflectionMetadataVersion>8.0.0</SystemReflectionMetadataVersion>
82-
<SystemSecurityCryptographyProtectedDataPackageVersion>9.0.0-preview.7.24352.15</SystemSecurityCryptographyProtectedDataPackageVersion>
82+
<SystemSecurityCryptographyProtectedDataPackageVersion>9.0.0-preview.7.24357.2</SystemSecurityCryptographyProtectedDataPackageVersion>
8383
<SystemCollectionsSpecializedPackageVersion>4.3.0</SystemCollectionsSpecializedPackageVersion>
8484
<SystemXmlXmlDocumentPackageVersion>4.3.0</SystemXmlXmlDocumentPackageVersion>
8585
<WebDeploymentPackageVersion>4.0.5</WebDeploymentPackageVersion>
8686
<SystemTextJsonVersion>7.0.3</SystemTextJsonVersion>
87-
<SystemReflectionMetadataLoadContextVersion>9.0.0-preview.7.24352.15</SystemReflectionMetadataLoadContextVersion>
87+
<SystemReflectionMetadataLoadContextVersion>9.0.0-preview.7.24357.2</SystemReflectionMetadataLoadContextVersion>
8888
<SystemManagementPackageVersion>4.6.0</SystemManagementPackageVersion>
8989
<SystemCommandLineVersion>2.0.0-beta4.24324.3</SystemCommandLineVersion>
9090
<SystemCommandLineRenderingVersion>0.4.0-alpha.24324.3</SystemCommandLineRenderingVersion>
@@ -130,21 +130,21 @@
130130
</PropertyGroup>
131131
<PropertyGroup>
132132
<!-- Dependencies from https://github.com/dotnet/runtime -->
133-
<MicrosoftNETCoreAppRefPackageVersion>9.0.0-preview.7.24352.15</MicrosoftNETCoreAppRefPackageVersion>
134-
<VSRedistCommonNetCoreSharedFrameworkx6490PackageVersion>9.0.0-preview.7.24352.15</VSRedistCommonNetCoreSharedFrameworkx6490PackageVersion>
135-
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>9.0.0-preview.7.24352.15</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
136-
<MicrosoftExtensionsDependencyModelPackageVersion>9.0.0-preview.7.24352.15</MicrosoftExtensionsDependencyModelPackageVersion>
137-
<MicrosoftNETHostModelVersion>9.0.0-preview.7.24352.15</MicrosoftNETHostModelVersion>
138-
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>9.0.0-preview.7.24352.15</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
139-
<MicrosoftExtensionsLoggingAbstractionsVersion>9.0.0-preview.7.24352.15</MicrosoftExtensionsLoggingAbstractionsVersion>
140-
<MicrosoftExtensionsLoggingConsoleVersion>9.0.0-preview.7.24352.15</MicrosoftExtensionsLoggingConsoleVersion>
141-
<MicrosoftExtensionsLoggingVersion>9.0.0-preview.7.24352.15</MicrosoftExtensionsLoggingVersion>
142-
<MicrosoftNETILLinkTasksPackageVersion>9.0.0-preview.7.24352.15</MicrosoftNETILLinkTasksPackageVersion>
143-
<SystemServiceProcessServiceControllerVersion>9.0.0-preview.7.24352.15</SystemServiceProcessServiceControllerVersion>
133+
<MicrosoftNETCoreAppRefPackageVersion>9.0.0-preview.7.24357.2</MicrosoftNETCoreAppRefPackageVersion>
134+
<VSRedistCommonNetCoreSharedFrameworkx6490PackageVersion>9.0.0-preview.7.24357.2</VSRedistCommonNetCoreSharedFrameworkx6490PackageVersion>
135+
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>9.0.0-preview.7.24357.2</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
136+
<MicrosoftExtensionsDependencyModelPackageVersion>9.0.0-preview.7.24357.2</MicrosoftExtensionsDependencyModelPackageVersion>
137+
<MicrosoftNETHostModelVersion>9.0.0-preview.7.24357.2</MicrosoftNETHostModelVersion>
138+
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>9.0.0-preview.7.24357.2</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
139+
<MicrosoftExtensionsLoggingAbstractionsVersion>9.0.0-preview.7.24357.2</MicrosoftExtensionsLoggingAbstractionsVersion>
140+
<MicrosoftExtensionsLoggingConsoleVersion>9.0.0-preview.7.24357.2</MicrosoftExtensionsLoggingConsoleVersion>
141+
<MicrosoftExtensionsLoggingVersion>9.0.0-preview.7.24357.2</MicrosoftExtensionsLoggingVersion>
142+
<MicrosoftNETILLinkTasksPackageVersion>9.0.0-preview.7.24357.2</MicrosoftNETILLinkTasksPackageVersion>
143+
<SystemServiceProcessServiceControllerVersion>9.0.0-preview.7.24357.2</SystemServiceProcessServiceControllerVersion>
144144
<MicrosoftNETCoreDotNetHostResolverPackageVersion>8.0.0-rc.1.23414.4</MicrosoftNETCoreDotNetHostResolverPackageVersion>
145-
<MicrosoftNETCorePlatformsPackageVersion>9.0.0-preview.7.24352.15</MicrosoftNETCorePlatformsPackageVersion>
146-
<VSRedistCommonNetCoreTargetingPackx6490PackageVersion>9.0.0-preview.7.24352.15</VSRedistCommonNetCoreTargetingPackx6490PackageVersion>
147-
<MicrosoftNETCoreAppHostwinx64PackageVersion>9.0.0-preview.7.24352.15</MicrosoftNETCoreAppHostwinx64PackageVersion>
145+
<MicrosoftNETCorePlatformsPackageVersion>9.0.0-preview.7.24357.2</MicrosoftNETCorePlatformsPackageVersion>
146+
<VSRedistCommonNetCoreTargetingPackx6490PackageVersion>9.0.0-preview.7.24357.2</VSRedistCommonNetCoreTargetingPackx6490PackageVersion>
147+
<MicrosoftNETCoreAppHostwinx64PackageVersion>9.0.0-preview.7.24357.2</MicrosoftNETCoreAppHostwinx64PackageVersion>
148148
<NETStandardLibraryRefPackageVersion>2.1.0</NETStandardLibraryRefPackageVersion>
149149
</PropertyGroup>
150150
<PropertyGroup>
@@ -177,9 +177,9 @@
177177
</PropertyGroup>
178178
<PropertyGroup>
179179
<!-- Dependencies from https://github.com/dotnet/runtime -->
180-
<SystemCodeDomPackageVersion>9.0.0-preview.7.24352.15</SystemCodeDomPackageVersion>
181-
<SystemTextEncodingCodePagesPackageVersion>9.0.0-preview.7.24352.15</SystemTextEncodingCodePagesPackageVersion>
182-
<SystemResourcesExtensionsPackageVersion>9.0.0-preview.7.24352.15</SystemResourcesExtensionsPackageVersion>
180+
<SystemCodeDomPackageVersion>9.0.0-preview.7.24357.2</SystemCodeDomPackageVersion>
181+
<SystemTextEncodingCodePagesPackageVersion>9.0.0-preview.7.24357.2</SystemTextEncodingCodePagesPackageVersion>
182+
<SystemResourcesExtensionsPackageVersion>9.0.0-preview.7.24357.2</SystemResourcesExtensionsPackageVersion>
183183
</PropertyGroup>
184184
<PropertyGroup>
185185
<!-- Dependencies from https://github.com/dotnet/roslyn-analyzers -->
@@ -235,19 +235,19 @@
235235
</PropertyGroup>
236236
<PropertyGroup>
237237
<!-- Dependencies from https://github.com/aspnet/AspNetCore -->
238-
<MicrosoftAspNetCoreAppRefPackageVersion>9.0.0-preview.7.24355.2</MicrosoftAspNetCoreAppRefPackageVersion>
239-
<MicrosoftAspNetCoreDeveloperCertificatesXPlatPackageVersion>9.0.0-preview.7.24355.2</MicrosoftAspNetCoreDeveloperCertificatesXPlatPackageVersion>
240-
<MicrosoftAspNetCoreComponentsSdkAnalyzersPackageVersion>9.0.0-preview.7.24355.2</MicrosoftAspNetCoreComponentsSdkAnalyzersPackageVersion>
241-
<MicrosoftAspNetCoreMvcAnalyzersPackageVersion>9.0.0-preview.7.24355.2</MicrosoftAspNetCoreMvcAnalyzersPackageVersion>
242-
<MicrosoftAspNetCoreMvcApiAnalyzersPackageVersion>9.0.0-preview.7.24355.2</MicrosoftAspNetCoreMvcApiAnalyzersPackageVersion>
243-
<MicrosoftAspNetCoreAnalyzersPackageVersion>9.0.0-preview.7.24355.2</MicrosoftAspNetCoreAnalyzersPackageVersion>
244-
<MicrosoftAspNetCoreTestHostPackageVersion>9.0.0-preview.7.24355.2</MicrosoftAspNetCoreTestHostPackageVersion>
245-
<MicrosoftAspNetCoreAppRuntimewinx64PackageVersion>9.0.0-preview.7.24355.2</MicrosoftAspNetCoreAppRuntimewinx64PackageVersion>
246-
<MicrosoftAspNetCoreAppRefInternalPackageVersion>9.0.0-preview.7.24355.2</MicrosoftAspNetCoreAppRefInternalPackageVersion>
247-
<VSRedistCommonAspNetCoreSharedFrameworkx6490PackageVersion>9.0.0-preview.7.24355.2</VSRedistCommonAspNetCoreSharedFrameworkx6490PackageVersion>
248-
<dotnetdevcertsPackageVersion>9.0.0-preview.7.24355.2</dotnetdevcertsPackageVersion>
249-
<dotnetuserjwtsPackageVersion>9.0.0-preview.7.24355.2</dotnetuserjwtsPackageVersion>
250-
<dotnetusersecretsPackageVersion>9.0.0-preview.7.24355.2</dotnetusersecretsPackageVersion>
238+
<MicrosoftAspNetCoreAppRefPackageVersion>9.0.0-preview.7.24357.1</MicrosoftAspNetCoreAppRefPackageVersion>
239+
<MicrosoftAspNetCoreDeveloperCertificatesXPlatPackageVersion>9.0.0-preview.7.24357.1</MicrosoftAspNetCoreDeveloperCertificatesXPlatPackageVersion>
240+
<MicrosoftAspNetCoreComponentsSdkAnalyzersPackageVersion>9.0.0-preview.7.24357.1</MicrosoftAspNetCoreComponentsSdkAnalyzersPackageVersion>
241+
<MicrosoftAspNetCoreMvcAnalyzersPackageVersion>9.0.0-preview.7.24357.1</MicrosoftAspNetCoreMvcAnalyzersPackageVersion>
242+
<MicrosoftAspNetCoreMvcApiAnalyzersPackageVersion>9.0.0-preview.7.24357.1</MicrosoftAspNetCoreMvcApiAnalyzersPackageVersion>
243+
<MicrosoftAspNetCoreAnalyzersPackageVersion>9.0.0-preview.7.24357.1</MicrosoftAspNetCoreAnalyzersPackageVersion>
244+
<MicrosoftAspNetCoreTestHostPackageVersion>9.0.0-preview.7.24357.1</MicrosoftAspNetCoreTestHostPackageVersion>
245+
<MicrosoftAspNetCoreAppRuntimewinx64PackageVersion>9.0.0-preview.7.24357.1</MicrosoftAspNetCoreAppRuntimewinx64PackageVersion>
246+
<MicrosoftAspNetCoreAppRefInternalPackageVersion>9.0.0-preview.7.24357.1</MicrosoftAspNetCoreAppRefInternalPackageVersion>
247+
<VSRedistCommonAspNetCoreSharedFrameworkx6490PackageVersion>9.0.0-preview.7.24357.1</VSRedistCommonAspNetCoreSharedFrameworkx6490PackageVersion>
248+
<dotnetdevcertsPackageVersion>9.0.0-preview.7.24357.1</dotnetdevcertsPackageVersion>
249+
<dotnetuserjwtsPackageVersion>9.0.0-preview.7.24357.1</dotnetuserjwtsPackageVersion>
250+
<dotnetusersecretsPackageVersion>9.0.0-preview.7.24357.1</dotnetusersecretsPackageVersion>
251251
</PropertyGroup>
252252
<PropertyGroup>
253253
<!-- Dependencies from https://github.com/dotnet/razor -->

src/Cli/dotnet/Installer/Windows/Security/Signature.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ internal static class Signature
3030
internal static unsafe int HasMicrosoftTrustedRoot(string path)
3131
{
3232
// Create an X509Certificate2 instance so we can access the certificate context and create a chain context.
33+
#pragma warning disable SYSLIB0057 // can't use X509CertificateLoader here since it tries to parse the file as a certificate
3334
using X509Certificate2 certificate = new(path);
35+
#pragma warning restore SYSLIB0057
3436

3537
// We don't use X509Chain because it doesn't support verifying the specific policy and because we defer
3638
// that to the WinTrust provider as it performs timestamp and revocation checks.

test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ public async Task InsecureRegistry(bool isInsecureRegistry, bool serverIsHttps,
418418
X509Certificate2 serverCertificate = request.CreateSelfSigned(DateTimeOffset.Now, DateTimeOffset.Now.AddYears(1));
419419

420420
// https://stackoverflow.com/questions/72096812/loading-x509certificate2-from-pem-file-results-in-no-credentials-are-available/72101855#72101855
421-
serverCertificate = new X509Certificate2(serverCertificate.Export(X509ContentType.Pfx));
421+
serverCertificate = X509CertificateLoader.LoadPkcs12(serverCertificate.Export(X509ContentType.Pfx), password: "");
422422

423423
sslOptions = new SslServerAuthenticationOptions()
424424
{

test/Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests/WasmAoTPublishIntegrationTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ public void AoT_Publish_HostedAppWithScopedCss_VisualStudio()
7979

8080
// VS builds projects individually and then a publish with BuildDependencies=false, but building the main project is a close enough approximation for this test.
8181
var buildCommand = CreateBuildCommand(testInstance, "blazorwasm");
82-
ExecuteCommand(buildCommand, "/p:BuildInsideVisualStudio=true /p:Configuration=Release").Should().Pass();
82+
ExecuteCommand(buildCommand, "/p:BuildInsideVisualStudio=true", "/p:Configuration=Release").Should().Pass();
8383

8484
// Publish
8585
var publishCommand = CreatePublishCommand(testInstance, "blazorhosted");
86-
ExecuteCommand(publishCommand, "/p:BuildProjectReferences=false /p:BuildInsideVisualStudio=true /p:Configuration=Release").Should().Pass();
86+
ExecuteCommand(publishCommand, "/p:BuildProjectReferences=false", "/p:BuildInsideVisualStudio=true", "/p:Configuration=Release").Should().Pass();
8787

88-
var publishDirectory = publishCommand.GetOutputDirectory(DefaultTfm);
88+
var publishDirectory = publishCommand.GetOutputDirectory(DefaultTfm, "Release");
8989
var blazorPublishDirectory = Path.Combine(publishDirectory.ToString(), "wwwroot");
9090

9191
// Make sure the main project exists

test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/WasmBuildIntegrationTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public void Build_InRelease_Works()
128128
var testInstance = CreateAspNetSdkTestAsset(testAppName);
129129

130130
var buildCommand = CreateBuildCommand(testInstance, "blazorwasm");
131-
ExecuteCommand(buildCommand,"/p:Configuration=Release")
131+
ExecuteCommand(buildCommand, "/p:Configuration=Release")
132132
.Should().Pass();
133133

134134
var buildOutputDirectory = buildCommand.GetOutputDirectory(DefaultTfm, "Release").ToString();

test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/WasmPublishIntegrationTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ public void Publish_HostedApp_WithoutTrimming_Works()
706706

707707
// Publish
708708
var publishCommand = CreatePublishCommand(testInstance, "blazorhosted");
709-
ExecuteCommand(publishCommand, "/p:BuildDependencies=false /bl").Should().Pass();
709+
ExecuteCommand(publishCommand, "/p:BuildDependencies=false", "/bl").Should().Pass();
710710

711711
var publishDirectory = publishCommand.GetOutputDirectory(DefaultTfm);
712712
// Make sure the main project exists
@@ -847,7 +847,7 @@ public void Publish_HostedApp_VisualStudio()
847847

848848
// Publish
849849
var publishCommand = CreatePublishCommand(testInstance, "blazorhosted");
850-
ExecuteCommand(publishCommand, "/p:BuildProjectReferences=false /p:BuildInsideVisualStudio=true").Should().Pass();
850+
ExecuteCommand(publishCommand, "/p:BuildProjectReferences=false", "/p:BuildInsideVisualStudio=true").Should().Pass();
851851

852852
var publishDirectory = publishCommand.GetOutputDirectory(DefaultTfm);
853853
// Make sure the main project exists
@@ -927,13 +927,13 @@ public void Publish_HostedAppWithScopedCss_VisualStudio()
927927

928928
// VS builds projects individually and then a publish with BuildDependencies=false, but building the main project is a close enough approximation for this test.
929929
var buildCommand = CreateBuildCommand(testInstance, "blazorwasm");
930-
ExecuteCommand(buildCommand, "/bl:build.msbuild.binlog", "/p:BuildInsideVisualStudio=true /p:Configuration=Release").Should().Pass();
930+
ExecuteCommand(buildCommand, "/bl:build.msbuild.binlog", "/p:BuildInsideVisualStudio=true", "/p:Configuration=Release").Should().Pass();
931931

932932
// Publish
933933
var publishCommand = CreatePublishCommand(testInstance, "blazorhosted");
934-
ExecuteCommand(publishCommand, "/bl:publish.msbuild.binlog", "/p:BuildProjectReferences=false /p:BuildInsideVisualStudio=true").Should().Pass();
934+
ExecuteCommand(publishCommand, "/bl:publish.msbuild.binlog", "/p:BuildProjectReferences=false", "/p:BuildInsideVisualStudio=true", "/p:Configuration=Release").Should().Pass();
935935

936-
var publishDirectory = publishCommand.GetOutputDirectory(DefaultTfm);
936+
var publishDirectory = publishCommand.GetOutputDirectory(DefaultTfm, "Release");
937937
var blazorPublishDirectory = Path.Combine(publishDirectory.ToString(), "wwwroot");
938938

939939
// Make sure the main project exists

test/Microsoft.NET.TestFramework/AspNetSdkTest.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ protected virtual PublishCommand CreatePublishCommand(TestAsset asset, string re
129129

130130
protected virtual CommandResult ExecuteCommand(TestCommand command, params string[] arguments)
131131
{
132+
ValidateIndividualArgumentsContainNoSpaces(arguments);
133+
132134
if (_generateMSbuildLogs)
133135
{
134136
var i = 0;
@@ -145,6 +147,8 @@ protected virtual CommandResult ExecuteCommand(TestCommand command, params strin
145147

146148
protected virtual CommandResult ExecuteCommandWithoutRestore(MSBuildCommand command, params string[] arguments)
147149
{
150+
ValidateIndividualArgumentsContainNoSpaces(arguments);
151+
148152
if (_generateMSbuildLogs)
149153
{
150154
var i = 0;
@@ -158,6 +162,18 @@ protected virtual CommandResult ExecuteCommandWithoutRestore(MSBuildCommand comm
158162
}
159163
}
160164

165+
private void ValidateIndividualArgumentsContainNoSpaces(string[] arguments)
166+
{
167+
foreach (var argument in arguments)
168+
{
169+
// assume our tests don't need to pass msbuild properties with spaces
170+
if (argument.Contains(' '))
171+
{
172+
throw new ArgumentException($"Individual arguments should not contain spaces to avoid quoting issues when passing to msbuild, pass them as separate array elements instead. Argument: {argument}");
173+
}
174+
}
175+
}
176+
161177
private void ApplyDefaults(MSBuildCommand command)
162178
{
163179
if (GetNuGetCachePath() is { } cache)

0 commit comments

Comments
 (0)