Skip to content

[automated] Merge branch 'release/8.0' => 'release/8.0-staging' #115577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1d61836
Merge commit '81edc5167f1e86d35fbb5badc777420f5f6dff10'
Apr 2, 2025
62afa9d
Merge commit 'f4db909ca3522538f0c85de5ce25e16b41e27088'
Apr 3, 2025
e5e8dd5
Merge commit '01cd70a949036b5d438c75e85c476ed716a5ac21'
Apr 8, 2025
9e47be6
Merge commit '6cd8ef87e1e5b8e89ae28d3f6e61ce77d469d9ea'
Apr 11, 2025
1ca6044
Merge commit '0239fb04b1eabdfacbcc93130b27d427e4c51778'
Apr 14, 2025
a207560
Merge commit 'd0ccb5423d12af19e65deb5556ba5a72c8cee59f'
Apr 15, 2025
efd5742
Merge commit '4f67954b64888688b52ad62c4bce8836f8e6e103'
Apr 15, 2025
b33d4e3
Merged PR 49480: [internal/release/8.0] Fix issue where libhost scena…
elinor-fung May 1, 2025
2d9fa7b
Merge commit '08130757749ffc920dbe8ac71d6bb822372e5735'
May 8, 2025
038ed74
Merge commit 'ea5fb7fd53bd73cf1c480d73471a1d050d445e6a'
May 12, 2025
bba50d4
Merge commit 'efd5742bb5dd1677fbbbeb277bcfb5c9025548e5' into internal…
vseanreesermsft May 13, 2025
a507321
Merge pull request #115534 from vseanreesermsft/internal-merge-8.0-20…
jozkee May 14, 2025
8ee4ad4
Merge commit 'a507321f376ac0e4d64e4820b895b0668b3944c1'
May 14, 2025
6aebff6
Merge pull request #115498 from jozkee/release/8.0-staging
jozkee May 15, 2025
a3f4ac1
Merge commit '6aebff6a34fe10fccab3e809cefce9b060fdfc5c'
May 15, 2025
4e873a1
update macos signing to use pme (#115633)
github-actions[bot] May 16, 2025
77545d6
Merge commit '4e873a1af5537735e59e7f8cc7368ea26db0cd45'
May 16, 2025
c039058
Update branding to 8.0.18 (#116311)
vseanreesermsft Jun 9, 2025
3293017
[release/8.0] Update dependencies from dotnet/emsdk (#115655)
dotnet-maestro[bot] Jun 9, 2025
a4abcd1
Turn off packages that shipped previous month
jozkee Jun 10, 2025
56fecbb
Merge pull request #116458 from jozkee/release/8.0-staging
jozkee Jun 10, 2025
120fd9a
Merge commit '77545d6fd5ca79bc08198fd6d8037c14843f14ad' into internal…
vseanreesermsft Jun 10, 2025
5b9ae97
Merged PR 49480: [internal/release/8.0] Fix issue where libhost scena…
vseanreesermsft Jun 11, 2025
1c517b7
Revert "Merged PR 49480: [internal/release/8.0] Fix issue where libho…
hoyosjs Jun 11, 2025
5d23275
Merge pull request #116554 from vseanreesermsft/internal-merge-8.0-20…
hoyosjs Jun 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-emsdk -->
<add key="darc-pub-dotnet-emsdk-2b0cca8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-2b0cca8a/nuget/v3/index.json" />
<add key="darc-pub-dotnet-emsdk-976b101" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-976b101e/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-emsdk -->
<!-- Begin: Package sources from dotnet-sdk -->
<!-- End: Package sources from dotnet-sdk -->
Expand Down
8 changes: 4 additions & 4 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@
<Sha>45dd3a73dd5b64b010c4251303b3664bb30df029</Sha>
<SourceBuild RepoName="cecil" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100" Version="8.0.17">
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100" Version="8.0.18">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>2b0cca8ad3a88e02fe0878139009ffffde071f1f</Sha>
<Sha>976b101e5539557c20e2ac39885ac879531bcf82</Sha>
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.emsdk" Version="8.0.17-servicing.25258.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.emsdk" Version="8.0.18-servicing.25304.1">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>2b0cca8ad3a88e02fe0878139009ffffde071f1f</Sha>
<Sha>976b101e5539557c20e2ac39885ac879531bcf82</Sha>
<SourceBuild RepoName="emsdk" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.25210.2">
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project>
<PropertyGroup>
<!-- The .NET product branding version -->
<ProductVersion>8.0.17</ProductVersion>
<ProductVersion>8.0.18</ProductVersion>
<!-- File version numbers -->
<MajorVersion>8</MajorVersion>
<MinorVersion>0</MinorVersion>
<PatchVersion>17</PatchVersion>
<PatchVersion>18</PatchVersion>
<SdkBandVersion>8.0.100</SdkBandVersion>
<PackageVersionNet7>7.0.20</PackageVersionNet7>
<PackageVersionNet6>6.0.36</PackageVersionNet6>
Expand Down Expand Up @@ -252,7 +252,7 @@
Note: when the name is updated, make sure to update dependency name in eng/pipelines/common/xplat-setup.yml
like - DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Current_Manifest-8_0_100_Transport
-->
<MicrosoftNETWorkloadEmscriptenCurrentManifest80100Version>8.0.17</MicrosoftNETWorkloadEmscriptenCurrentManifest80100Version>
<MicrosoftNETWorkloadEmscriptenCurrentManifest80100Version>8.0.18</MicrosoftNETWorkloadEmscriptenCurrentManifest80100Version>
<MicrosoftNETRuntimeEmscriptenVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest80100Version)</MicrosoftNETRuntimeEmscriptenVersion>
<!-- workloads -->
<SwixPackageVersion>1.1.87-gba258badda</SwixPackageVersion>
Expand Down
13 changes: 7 additions & 6 deletions eng/pipelines/common/macos-sign-with-entitlements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ steps:
- task: EsrpCodeSigning@5
displayName: 'ESRP CodeSigning'
inputs:
ConnectedServiceName: 'DotNet-Engineering-Services_KeyVault'
AppRegistrationClientId: '28ec6507-2167-4eaa-a294-34408cf5dd0e'
AppRegistrationTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47'
AuthAKVName: 'EngKeyVault'
AuthCertName: 'DotNetCore-ESRP-AuthCert'
AuthSignCertName: 'DotNetCore-ESRP-AuthSignCert'
ConnectedServiceName: 'DotNetBuildESRP'
UseMSIAuthentication: true
EsrpClientId: '28ec6507-2167-4eaa-a294-34408cf5dd0e'
AppRegistrationClientId: '0ecbcdb7-8451-4cbe-940a-4ed97b08b955'
AppRegistrationTenantId: '975f013f-7f24-47e8-a7d3-abc4752bf346'
AuthAKVName: 'DotNetEngKeyVault'
AuthSignCertName: 'DotNet-ESRP-AuthSignCert'
FolderPath: '$(Build.ArtifactStagingDirectory)/'
Pattern: 'mac_entitled_to_sign.zip'
UseMinimatch: true
Expand Down
29 changes: 29 additions & 0 deletions src/installer/tests/HostActivation.Tests/NativeHosting/Comhost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,35 @@ public void ActivateClass_IgnoreAppLocalHostFxr()
}
}

