diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 11f9f38c5cc7..f46c4cd01b97 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,41 +26,41 @@ https://github.com/dotnet/templating 377229eee1952a8e8aef27d392f74f604e3ff5e7 - + https://github.com/dotnet/runtime - 9ad302604c492522b4697aedc2ffea42fa53d08f + 2c31641b96d880dfb74d46fe63a91c8b35737cab - + https://github.com/dotnet/runtime - 9ad302604c492522b4697aedc2ffea42fa53d08f + 2c31641b96d880dfb74d46fe63a91c8b35737cab - + https://github.com/dotnet/runtime - 9ad302604c492522b4697aedc2ffea42fa53d08f + 2c31641b96d880dfb74d46fe63a91c8b35737cab - + https://github.com/dotnet/runtime - 9ad302604c492522b4697aedc2ffea42fa53d08f + 2c31641b96d880dfb74d46fe63a91c8b35737cab - + https://github.com/dotnet/runtime - 9ad302604c492522b4697aedc2ffea42fa53d08f + 2c31641b96d880dfb74d46fe63a91c8b35737cab - + https://github.com/dotnet/runtime - 9ad302604c492522b4697aedc2ffea42fa53d08f + 2c31641b96d880dfb74d46fe63a91c8b35737cab - + https://github.com/dotnet/runtime - 9ad302604c492522b4697aedc2ffea42fa53d08f + 2c31641b96d880dfb74d46fe63a91c8b35737cab - + https://github.com/dotnet/runtime - 9ad302604c492522b4697aedc2ffea42fa53d08f + 2c31641b96d880dfb74d46fe63a91c8b35737cab - + https://github.com/dotnet/runtime - aafa91036e1efd3d4dcb67eeb261cb6d8f774685 + 2c31641b96d880dfb74d46fe63a91c8b35737cab https://github.com/dotnet/msbuild @@ -130,30 +130,30 @@ 60f48c55b5e0183bd1cee4cfa14f1d9ad3d90935 - + https://github.com/dotnet/runtime - 9ad302604c492522b4697aedc2ffea42fa53d08f + 2c31641b96d880dfb74d46fe63a91c8b35737cab https://github.com/dotnet/linker 60f48c55b5e0183bd1cee4cfa14f1d9ad3d90935 - + https://github.com/dotnet/runtime - 9ad302604c492522b4697aedc2ffea42fa53d08f + 2c31641b96d880dfb74d46fe63a91c8b35737cab - + https://github.com/dotnet/runtime - 9ad302604c492522b4697aedc2ffea42fa53d08f + 2c31641b96d880dfb74d46fe63a91c8b35737cab - + https://github.com/dotnet/runtime - 9ad302604c492522b4697aedc2ffea42fa53d08f + 2c31641b96d880dfb74d46fe63a91c8b35737cab - + https://github.com/dotnet/runtime - 9ad302604c492522b4697aedc2ffea42fa53d08f + 2c31641b96d880dfb74d46fe63a91c8b35737cab https://github.com/dotnet/windowsdesktop @@ -299,9 +299,9 @@ https://github.com/dotnet/arcade 6bf3e1d9cd29fe839be38a4c051aa307cf96f5d0 - + https://github.com/dotnet/runtime - 9ad302604c492522b4697aedc2ffea42fa53d08f + 2c31641b96d880dfb74d46fe63a91c8b35737cab https://github.com/dotnet/xliff-tasks diff --git a/eng/Versions.props b/eng/Versions.props index 7e98f0752aeb..710f47ad2975 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -34,12 +34,12 @@ 6.0.0 7.0.0-beta.22368.5 3.1.0 - 7.0.0-rc.1.22368.8 + 7.0.0-rc.1.22376.8 4.3.0 4.3.0 4.0.5 6.0.0 - 7.0.0-rc.1.22368.8 + 7.0.0-rc.1.22376.8 4.6.0 2.0.0-beta4.22368.1 1.0.0-preview5.1.22263.1 @@ -47,13 +47,13 @@ - 7.0.0-rc.1.22368.8 - 7.0.0-rc.1.22368.8 - 7.0.0-rc.1.22368.8 + 7.0.0-rc.1.22376.8 + 7.0.0-rc.1.22376.8 + 7.0.0-rc.1.22376.8 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) - 7.0.0-rc.1.22368.8 - 7.0.0-rc.1.22367.4 - 7.0.0-rc.1.22368.8 + 7.0.0-rc.1.22376.8 + 7.0.0-rc.1.22376.8 + 7.0.0-rc.1.22376.8 6.0.0-preview.7.21363.9 $(MicrosoftExtensionsDependencyModelPackageVersion) 7.0.0-preview.4.22201.3 @@ -88,10 +88,10 @@ - 7.0.0-rc.1.22368.8 - 7.0.0-rc.1.22368.8 - 7.0.0-rc.1.22368.8 - 7.0.0-rc.1.22368.8 + 7.0.0-rc.1.22376.8 + 7.0.0-rc.1.22376.8 + 7.0.0-rc.1.22376.8 + 7.0.0-rc.1.22376.8 diff --git a/src/Cli/dotnet/Installer/Windows/TimestampedFileLogger.cs b/src/Cli/dotnet/Installer/Windows/TimestampedFileLogger.cs index 2d0ac6a69944..841d5aa0d8b9 100644 --- a/src/Cli/dotnet/Installer/Windows/TimestampedFileLogger.cs +++ b/src/Cli/dotnet/Installer/Windows/TimestampedFileLogger.cs @@ -182,7 +182,7 @@ private void WriteLog(object flushThreshold) /// The message to log. protected override void WriteMessage(string message) { - if (!_messageQueue.IsCompleted) + if (!_messageQueue.IsAddingCompleted) { _messageQueue.Add(message); } diff --git a/src/Cli/dotnet/ShellShim/AppHostShimMaker.cs b/src/Cli/dotnet/ShellShim/AppHostShimMaker.cs index 32c350f5d571..b6ed4d818890 100644 --- a/src/Cli/dotnet/ShellShim/AppHostShimMaker.cs +++ b/src/Cli/dotnet/ShellShim/AppHostShimMaker.cs @@ -51,17 +51,17 @@ public void CreateApphostShellShim(FilePath entryPoint, FilePath shimPath) appHostDestinationFilePath: appHostDestinationFilePath, appBinaryFilePath: appBinaryFilePath, windowsGraphicalUserInterface: (windowsGraphicalUserInterfaceBit == WindowsGUISubsystem), - assemblyToCopyResorcesFrom: entryPointFullPath); + assemblyToCopyResourcesFrom: entryPointFullPath); } else { - // by passing null to assemblyToCopyResorcesFrom, it will skip copying resources, + // by passing null to assemblyToCopyResourcesFrom, it will skip copying resources, // which is only supported on Windows HostWriter.CreateAppHost(appHostSourceFilePath: appHostSourcePath, appHostDestinationFilePath: appHostDestinationFilePath, appBinaryFilePath: appBinaryFilePath, windowsGraphicalUserInterface: false, - assemblyToCopyResorcesFrom: null, + assemblyToCopyResourcesFrom: null, enableMacOSCodeSign: OperatingSystem.IsMacOS()); } diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/CreateAppHost.cs b/src/Tasks/Microsoft.NET.Build.Tasks/CreateAppHost.cs index 728a32592976..44f3a572a0c3 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/CreateAppHost.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/CreateAppHost.cs @@ -77,7 +77,7 @@ protected override void ExecuteCore() appHostDestinationFilePath: AppHostDestinationPath, appBinaryFilePath: AppBinaryName, windowsGraphicalUserInterface: isGUI, - assemblyToCopyResorcesFrom: resourcesAssembly, + assemblyToCopyResourcesFrom: resourcesAssembly, enableMacOSCodeSign: EnableMacOSCodeSign); return; } diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateShims.cs b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateShims.cs index 604400cc2ff0..e79d02bb9f09 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateShims.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateShims.cs @@ -120,11 +120,11 @@ protected override void ExecuteCore() appHostDestinationFilePath: appHostDestinationFilePath, appBinaryFilePath: appBinaryFilePath, windowsGraphicalUserInterface: windowsGraphicalUserInterface, - assemblyToCopyResorcesFrom: IntermediateAssembly); + assemblyToCopyResourcesFrom: IntermediateAssembly); } else { - // by passing null to assemblyToCopyResorcesFrom, it will skip copying resources, + // by passing null to assemblyToCopyResourcesFrom, it will skip copying resources, // which is only supported on Windows if (windowsGraphicalUserInterface) { @@ -135,7 +135,7 @@ protected override void ExecuteCore() appHostDestinationFilePath: appHostDestinationFilePath, appBinaryFilePath: appBinaryFilePath, windowsGraphicalUserInterface: false, - assemblyToCopyResorcesFrom: null); + assemblyToCopyResourcesFrom: null); } } catch (AppNameTooLongException ex) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILCompiler.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILCompiler.targets deleted file mode 100644 index 1fbd4806ef1e..000000000000 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILCompiler.targets +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props index f92f45f8bfc2..2984614c21a5 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props @@ -153,6 +153,7 @@ Copyright (c) .NET Foundation. All rights reserved. + diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets index e207114a17af..056e4d5bc7aa 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets @@ -1159,7 +1159,7 @@ Copyright (c) .NET Foundation. All rights reserved. - + diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs index e5379bdbe995..07b7d06f841a 100644 --- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs +++ b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs @@ -225,6 +225,55 @@ public void NativeAot_app_builds_with_config_when_PublishAot_is_enabled(string t } } + [RequiresMSBuildVersionTheory("17.0.0.32901")] + [InlineData(ToolsetInfo.CurrentTargetFramework)] + public void NativeAot_hw_runs_with_PackageReference_PublishAot_is_enabled(string targetFramework) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + var projectName = "HellowWorldNativeAotApp"; + var rid = EnvironmentInfo.GetCompatibleRid(targetFramework); + + var testProject = CreateHelloWorldTestProject(targetFramework, projectName, true); + testProject.AdditionalProperties["PublishAot"] = "true"; + + // This will add a reference to a package that will also be automatically imported by the SDK + testProject.PackageReferences.Add(new TestPackageReference("Microsoft.DotNet.ILCompiler", "7.0.0-*")); + + // Linux symbol files are embedded and require additional steps to be stripped to a separate file + // assumes /bin (or /usr/bin) are in the PATH + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + testProject.AdditionalProperties["StripSymbols"] = "true"; + testProject.AdditionalProperties["ObjCopyName"] = "objcopy"; + } + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); + publishCommand + .Execute($"/p:RuntimeIdentifier={rid}") + .Should().Pass(); + + var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; + var sharedLibSuffix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".dll" : ".so"; + var publishedDll = Path.Combine(publishDirectory, $"{projectName}{sharedLibSuffix}"); + var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}"); + var symbolSuffix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".pdb" : ".dbg"; + var publishedDebugFile = Path.Combine(publishDirectory, $"{testProject.Name}{symbolSuffix}"); + + // NativeAOT published dir should not contain a non-host stand alone package + File.Exists(publishedDll).Should().BeFalse(); + // The exe exist and should be native + File.Exists(publishedExe).Should().BeTrue(); + File.Exists(publishedDebugFile).Should().BeTrue(); + IsNativeImage(publishedExe).Should().BeTrue(); + + var command = new RunExeCommand(Log, publishedExe) + .Execute().Should().Pass() + .And.HaveStdOutContaining("Hello World"); + } + } + [RequiresMSBuildVersionTheory("17.0.0.32901")] [InlineData(ToolsetInfo.CurrentTargetFramework)] public void Only_Aot_warnings_are_produced_if_EnableAotAnalyzer_is_set(string targetFramework) diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs index 0d70f3ead7ec..52a419889133 100644 --- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs +++ b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs @@ -653,6 +653,7 @@ public void ILLink_verify_analysis_warnings_hello_world_app_trim_mode_copyused(s "ILLink : Trim analysis warning IL2026: System.StartupHookProvider.ProcessStartupHooks(", "ILLink : Trim analysis warning IL2063: System.RuntimeType.GetInterface(String, Boolean", "ILLink : Trim analysis warning IL2065: System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(Type", + "ILLink : Trim analysis warning IL2026: Internal.Runtime.InteropServices.ComActivator.GetClassFactoryForTypeInternal(ComActivationContextInternal*", }; var testProject = CreateTestProjectForILLinkTesting(targetFramework, projectName);