Skip to content

Commit d6a4c47

Browse files
authored
[release/10.0.1xx] Source code updates from dotnet/dotnet (#51633)
2 parents d4fc09a + ef10228 commit d6a4c47

File tree

13 files changed

+478
-417
lines changed

13 files changed

+478
-417
lines changed

NuGet.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<clear />
55
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
66
<!-- Begin: Package sources from dotnet-dotnet -->
7-
<add key="darc-pub-dotnet-dotnet-50d7970" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-dotnet-50d79701/nuget/v3/index.json" />
7+
<add key="darc-pub-dotnet-dotnet-e17b0d0" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-dotnet-e17b0d08/nuget/v3/index.json" />
88
<!-- End: Package sources from dotnet-dotnet -->
99
<!-- Begin: Package sources from microsoft-testfx -->
1010
<!-- End: Package sources from microsoft-testfx -->

eng/Version.Details.props

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

eng/Version.Details.xml

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

eng/Versions.props

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
<VersionMajor>10</VersionMajor>
88
<VersionMinor>0</VersionMinor>
99
<VersionSDKMinor>1</VersionSDKMinor>
10-
<VersionFeature>00</VersionFeature>
10+
<VersionSDKMinorPatch>1</VersionSDKMinorPatch>
11+
<VersionFeature>$([System.String]::Copy('$(VersionSDKMinorPatch)').PadLeft(2, '0'))</VersionFeature>
1112
<!-- This property powers the SdkAnalysisLevel property in end-user MSBuild code.
1213
It should always be the hundreds-value of the current SDK version, never any
1314
preview version components or anything else. E.g. 8.0.100, 9.0.300, etc. -->
@@ -20,10 +21,8 @@
2021
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
2122
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
2223
<!-- Calculate prerelease label -->
23-
<PreReleaseVersionLabel Condition="'$(StabilizePackageVersion)' != 'true'">rtm</PreReleaseVersionLabel>
24-
<PreReleaseVersionLabel Condition="'$(StabilizePackageVersion)' == 'true' and $(VersionPrefix.EndsWith('00'))">rtm</PreReleaseVersionLabel>
25-
<PreReleaseVersionLabel Condition="'$(StabilizePackageVersion)' == 'true' and !$(VersionPrefix.EndsWith('00'))">servicing</PreReleaseVersionLabel>
26-
<PreReleaseVersionIteration Condition="'$(StabilizePackageVersion)' != 'true'"></PreReleaseVersionIteration>
24+
<PreReleaseVersionLabel>servicing</PreReleaseVersionLabel>
25+
<PreReleaseVersionIteration></PreReleaseVersionIteration>
2726
<!-- In source-build the version of the compiler must be same or newer than the version of the
2827
compiler API targeted by analyzer assemblies. This is mostly an issue on source-build as
2928
in that build mode analyzer assemblies always target the live compiler API. -->

eng/common/SetupNugetSources.ps1

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This script adds internal feeds required to build commits that depend on internal package sources. For instance,
2-
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables
3-
# disabled internal Maestro (darc-int*) feeds.
2+
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. Similarly,
3+
# dotnet-eng-internal and dotnet-tools-internal are added if dotnet-eng and dotnet-tools are present.
4+
# In addition, this script also enables disabled internal Maestro (darc-int*) feeds.
45
#
56
# Optionally, this script also adds a credential entry for each of the internal feeds if supplied.
67
#
@@ -173,4 +174,16 @@ foreach ($dotnetVersion in $dotnetVersions) {
173174
}
174175
}
175176

177+
# Check for dotnet-eng and add dotnet-eng-internal if present
178+
$dotnetEngSource = $sources.SelectSingleNode("add[@key='dotnet-eng']")
179+
if ($dotnetEngSource -ne $null) {
180+
AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "dotnet-eng-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-eng-internal/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password
181+
}
182+
183+
# Check for dotnet-tools and add dotnet-tools-internal if present
184+
$dotnetToolsSource = $sources.SelectSingleNode("add[@key='dotnet-tools']")
185+
if ($dotnetToolsSource -ne $null) {
186+
AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "dotnet-tools-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password
187+
}
188+
176189
$doc.Save($filename)

eng/common/SetupNugetSources.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/usr/bin/env bash
22

33
# This script adds internal feeds required to build commits that depend on internal package sources. For instance,
4-
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables
5-
# disabled internal Maestro (darc-int*) feeds.
4+
# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. Similarly,
5+
# dotnet-eng-internal and dotnet-tools-internal are added if dotnet-eng and dotnet-tools are present.
6+
# In addition, this script also enables disabled internal Maestro (darc-int*) feeds.
67
#
78
# Optionally, this script also adds a credential entry for each of the internal feeds if supplied.
89
#
@@ -173,6 +174,18 @@ for DotNetVersion in ${DotNetVersions[@]} ; do
173174
fi
174175
done
175176

177+
# Check for dotnet-eng and add dotnet-eng-internal if present
178+
grep -i "<add key=\"dotnet-eng\"" $ConfigFile > /dev/null
179+
if [ "$?" == "0" ]; then
180+
AddOrEnablePackageSource "dotnet-eng-internal" "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-eng-internal/nuget/$FeedSuffix"
181+
fi
182+
183+
# Check for dotnet-tools and add dotnet-tools-internal if present
184+
grep -i "<add key=\"dotnet-tools\"" $ConfigFile > /dev/null
185+
if [ "$?" == "0" ]; then
186+
AddOrEnablePackageSource "dotnet-tools-internal" "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/$FeedSuffix"
187+
fi
188+
176189
# I want things split line by line
177190
PrevIFS=$IFS
178191
IFS=$'\n'