[Fact]
public void ActivateClass_IgnoreWorkingDirectory()
{
using (TestArtifact cwd = TestArtifact.Create("cwd"))
{
// Validate that hosting components in the working directory will not be used
File.Copy(Binaries.CoreClr.MockPath, Path.Combine(cwd.Location, Binaries.CoreClr.FileName));
File.Copy(Binaries.HostFxr.MockPath_5_0, Path.Combine(cwd.Location, Binaries.HostFxr.FileName));
File.Copy(Binaries.HostPolicy.MockPath, Path.Combine(cwd.Location, Binaries.HostPolicy.FileName));

string[] args = {
"comhost",
"synchronous",
"1",
sharedState.ComHostPath,
sharedState.ClsidString
};
sharedState.CreateNativeHostCommand(args, sharedState.ComLibraryFixture.BuiltDotnet.BinPath)
.WorkingDirectory(cwd.Location)
.Execute()
.Should().Pass()
.And.HaveStdOutContaining("New instance of Server created")
.And.HaveStdOutContaining($"Activation of {sharedState.ClsidString} succeeded.")
.And.ResolveHostFxr(sharedState.ComLibraryFixture.BuiltDotnet)
.And.ResolveHostPolicy(sharedState.ComLibraryFixture.BuiltDotnet)
.And.ResolveCoreClr(sharedState.ComLibraryFixture.BuiltDotnet);
}
}

[Fact]
public void ActivateClass_ValidateIErrorInfoResult()
{
Expand Down
28 changes: 28 additions & 0 deletions src/installer/tests/HostActivation.Tests/NativeHosting/Ijwhost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,34 @@ public void LoadLibrary_ContextConfig(bool load_isolated)
}
}

