Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<ItemGroup Condition="$(MicrosoftAspNetCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))">
<KnownFrameworkReference Update="Microsoft.AspNetCore.App">
<LatestRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</LatestRuntimeFrameworkVersion>
<RuntimePackRuntimeIdentifiers>${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers>
<RuntimePackRuntimeIdentifiers>$(SupportedRuntimeIdentifiers)</RuntimePackRuntimeIdentifiers>
<TargetingPackVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</TargetingPackVersion>
<DefaultRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</DefaultRuntimeFrameworkVersion>
</KnownFrameworkReference>
Expand Down
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<NoWarn>$(NoWarn);NU1507</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Basic.CompilerLog.Util" Version="0.9.9" />
<PackageVersion Include="Basic.CompilerLog.Util" Version="0.9.18" />
<PackageVersion Include="AwesomeAssertions" Version="$(AwesomeAssertionsVersion)" />
<PackageVersion Include="BenchmarkDotNet" Version="$(BenchmarkDotNetPackageVersion)" />
<PackageVersion Include="AwesomeAssertions.Json" Version="$(AwesomeAssertionsJsonVersion)" />
<PackageVersion Include="MessagePack" Version="2.5.187" />
<PackageVersion Include="MessagePack" Version="3.1.4" />
<PackageVersion Include="MicroBuild.Plugins.SwixBuild.Dotnet" Version="1.1.87-gba258badda" />
<PackageVersion Include="Microsoft.ApplicationInsights" Version="$(MicrosoftApplicationInsightsPackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.DeveloperCertificates.XPlat" Version="$(MicrosoftAspNetCoreDeveloperCertificatesXPlatPackageVersion)" />
Expand Down Expand Up @@ -94,7 +94,7 @@
<PackageVersion Include="Microsoft.WixToolset.Heat" Version="$(MicrosoftWixToolsetSdkVersion)" />
<PackageVersion Include="Microsoft.WixToolset.Util.wixext" Version="$(MicrosoftWixToolsetSdkVersion)" />
<PackageVersion Include="Microsoft.WixToolset.UI.wixext" Version="$(MicrosoftWixToolsetSdkVersion)" />
<PackageVersion Include="MSBuild.StructuredLogger" Version="2.2.386" />
<PackageVersion Include="MSBuild.StructuredLogger" Version="2.3.45" />
<PackageVersion Include="Moq" Version="$(MoqPackageVersion)" />
<PackageVersion Include="NETStandard.Library.NETFramework" Version="$(NETStandardLibraryNETFrameworkVersion)" />
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
Expand Down
3 changes: 3 additions & 0 deletions eng/Signing.props
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@

<ItemGroup>
<FileSignInfo Include="StreamJsonRpc.dll" CertificateName="MicrosoftSHA2" />

<!-- Roslyn apphosts -->
<FileSignInfo Condition="'$(TargetOS)' == 'osx'" Include="csc;vbc;VBCSCompiler" CertificateName="MacDeveloperHarden" />
</ItemGroup>

<!-- Filter out any test packages from ItemsToSign -->
Expand Down
260 changes: 130 additions & 130 deletions eng/Version.Details.props

Large diffs are not rendered by default.

522 changes: 261 additions & 261 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion eng/common/SetupNugetSources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ if ($dotnet31Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
}

$dotnetVersions = @('5','6','7','8','9')
$dotnetVersions = @('5','6','7','8','9','10')

foreach ($dotnetVersion in $dotnetVersions) {
$feedPrefix = "dotnet" + $dotnetVersion;
Expand Down
2 changes: 1 addition & 1 deletion eng/common/SetupNugetSources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ if [ "$?" == "0" ]; then
PackageSources+=('dotnet3.1-internal-transport')
fi

DotNetVersions=('5' '6' '7' '8' '9')
DotNetVersions=('5' '6' '7' '8' '9' '10')

for DotNetVersion in ${DotNetVersions[@]} ; do
FeedPrefix="dotnet${DotNetVersion}";
Expand Down
7 changes: 0 additions & 7 deletions eng/common/core-templates/job/publish-build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ parameters:

repositoryAlias: self

officialBuildId: ''

jobs:
- job: Asset_Registry_Publish

Expand All @@ -64,11 +62,6 @@ jobs:
value: false
# unconditional - needed for logs publishing (redactor tool version)
- template: /eng/common/core-templates/post-build/common-variables.yml
- name: OfficialBuildId
${{ if ne(parameters.officialBuildId, '') }}:
value: ${{ parameters.officialBuildId }}
${{ else }}:
value: $(Build.BuildNumber)

pool:
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
Expand Down
4 changes: 0 additions & 4 deletions eng/common/core-templates/job/source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ parameters:
# container and pool.
platform: {}

# Optional list of directories to ignore for component governance scans.
componentGovernanceIgnoreDirectories: []

is1ESPipeline: ''

# If set to true and running on a non-public project,
Expand Down Expand Up @@ -97,4 +94,3 @@ jobs:
parameters:
is1ESPipeline: ${{ parameters.is1ESPipeline }}
platform: ${{ parameters.platform }}
componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
2 changes: 0 additions & 2 deletions eng/common/core-templates/jobs/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ parameters:
artifacts: {}
is1ESPipeline: ''
repositoryAlias: self
officialBuildId: ''

# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
# and some (Microbuild) should only be applied to non-PR cases for internal builds.
Expand Down Expand Up @@ -117,4 +116,3 @@ jobs:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }}
repositoryAlias: ${{ parameters.repositoryAlias }}
officialBuildId: ${{ parameters.officialBuildId }}
5 changes: 0 additions & 5 deletions eng/common/core-templates/jobs/source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ parameters:
# one job runs on 'defaultManagedPlatform'.
platforms: []