eng/common/core-templates/steps/install-microbuild.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,22 @@ parameters:
1111
# Unfortunately, _SignType can't be used to exclude the use of the service connection in non-real sign scenarios. The
1212
# variable is not available in template expression. _SignType has a very large proliferation across .NET, so replacing it is tough.
1313
microbuildUseESRP: true
14-
# Location of the MicroBuild output folder
15-
# NOTE: There's something that relies on this being in the "default" source directory for tasks such as Signing to work properly.
16-
microBuildOutputFolder: '$(Build.SourcesDirectory)'
1714

1815
continueOnError: false
1916

2017
steps:
2118
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
2219
- ${{ if eq(parameters.enableMicrobuildForMacAndLinux, 'true') }}:
23-
# Needed to download the MicroBuild plugin nupkgs on Mac and Linux when nuget.exe is unavailable
20+
# Installing .NET 8 is required to use the MicroBuild signing plugin on non-Windows platforms
2421
- task: UseDotNet@2
2522
displayName: Install .NET 8.0 SDK for MicroBuild Plugin
2623
inputs:
2724
packageType: sdk
2825
version: 8.0.x
29-
installationPath: ${{ parameters.microBuildOutputFolder }}/.dotnet
30-
workingDirectory: ${{ parameters.microBuildOutputFolder }}
26+
# Installing the SDK in a '.dotnet-microbuild' directory is required for signing.
27+
# See target FindDotNetPathForMicroBuild in arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj
28+
# Do not remove '.dotnet-microbuild' from the path without changing the corresponding logic.
29+
installationPath: $(Agent.TempDirectory)/.dotnet-microbuild
3130
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
3231

3332
- script: |
@@ -65,7 +64,7 @@ steps:
6564
ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
6665
env:
6766
TeamName: $(_TeamName)
68-
MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}
67+
MicroBuildOutputFolderOverride: $(Agent.TempDirectory)/MicroBuild
6968
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
7069
continueOnError: ${{ parameters.continueOnError }}
7170
condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'), in(variables['_SignType'], 'real', 'test'))
@@ -85,7 +84,7 @@ steps:
8584
ConnectedPMEServiceName: c24de2a5-cc7a-493d-95e4-8e5ff5cad2bc
8685
env:
8786
TeamName: $(_TeamName)
88-
MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}
87+
MicroBuildOutputFolderOverride: $(Agent.TempDirectory)/MicroBuild
8988
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
9089
continueOnError: ${{ parameters.continueOnError }}
9190
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'), eq(variables['_SignType'], 'real'))

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
}
2222
},
2323
"msbuild-sdks": {
24-
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25520.117",
25-
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25520.117",
24+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25555.106",
25+
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25555.106",
2626
"Microsoft.Build.NoTargets": "3.7.0",
2727
"Microsoft.Build.Traversal": "3.4.0",
2828
"Microsoft.WixToolset.Sdk": "5.0.2-dotnet.2811440"

src/Cli/dotnet/Commands/Run/CSharpCompilerCommand.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using Microsoft.DotNet.Cli.Utils.Extensions;
1313
using Microsoft.NET.HostModel.AppHost;
1414
using NuGet.Configuration;
15+
using NuGet.Versioning;
1516

1617
namespace Microsoft.DotNet.Cli.Commands.Run;
1718

@@ -44,6 +45,7 @@ internal sealed partial class CSharpCompilerCommand
4445
private static string ClientDirectory => field ??= Path.Combine(SdkPath, "Roslyn", "bincore");
4546
private static string NuGetCachePath => field ??= SettingsUtility.GetGlobalPackagesFolder(Settings.LoadDefaultSettings(null));
4647
internal static string RuntimeVersion => field ??= RuntimeInformation.FrameworkDescription.Split(' ').Last();
48+
private static string DefaultRuntimeVersion => field ??= GetDefaultRuntimeVersion();
4749
private static string TargetFrameworkVersion => Product.TargetFrameworkVersion;
4850

4951
public required string EntryPointFileFullPath { get; init; }
@@ -285,7 +287,7 @@ private void PrepareAuxiliaryFiles(out string rspPath)
285287
"tfm": "net{{TargetFrameworkVersion}}",
286288
"framework": {
287289
"name": "Microsoft.NETCore.App",
288-
"version": {{JsonSerializer.Serialize(RuntimeVersion)}}
290+
"version": {{JsonSerializer.Serialize(DefaultRuntimeVersion)}}
289291
},
290292
"configProperties": {
291293
"EntryPointFilePath": {{JsonSerializer.Serialize(EntryPointFileFullPath)}},
@@ -387,4 +389,19 @@ public static bool IsPathOption(string arg, out int colonIndex)
387389
colonIndex = -1;
388390
return false;
389391
}
392+
393+
/// <summary>
394+
/// See <c>GenerateDefaultRuntimeFrameworkVersion</c>.
395+
/// </summary>
396+
private static string GetDefaultRuntimeVersion()
397+
{
398+
if (NuGetVersion.TryParse(RuntimeVersion, out var version))
399+
{
400+
return version.IsPrerelease && version.Patch == 0 ?
401+
RuntimeVersion :
402+
new NuGetVersion(version.Major, version.Minor, 0).ToFullString();
403+
}
404+
405+
return RuntimeVersion;
406+
}
390407
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.cs.allow-jit</key>
6+
<true/>
7+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
8+
<true/>
9+
<key>com.apple.security.cs.disable-library-validation</key>
10+
<true/>
11+
<key>com.apple.security.cs.debugger</key>
12+
<true/>
13+
<key>com.apple.security.get-task-allow</key>
14+
<true/>
15+
</dict>
16+
</plist>

0 commit comments

Comments
 (0)