[Fact]
public void LoadLibrary_IgnoreWorkingDirectory()
{
using (TestArtifact cwd = TestArtifact.Create("cwd"))
{
// Validate that hosting components in the working directory will not be used
File.Copy(Binaries.CoreClr.MockPath, Path.Combine(cwd.Location, Binaries.CoreClr.FileName));
File.Copy(Binaries.HostFxr.MockPath_5_0, Path.Combine(cwd.Location, Binaries.HostFxr.FileName));
File.Copy(Binaries.HostPolicy.MockPath, Path.Combine(cwd.Location, Binaries.HostPolicy.FileName));

string [] args = {
"ijwhost",
sharedState.IjwApp.AppDll,
"NativeEntryPoint"
};
var dotnet = new Microsoft.DotNet.Cli.Build.DotNetCli(sharedState.RepoDirectories.BuiltDotnet);
sharedState.CreateNativeHostCommand(args, sharedState.RepoDirectories.BuiltDotnet)
.WorkingDirectory(cwd.Location)
.Execute()
.Should().Pass()
.And.HaveStdOutContaining("[C++/CLI] NativeEntryPoint: calling managed class")
.And.HaveStdOutContaining("[C++/CLI] ManagedClass: AssemblyLoadContext = \"Default\" System.Runtime.Loader.DefaultAssemblyLoadContext")
.And.ResolveHostFxr(dotnet)
.And.ResolveHostPolicy(dotnet)
.And.ResolveCoreClr(dotnet);
}
}

[Theory]
[InlineData(true)]
[InlineData(false)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,38 @@ public void CallDelegateOnComponentContext_UnhandledException()
.And.ExecuteFunctionPointerWithException(entryPoint, 1);
}

[Fact]
public void CallDelegateOnComponentContext_IgnoreWorkingDirectory()
{
using (TestArtifact cwd = TestArtifact.Create("cwd"))
{
// Validate that hosting components in the working directory will not be used
File.Copy(Binaries.CoreClr.MockPath, Path.Combine(cwd.Location, Binaries.CoreClr.FileName));
File.Copy(Binaries.HostPolicy.MockPath, Path.Combine(cwd.Location, Binaries.HostPolicy.FileName));

var component = sharedState.ComponentWithNoDependenciesFixture.TestProject;
string[] args =
{
ComponentLoadAssemblyAndGetFunctionPointerArg,
sharedState.HostFxrPath,
component.RuntimeConfigJson,
component.AppDll,
sharedState.ComponentTypeName,
sharedState.ComponentEntryPoint1,
};

var dotnet = new Microsoft.DotNet.Cli.Build.DotNetCli(sharedState.DotNetRoot);
sharedState.CreateNativeHostCommand(args, sharedState.DotNetRoot)
.WorkingDirectory(cwd.Location)
.Execute()
.Should().Pass()
.And.InitializeContextForConfig(component.RuntimeConfigJson)
.And.ExecuteFunctionPointer(sharedState.ComponentEntryPoint1, 1, 1)
.And.ResolveHostPolicy(dotnet)
.And.ResolveCoreClr(dotnet);
}
}