# Optional list of directories to ignore for component governance scans.
componentGovernanceIgnoreDirectories: []

is1ESPipeline: ''

# If set to true and running on a non-public project,
Expand All @@ -34,7 +31,6 @@ jobs:
is1ESPipeline: ${{ parameters.is1ESPipeline }}
jobNamePrefix: ${{ parameters.jobNamePrefix }}
platform: ${{ platform }}
componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
enableInternalSources: ${{ parameters.enableInternalSources }}

- ${{ if eq(length(parameters.platforms), 0) }}:
Expand All @@ -43,5 +39,4 @@ jobs:
is1ESPipeline: ${{ parameters.is1ESPipeline }}
jobNamePrefix: ${{ parameters.jobNamePrefix }}
platform: ${{ parameters.defaultManagedPlatform }}
componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
enableInternalSources: ${{ parameters.enableInternalSources }}
4 changes: 0 additions & 4 deletions eng/common/core-templates/steps/source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ parameters:
# for details. The entire object is described in the 'job' template for simplicity, even though
# the usage of the properties on this object is split between the 'job' and 'steps' templates.
platform: {}

# Optional list of directories to ignore for component governance scans.
componentGovernanceIgnoreDirectories: []

is1ESPipeline: false

steps:
Expand Down
6 changes: 3 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"errorMessage": "The .NET SDK is not installed or is not configured correctly. Please run ./build to install the correct SDK version locally."
},
"tools": {
"dotnet": "10.0.100-rc.1.25420.111",
"dotnet": "10.0.100-rc.1.25451.107",
"runtimes": {
"dotnet": [
"$(MicrosoftNETCorePlatformsPackageVersion)"
Expand All @@ -21,8 +21,8 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25460.104",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25460.104",
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25467.107",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25467.107",
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.Build.Traversal": "3.4.0",
"Microsoft.WixToolset.Sdk": "5.0.2-dotnet.2737382"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
</ItemGroup>

<ItemGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
<!-- Reference 6.0.0 targeting packs in Source Build -->
<FrameworkReference Update="Microsoft.AspNetCore.App" TargetingPackVersion="6.0.0" />
<!-- Reference 6.0 targeting packs in Source Build -->
<FrameworkReference Update="Microsoft.AspNetCore.App" TargetingPackVersion="6.0.2" />
<FrameworkReference Update="Microsoft.NETCore.App" TargetingPackVersion="6.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ private IEnumerable<string> GetCscArguments(
"/deterministic+",
"/langversion:14.0",
"/features:FileBasedProgram",
$"/analyzerconfig:{SdkPath}/Sdks/Microsoft.NET.Sdk/codestyle/cs/build/config/analysislevelstyle_default.globalconfig",
$"/analyzerconfig:{objDir}/{fileNameWithoutExtension}.GeneratedMSBuildEditorConfig.editorconfig",
$"/analyzerconfig:{SdkPath}/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_10_default.globalconfig",
$"/analyzer:{SdkPath}/Sdks/Microsoft.NET.Sdk/targets/../analyzers/Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll",
Expand Down
10 changes: 2 additions & 8 deletions src/Cli/dotnet/Commands/Workload/WorkloadCommandParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,7 @@ private static Command ConstructCommand()

private class ShowWorkloadsInfoAction : SynchronousCommandLineAction
{
public ShowWorkloadsInfoAction()
{
Terminating = true;
}
public override bool Terminating => true;

public override int Invoke(ParseResult parseResult)
{
Expand All @@ -189,10 +186,7 @@ public override int Invoke(ParseResult parseResult)

private class ShowWorkloadsVersionOption : SynchronousCommandLineAction
{
public ShowWorkloadsVersionOption()
{
Terminating = true;
}
public override bool Terminating => true;

public override int Invoke(ParseResult parseResult)
{
Expand Down
6 changes: 2 additions & 4 deletions src/Cli/dotnet/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,8 @@ public override void Write(HelpContext context)

private class PrintCliSchemaAction : SynchronousCommandLineAction
{
internal PrintCliSchemaAction()
{
Terminating = true;
}
public override bool Terminating => true;

public override int Invoke(ParseResult parseResult)
{
CliSchema.PrintCliSchema(parseResult.CommandResult, parseResult.InvocationConfiguration.Output, Program.TelemetryClient);
Expand Down
4 changes: 2 additions & 2 deletions src/Cli/dotnet/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ internal static int ProcessArgs(string[] args, TimeSpan startupTime)
// Get the global.json state to report in telemetry along with this command invocation.
// We don't care about the actual SDK resolution, just the global.json information,
// so just pass empty string as executable directory for resolution.
NativeWrapper.SdkResolutionResult result = NativeWrapper.NETCoreSdkResolverNativeWrapper.ResolveSdk(string.Empty, Environment.CurrentDirectory);
globalJsonState = result.GlobalJsonState;
// NativeWrapper.SdkResolutionResult result = NativeWrapper.NETCoreSdkResolverNativeWrapper.ResolveSdk(string.Empty, Environment.CurrentDirectory);
// globalJsonState = result.GlobalJsonState;
}

TelemetryEventEntry.SendFiltered(Tuple.Create(parseResult, performanceData, globalJsonState));
Expand Down
6 changes: 6 additions & 0 deletions src/Layout/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,10 @@
<SdkPkgSourcesRootDirectory>$(MSBuildThisFileDirectory)pkg\</SdkPkgSourcesRootDirectory>
</PropertyGroup>

<ItemGroup>
<_RoslynAppHost Include="$(OutputPath)Roslyn\bincore\csc.dll" />
<_RoslynAppHost Include="$(OutputPath)Roslyn\bincore\vbc.dll" />
<_RoslynAppHost Include="$(OutputPath)Roslyn\bincore\VBCSCompiler.dll" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions src/Layout/redist/targets/Crossgen.targets
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@

<Exec Command="find $(InstallerOutputDirectory) -type d -exec chmod 755 {} \;" Condition="'$(OSName)' != 'win'" />
<Exec Command="find $(InstallerOutputDirectory) -type f -exec chmod 644 {} \;" Condition="'$(OSName)' != 'win'" />
<Exec Command="chmod 755 $(InstallerOutputDirectory)Roslyn/bincore/%(_RoslynAppHost.Filename)" Condition="'$(OSName)' != 'win'" />
</Target>

</Project>
7 changes: 7 additions & 0 deletions src/Layout/redist/targets/GenerateLayout.targets
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
<Copy SourceFiles="@(RoslynFile)"
DestinationFiles="@(RoslynFile->'$(OutputPath)Roslyn\%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="true" />

<CreateAppHost AppHostSourcePath="$(NuGetPackageRoot)\microsoft.netcore.app.host.$(SharedFrameworkRid)\$(MicrosoftNETCoreAppHostPackageVersion)\runtimes\$(SharedFrameworkRid)\native\apphost$(ExeExtension)"
AppHostDestinationPath="%(_RoslynAppHost.RootDir)%(_RoslynAppHost.Directory)%(_RoslynAppHost.Filename)$(ExeExtension)"
AppBinaryName="%(_RoslynAppHost.Filename)%(_RoslynAppHost.Extension)"
IntermediateAssembly="%(_RoslynAppHost.FullPath)"
EnableMacOSCodeSign="$(SharedFrameworkRid.StartsWith('osx'))" />
</Target>

<Target Name="PublishNETAnalyzers">
Expand Down Expand Up @@ -495,6 +501,7 @@

<Exec Command="find $(OutputPath) -type d -exec chmod 755 {} \;" />
<Exec Command="find $(OutputPath) -type f -exec chmod 644 {} \;" />
<Exec Command="chmod 755 %(_RoslynAppHost.RootDir)%(_RoslynAppHost.Directory)%(_RoslynAppHost.Filename)" />
</Target>

<Target Name="DeleteSymbolsFromPublishDir" DependsOnTargets="GenerateCliRuntimeConfigurationFiles">
Expand Down
36 changes: 26 additions & 10 deletions src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs
Original file line number Diff line number Diff line change
Expand Up @@ -817,20 +817,36 @@ private ToolPackSupport AddToolPack(
{
var packNamePattern = knownPack.GetMetadata(packName + "PackNamePattern");
var packSupportedRuntimeIdentifiers = knownPack.GetMetadata(packName + "RuntimeIdentifiers").Split(';');
// When publishing for the non-portable RID that matches NETCoreSdkRuntimeIdentifier, prefer NETCoreSdkRuntimeIdentifier for the host.
var packSupportedPortableRuntimeIdentifiers = knownPack.GetMetadata(packName + "PortableRuntimeIdentifiers").Split(';');

// When publishing for a non-portable RID, prefer NETCoreSdkRuntimeIdentifier for the host.
// Otherwise prefer the NETCoreSdkPortableRuntimeIdentifier.
// This makes non-portable SDKs behave the same as portable SDKs except for the specific case of targetting the non-portable RID.
// It also enables the non-portable ILCompiler to be packaged separately from the SDK and
// only required when publishing for the non-portable SDK RID.
string portableSdkRid = !string.IsNullOrEmpty(NETCoreSdkPortableRuntimeIdentifier) ? NETCoreSdkPortableRuntimeIdentifier : NETCoreSdkRuntimeIdentifier;
bool targetsNonPortableSdkRid = EffectiveRuntimeIdentifier == NETCoreSdkRuntimeIdentifier && NETCoreSdkRuntimeIdentifier != portableSdkRid;
string? hostRuntimeIdentifier = targetsNonPortableSdkRid ? NETCoreSdkRuntimeIdentifier : portableSdkRid;
Log.LogMessage(MessageImportance.Low, $"Determining best RID for '{knownPack.ItemSpec}@{packVersion}' for '{hostRuntimeIdentifier}' from among '{knownPack.GetMetadata(packName + "RuntimeIdentifiers")}'");
// Get the best RID for the host machine, which will be used to validate that we can run crossgen for the target platform and architecture
// This makes non-portable SDKs behave the same as portable SDKs except for the specific case of targetting a non-portable RID.
// This ensures that targeting portable RIDs doesn't require any non-portable assets that aren't packaged in the SDK.
// Due to size concerns, the non-portable ILCompiler and Crossgen2 aren't included by default in non-portable SDK distributions.
var runtimeGraph = new RuntimeGraphCache(this).GetRuntimeGraph(RuntimeGraphPath);
hostRuntimeIdentifier = NuGetUtils.GetBestMatchingRid(runtimeGraph, hostRuntimeIdentifier, packSupportedRuntimeIdentifiers, out bool wasInGraph);

// Prefer portable when the "supported RID" for the tool pack is the same RID as the "supported portable RID".
// This makes non-portable SDKs behave the same as portable SDKs except for the specific cases added to "supported", such as targeting the non-portable RID.
// This also ensures that targeting common RIDs doesn't require any non-portable assets that aren't packaged in the SDK by default.
// Due to size concerns, the non-portable ILCompiler and Crossgen2 aren't included by default in non-portable SDK distributions.
var runtimeIdentifier = RuntimeIdentifier ?? "any";
string? supportedTargetRid = NuGetUtils.GetBestMatchingRid(runtimeGraph, runtimeIdentifier, packSupportedRuntimeIdentifiers, out _);
string? supportedPortableTargetRid = NuGetUtils.GetBestMatchingRid(runtimeGraph, runtimeIdentifier, packSupportedPortableRuntimeIdentifiers, out _);

bool usePortable = !string.IsNullOrEmpty(NETCoreSdkPortableRuntimeIdentifier)
&& supportedTargetRid is not null && supportedPortableTargetRid is not null
&& supportedTargetRid == supportedPortableTargetRid;

// Get the best RID for the host machine, which will be used to validate that we can run crossgen for the target platform and architecture
Log.LogMessage(MessageImportance.Low, $"Determining best RID for '{knownPack.ItemSpec}@{packVersion}' from among '{knownPack.GetMetadata(packName + "RuntimeIdentifiers")}'");
string? hostRuntimeIdentifier = usePortable
? NuGetUtils.GetBestMatchingRid(runtimeGraph, NETCoreSdkPortableRuntimeIdentifier!, packSupportedPortableRuntimeIdentifiers, out _)
: NuGetUtils.GetBestMatchingRid(runtimeGraph, NETCoreSdkRuntimeIdentifier!, packSupportedRuntimeIdentifiers, out _);

if (hostRuntimeIdentifier == null)
{
Log.LogMessage(MessageImportance.Low, $"No matching RID was found'");
return ToolPackSupport.UnsupportedForHostRuntimeIdentifier;
}
Log.LogMessage(MessageImportance.Low, $"Best RID for '{knownPack.ItemSpec}@{packVersion}' is '{hostRuntimeIdentifier}'");
Expand Down
Loading
Loading