public class SharedTestState : SharedTestStateBase
{
public string HostFxrPath { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.IO;

namespace Microsoft.DotNet.CoreSetup.Test.HostActivation.NativeHosting
{
internal static class FunctionPointerResultExtensions
internal static class NativeHostingResultExtensions
{
public static FluentAssertions.AndConstraint<CommandResultAssertions> ExecuteFunctionPointer(this CommandResultAssertions assertion, string methodName, int callCount, int returnValue)
{
Expand Down Expand Up @@ -47,5 +48,21 @@ public static FluentAssertions.AndConstraint<CommandResultAssertions> ExecuteWit
{
return assertion.HaveStdOutContaining($"{assemblyName}: Location = '{location}'");
}

public static FluentAssertions.AndConstraint<CommandResultAssertions> ResolveHostFxr(this CommandResultAssertions assertion, Microsoft.DotNet.Cli.Build.DotNetCli dotnet)
{
return assertion.HaveStdErrContaining($"Resolved fxr [{dotnet.GreatestVersionHostFxrFilePath}]");
}

public static FluentAssertions.AndConstraint<CommandResultAssertions> ResolveHostPolicy(this CommandResultAssertions assertion, Microsoft.DotNet.Cli.Build.DotNetCli dotnet)
{
return assertion.HaveStdErrContaining($"{Binaries.HostPolicy.FileName} directory is [{dotnet.GreatestVersionSharedFxPath}]");
}

public static FluentAssertions.AndConstraint<CommandResultAssertions> ResolveCoreClr(this CommandResultAssertions assertion, Microsoft.DotNet.Cli.Build.DotNetCli dotnet)
{
return assertion.HaveStdErrContaining($"CoreCLR path = '{Path.Combine(dotnet.GreatestVersionSharedFxPath, Binaries.CoreClr.FileName)}'")
.And.HaveStdErrContaining($"CoreCLR dir = '{dotnet.GreatestVersionSharedFxPath}{Path.DirectorySeparatorChar}'");
}
}
}
14 changes: 14 additions & 0 deletions src/installer/tests/TestUtils/TestArtifact.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ protected TestArtifact(TestArtifact source)
source._copies.Add(this);
}

/// <summary>
/// Create a new test artifact.
/// </summary>
/// <param name="name">Name of the test artifact</param>
/// <returns>Test artifact containing no files</returns>
public static TestArtifact Create(string name)
{
var (location, parentPath) = GetNewTestArtifactPath(name);
return new TestArtifact(location)
{
DirectoryToDelete = parentPath
};
}

protected void RegisterCopy(TestArtifact artifact)
{
_copies.Add(artifact);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<ServicingVersion>2</ServicingVersion>
<AddNETFrameworkPlaceholderFileToPackage>true</AddNETFrameworkPlaceholderFileToPackage>
<AddNETFrameworkAssemblyReferenceToPackage>true</AddNETFrameworkAssemblyReferenceToPackage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<ServicingVersion>3</ServicingVersion>
<PackageDescription>Provides a message handler for HttpClient based on the WinHTTP interface of Windows. While similar to HttpClientHandler, it provides developers more granular control over the application's HTTP communication than the HttpClientHandler.

Expand Down
5 changes: 5 additions & 0 deletions src/native/corehost/apphost/standalone/hostfxr_resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ hostfxr_resolver_t::hostfxr_resolver_t(const pal::string_t& app_root)
{
m_status_code = StatusCode::CoreHostLibMissingFailure;
}
else if (!pal::is_path_rooted(m_fxr_path))
{
// We should always be loading hostfxr from an absolute path
m_status_code = StatusCode::CoreHostLibMissingFailure;
}
else if (pal::load_library(&m_fxr_path, &m_hostfxr_dll))
{
m_status_code = StatusCode::Success;
Expand Down
4 changes: 4 additions & 0 deletions src/native/corehost/fxr/standalone/hostpolicy_resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ int hostpolicy_resolver::load(
return StatusCode::CoreHostLibMissingFailure;
}

// We should always be loading hostpolicy from an absolute path
if (!pal::is_path_rooted(host_path))
return StatusCode::CoreHostLibMissingFailure;

// Load library
// We expect to leak hostpolicy - just as we do not unload coreclr, we do not unload hostpolicy
if (!pal::load_library(&host_path, &g_hostpolicy))
Expand Down
4 changes: 4 additions & 0 deletions src/native/corehost/fxr_resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ int load_fxr_and_get_delegate(hostfxr_delegate_type type, THostPathToConfigCallb
return StatusCode::CoreHostLibMissingFailure;
}

// We should always be loading hostfxr from an absolute path
if (!pal::is_path_rooted(fxr_path))
return StatusCode::CoreHostLibMissingFailure;

// Load library
if (!pal::load_library(&fxr_path, &fxr))
{
Expand Down
14 changes: 11 additions & 3 deletions src/native/corehost/hostpolicy/deps_resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,13 +830,21 @@ bool deps_resolver_t::resolve_probe_dirs(
}
}

// If the deps file is missing add known locations.
if (!get_app_deps().exists())
// If the deps file is missing for the app, add known locations.
// For libhost scenarios, there is no app or app path
if (m_host_mode != host_mode_t::libhost && !get_app_deps().exists())
{
assert(!m_app_dir.empty());

// App local path
add_unique_path(asset_type, m_app_dir, &items, output, &non_serviced, core_servicing);

(void) library_exists_in_dir(m_app_dir, LIBCORECLR_NAME, &m_coreclr_path);
if (m_coreclr_path.empty())
{
// deps_resolver treats being able to get the coreclr path as optional, so we ignore the return value here.
// The caller is responsible for checking whether coreclr path is set and handling as appropriate.
(void) library_exists_in_dir(m_app_dir, LIBCORECLR_NAME, &m_coreclr_path);
}
}

// Handle any additional deps.json that were specified.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ bool coreclr_resolver_t::resolve_coreclr(const pal::string_t& libcoreclr_path, c
pal::string_t coreclr_dll_path(libcoreclr_path);
append_path(&coreclr_dll_path, LIBCORECLR_NAME);

// We should always be loading coreclr from an absolute path
if (!pal::is_path_rooted(coreclr_dll_path))
return false;

if (!pal::load_library(&coreclr_dll_path, &coreclr_resolver_contract.coreclr))
{
return false;
Expand Down
Loading