Merge branch 'main' into 1esPoolsMain

This commit is contained in:
Jon Fortescue 2021-10-05 09:38:50 -07:00
commit c63a9f5490
93 changed files with 1791 additions and 1292 deletions

View file

@ -104,10 +104,17 @@ stages:
agentOs: Windows_NT agentOs: Windows_NT
pool: pool:
${{ if eq(variables['System.TeamProject'], 'public') }}: ${{ if eq(variables['System.TeamProject'], 'public') }}:
<<<<<<< HEAD
name: NetCore1ESPool-Public name: NetCore1ESPool-Public
demands: ImageOverride -equals build.windows.10.amd64.vs2019.open demands: ImageOverride -equals build.windows.10.amd64.vs2019.open
${{ if eq(variables['System.TeamProject'], 'internal') }}: ${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: NetCore1ESPool-Internal name: NetCore1ESPool-Internal
=======
name: NetCore1ESPool-Svc-Public
demands: ImageOverride -equals build.windows.10.amd64.vs2019.open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: NetCore1ESPool-Svc-Internal
>>>>>>> main
demands: ImageOverride -equals build.windows.10.amd64.vs2019 demands: ImageOverride -equals build.windows.10.amd64.vs2019
timeoutInMinutes: 180 timeoutInMinutes: 180
strategy: strategy:
@ -133,10 +140,17 @@ stages:
agentOs: Linux agentOs: Linux
pool: pool:
${{ if eq(variables['System.TeamProject'], 'public') }}: ${{ if eq(variables['System.TeamProject'], 'public') }}:
<<<<<<< HEAD
name: NetCore1ESPool-Public name: NetCore1ESPool-Public
demands: ImageOverride -equals Build.Ubuntu.1604.Amd64.Open demands: ImageOverride -equals Build.Ubuntu.1604.Amd64.Open
${{ if eq(variables['System.TeamProject'], 'internal') }}: ${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: NetCore1ESPool-Internal name: NetCore1ESPool-Internal
=======
name: NetCore1ESPool-Svc-Public
demands: ImageOverride -equals Build.Ubuntu.1604.Amd64.Open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: NetCore1ESPool-Svc-Internal
>>>>>>> main
demands: ImageOverride -equals Build.Ubuntu.1604.Amd64 demands: ImageOverride -equals Build.Ubuntu.1604.Amd64
timeoutInMinutes: 180 timeoutInMinutes: 180
strategy: strategy:
@ -298,10 +312,17 @@ stages:
agentOs: Linux agentOs: Linux
pool: pool:
${{ if eq(variables['System.TeamProject'], 'public') }}: ${{ if eq(variables['System.TeamProject'], 'public') }}:
<<<<<<< HEAD
name: NetCore1ESPool-Public name: NetCore1ESPool-Public
demands: ImageOverride -equals Build.Ubuntu.1604.Amd64.Open demands: ImageOverride -equals Build.Ubuntu.1604.Amd64.Open
${{ if eq(variables['System.TeamProject'], 'internal') }}: ${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: NetCore1ESPool-Internal name: NetCore1ESPool-Internal
=======
name: NetCore1ESPool-Svc-Public
demands: ImageOverride -equals Build.Ubuntu.1604.Amd64.Open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: NetCore1ESPool-Svc-Internal
>>>>>>> main
demands: ImageOverride -equals Build.Ubuntu.1604.Amd64 demands: ImageOverride -equals Build.Ubuntu.1604.Amd64
timeoutInMinutes: 180 timeoutInMinutes: 180
strategy: strategy:
@ -340,10 +361,11 @@ stages:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml # disable tarball build ci until 7.0 stabilizes
parameters: # - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml
dependsOn: Source_Build_Create_Tarball # parameters:
condition: eq(dependencies.Source_Build_Create_Tarball.outputs['Tarball_Build_Check._includeTarballBuild'], 'true') # dependsOn: Source_Build_Create_Tarball
# condition: eq(dependencies.Source_Build_Create_Tarball.outputs['Tarball_Build_Check._includeTarballBuild'], 'true')
# https://github.com/dotnet/core-sdk/issues/248 # https://github.com/dotnet/core-sdk/issues/248
# - template: /eng/build.yml # - template: /eng/build.yml

View file

@ -10,6 +10,7 @@
<PropertyGroup> <PropertyGroup>
<BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture> <BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</Architecture> <Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</Architecture>
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 's390x'">$(BuildArchitecture)</Architecture>
<Architecture Condition="'$(Architecture)' == ''">x64</Architecture> <Architecture Condition="'$(Architecture)' == ''">x64</Architecture>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(PgoInstrument)' == 'true'"> <PropertyGroup Condition="'$(PgoInstrument)' == 'true'">

View file

@ -1,108 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="VS.Redist.Common.AspNetCore.SharedFramework.x64.6.0" Version="6.0.0-preview.6.21355.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>71dd6b0c87d7619668a40876d084d93db57eab41</Sha>
<SourceBuild RepoName="aspnetcore" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Cli.CommandLine" Version="1.0.0-preview.21310.2">
<Uri>https://github.com/dotnet/clicommandlineparser</Uri>
<Sha>3198bf5660cad3dab85f5475bf1fda9688146e3f</Sha>
<SourceBuild RepoName="clicommandlineparser" ManagedOnly="true" />
</Dependency>
<Dependency Name="System.CommandLine" Version="0.1.230801">
<Uri>https://github.com/dotnet/command-line-api</Uri>
<Sha>5e855e911de7c56fe28400c4500e888fe2a3da8e</Sha>
<SourceBuild RepoName="command-line-api" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.Diagnostics.NETCore.Client" Version="5.0.0-preview.21325.1">
<Uri>https://github.com/dotnet/diagnostics</Uri>
<Sha>6f48c2ae749c29b687af0353e6c2a9590d7e3d22</Sha>
<SourceBuild RepoName="diagnostics" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.fsharp" Version="5.0.3-beta.21352.5" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/fsharp</Uri>
<Sha>3af67cd8ffd73b2dc443e1e24dc0cf28f7e1c608</Sha>
<SourceBuild RepoName="fsharp" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.100-preview.6.21409.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/mono/linker</Uri>
<Sha>cb8d86607bcebd8cb3b0a1efe1472839ecdde1ca</Sha>
<SourceBuild RepoName="linker" ManagedOnly="true" />
<RepoName>linker</RepoName>
</Dependency>
<Dependency Name="Microsoft.Build" Version="17.0.0-preview-21330-06" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/msbuild</Uri>
<Sha>cdc5faeda066a83b084c96b8a455ad0a5e8713ab</Sha>
<SourceBuild RepoName="msbuild" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.0.0-2.21356.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>d16c8bd011951d9bd15809d9004276cf7baaa786</Sha>
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
</Dependency>
<Dependency Name="VS.Redist.Common.NetCore.SharedFramework.x64.6.0" Version="6.0.0-preview.7.21356.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>566b53a66b0afa573f0dae33d07c8de9685aa5c8</Sha>
<SourceBuild RepoName="runtime" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NET.Sdk" Version="6.0.100-preview.7.21362.11">
<Uri>https://github.com/dotnet/sdk</Uri>
<Sha>5fab7585de482237f470634489b969a1bd03e063</Sha>
<SourceBuild RepoName="sdk" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DiaSymReader" Version="1.4.0-beta2-21315-01">
<Uri>https://github.com/dotnet/symreader</Uri>
<Sha>1968a003d845d119a9d38ac4daaeea22897f7daf</Sha>
<SourceBuild RepoName="symreader" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Common.ItemTemplates" Version="6.0.100-preview.7.21329.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/templating</Uri>
<Sha>3bc0d90f3e450f3e4ebda128081d091fb42968e3</Sha>
<SourceBuild RepoName="templating" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.6.0" Version="1.0.2-beta4.21321.1">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>6898c1c70c2d14e9725ddab6e1ebe8084c4d7e27</Sha>
<SourceBuild RepoName="test-templates" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.Web.Xdt" Version="5.0.0-preview.21302.1">
<Uri>https://github.com/dotnet/xdt</Uri>
<Sha>6a46e7c886cdf499ba3433f665ab417be814135e</Sha>
<SourceBuild RepoName="xdt" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NET.Test.Sdk" Version="17.0.0-preview-20210629-04" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/microsoft/vstest</Uri>
<Sha>e078bbadaf65628c313e97041973db52a84491ef</Sha>
<SourceBuild RepoName="vstest" ManagedOnly="true" />
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21319.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a3377cccde8639089f99107e2ba5df2c8cbe6394</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceLink.GitHub" Version="1.1.0-beta-21309-01" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/sourcelink</Uri>
<Sha>4b584dbc392bb1aad49c2eb1ab84d8b489b6dccc</Sha>
<SourceBuild RepoName="sourcelink" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build" Version="0.1.0-alpha.1.21318.1">
<Uri>https://github.com/dotnet/source-build</Uri>
<Sha>3fb25b8db3bec654e37e71a5b2b7fde14444bc2f</Sha>
<SourceBuild RepoName="source-build" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="6.0.0-alpha.1.21410.1">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>469769836b88669a58c46e944ab537184055c30a</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<Dependency Name="XliffTasks" Version="1.0.0-beta.21325.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/xliff-tasks</Uri>
<Sha>71c811561ad4dcf46825a5077fbcc668ab74754f</Sha>
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
</Dependency>
</ToolsetDependencies>
</Dependencies>

View file

@ -20,6 +20,7 @@
<Dependency Name="VS.Redist.Common.NetCore.SharedFramework.x64.7.0" Version="7.0.0-alpha.1.21480.1" CoherentParentDependency="Microsoft.NET.Sdk"> <Dependency Name="VS.Redist.Common.NetCore.SharedFramework.x64.7.0" Version="7.0.0-alpha.1.21480.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/runtime</Uri> <Uri>https://github.com/dotnet/runtime</Uri>
<Sha>95569138572484e9e9d1292b890d83e3c121107c</Sha> <Sha>95569138572484e9e9d1292b890d83e3c121107c</Sha>
<SourceBuildTarball RepoName="runtime" ManagedOnly="true" />
</Dependency> </Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="7.0.0-alpha.1.21480.1" CoherentParentDependency="Microsoft.NET.Sdk"> <Dependency Name="Microsoft.NETCore.App.Ref" Version="7.0.0-alpha.1.21480.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/runtime</Uri> <Uri>https://github.com/dotnet/runtime</Uri>
@ -128,6 +129,7 @@
<Dependency Name="Microsoft.NET.Test.Sdk" Version="17.0.0-release-20210908-02" CoherentParentDependency="Microsoft.NET.Sdk"> <Dependency Name="Microsoft.NET.Test.Sdk" Version="17.0.0-release-20210908-02" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/microsoft/vstest</Uri> <Uri>https://github.com/microsoft/vstest</Uri>
<Sha>d6f64b37c2cfee76c8b1269d688384ced30ecd21</Sha> <Sha>d6f64b37c2cfee76c8b1269d688384ced30ecd21</Sha>
<SourceBuildTarball RepoName="vstest" ManagedOnly="true" />
</Dependency> </Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="7.0.100-1.21479.1" CoherentParentDependency="Microsoft.NET.Sdk"> <Dependency Name="Microsoft.NET.ILLink.Tasks" Version="7.0.100-1.21479.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/linker</Uri> <Uri>https://github.com/dotnet/linker</Uri>
@ -148,6 +150,7 @@
<Dependency Name="NuGet.Build.Tasks" Version="6.0.0-rc.258" CoherentParentDependency="Microsoft.NET.Sdk"> <Dependency Name="NuGet.Build.Tasks" Version="6.0.0-rc.258" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/nuget/nuget.client</Uri> <Uri>https://github.com/nuget/nuget.client</Uri>
<Sha>e685bdb6d7b4d1f3664f6542f50b84376a19341c</Sha> <Sha>e685bdb6d7b4d1f3664f6542f50b84376a19341c</Sha>
<SourceBuildTarball RepoName="nuget-client" ManagedOnly="true" />
</Dependency> </Dependency>
<Dependency Name="Microsoft.ApplicationInsights" Version="2.0.0"> <Dependency Name="Microsoft.ApplicationInsights" Version="2.0.0">
<Uri>https://github.com/Microsoft/ApplicationInsights-dotnet</Uri> <Uri>https://github.com/Microsoft/ApplicationInsights-dotnet</Uri>
@ -198,4 +201,4 @@
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" /> <SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
</Dependency> </Dependency>
</ToolsetDependencies> </ToolsetDependencies>
</Dependencies> </Dependencies>

View file

@ -108,7 +108,7 @@
<SharedHostVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</SharedHostVersion> <SharedHostVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</SharedHostVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<WixPackageVersion>3.14.0-dotnet</WixPackageVersion> <WixPackageVersion>1.0.0-v3.14.0.4118</WixPackageVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- 6.0 Template versions --> <!-- 6.0 Template versions -->
@ -182,4 +182,4 @@
<CLI_NETStandardLibraryNETFrameworkVersion>2.0.1-servicing-26011-01</CLI_NETStandardLibraryNETFrameworkVersion> <CLI_NETStandardLibraryNETFrameworkVersion>2.0.1-servicing-26011-01</CLI_NETStandardLibraryNETFrameworkVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(RepositoryEngineeringDir)ManualVersions.props" /> <Import Project="$(RepositoryEngineeringDir)ManualVersions.props" />
</Project> </Project>

View file

@ -4,7 +4,7 @@
# #
# Dockerfile that creates a container suitable to build dotnet-cli # Dockerfile that creates a container suitable to build dotnet-cli
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:debian-stretch-d61254f-20190807161114 FROM mcr.microsoft.com/dotnet-buildtools/prereqs:debian-stretch-20211001171226-047508b
# Install the deb packaging toolchain we need to build debs # Install the deb packaging toolchain we need to build debs
RUN apt-get update \ RUN apt-get update \

View file

@ -1 +1 @@
The source and targets in the `src/SourceBuild/Arcade` directory are intended to move into the Arcade repo at some point. They are added here for ease of development while developing the tarball generation process. See https://github.com/dotnet/source-build/issues/2295 The source and targets in the `src/SourceBuild/Arcade` directory are intended to move into the Arcade repo at some point. They are added here for ease of development while developing the tarball generation process. See https://github.com/dotnet/source-build/issues/2295

View file

@ -27,13 +27,15 @@ jobs:
Fedora33-Online: Fedora33-Online:
_runOnline: true _runOnline: true
_Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2 _Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2
# TODO: Renable once installer prebuilts are eliminated. # Disable until prebuilts are eliminated
# Fedora33-Offline: # Fedora33-Offline:
# _runOnline: false # _runOnline: false
# _Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2 # _Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2
timeoutInMinutes: 180 timeoutInMinutes: 210
variables: variables:
_TarballDir: $(Build.StagingDirectory)/tarball _TarballDir: $(Build.StagingDirectory)/tarball
_BuildConfig: Release
_BuildArch: x64
workspace: workspace:
clean: all clean: all
@ -56,6 +58,7 @@ jobs:
mkdir -p "$(_TarballDir)" mkdir -p "$(_TarballDir)"
tarballFilePath="$(PIPELINE.WORKSPACE)/${resourceIdPathSegment}BlobArtifacts/dotnet-sdk-source*.tar.gz" tarballFilePath="$(PIPELINE.WORKSPACE)/${resourceIdPathSegment}BlobArtifacts/dotnet-sdk-source*.tar.gz"
eval tar -ozxf "$tarballFilePath" -C "$(_TarballDir)" eval tar -ozxf "$tarballFilePath" -C "$(_TarballDir)"
eval rm -f "$tarballFilePath"
displayName: Extract Tarball displayName: Extract Tarball
- script: | - script: |
@ -79,21 +82,16 @@ jobs:
docker run --rm -v $(_TarballDir):/tarball -w /tarball ${networkArgs} $(_Container) ./build.sh ${customBuildArgs} -- /p:CleanWhileBuilding=true docker run --rm -v $(_TarballDir):/tarball -w /tarball ${networkArgs} $(_Container) ./build.sh ${customBuildArgs} -- /p:CleanWhileBuilding=true
displayName: Build Tarball displayName: Build Tarball
- task: CopyFiles@2 - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
displayName: Gather Source Build Artifacts - publish: '$(_TarballDir)/artifacts/$(_BuildArch)/$(_BuildConfig)/'
inputs: artifact: $(Agent.JobName)_Artifacts_Attempt$(System.JobAttempt)
SourceFolder: $(_TarballDir) displayName: Publish Source Build Artifacts
Contents: |
artifacts/**/Private.SourceBuilt.Artifacts*.tar.gz
artifacts/prebuilt-report/Private.SourceBuilt.Prebuilts.*.tar.gz
TargetFolder: '$(Build.StagingDirectory)/artifacts'
CleanTargetFolder: true
- task: PublishPipelineArtifact@1 - script: |
displayName: Publish Source Build Artifacts set -x
inputs:
targetPath: '$(Build.StagingDirectory)/artifacts' docker run --rm -v $(_TarballDir):/tarball -w /tarball $(_Container) ./build.sh --run-smoke-test
artifactName: $(Agent.JobName)_Artifacts_Attempt$(System.JobAttempt) displayName: Run Tests
- template: /src/SourceBuild/Arcade/eng/common/templates/steps/source-build-publish-logs.yml - template: /src/SourceBuild/Arcade/eng/common/templates/steps/source-build-publish-logs.yml
parameters: parameters:

View file

@ -12,16 +12,14 @@ steps:
Contents: | Contents: |
**/*.log **/*.log
**/*.binlog **/*.binlog
artifacts/source-build/self/prebuilt-report/** artifacts/prebuilt-report/*
TargetFolder: '$(Build.StagingDirectory)/BuildLogs' TargetFolder: '$(Build.StagingDirectory)/BuildLogs'
CleanTargetFolder: true CleanTargetFolder: true
continueOnError: true continueOnError: true
condition: succeededOrFailed() condition: succeededOrFailed()
- task: PublishPipelineArtifact@1 - publish: '$(Build.StagingDirectory)/BuildLogs'
artifact: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt)
displayName: Publish BuildLogs displayName: Publish BuildLogs
inputs:
targetPath: '$(Build.StagingDirectory)/BuildLogs'
artifactName: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt)
continueOnError: true continueOnError: true
condition: succeededOrFailed() condition: succeededOrFailed()

View file

@ -59,8 +59,14 @@ namespace Microsoft.DotNet.SourceBuild.Tasks
if (sourceBuildElement == null) if (sourceBuildElement == null)
{ {
// Ignore element: doesn't represent a source-build dependency. // Workaround for https://github.com/dotnet/source-build/issues/2481
return null; sourceBuildElement = d.Element(CreateQualifiedName("SourceBuildTarball"));
if (sourceBuildElement == null)
{
// Ignore element: doesn't represent a source-build dependency.
return null;
}
} }
string repoName = sourceBuildElement.Attribute("RepoName")?.Value; string repoName = sourceBuildElement.Attribute("RepoName")?.Value;

View file

@ -54,14 +54,16 @@ namespace Microsoft.DotNet.SourceBuild.Tasks
foreach (var dependency in Dependencies.Select(dep => foreach (var dependency in Dependencies.Select(dep =>
new { new {
Name = dep.GetMetadata("Name"), Name = dep.GetMetadata("Name"),
SourceBuildRepoName = dep.GetMetadata("SourceBuildRepoName"),
Version = dep.GetMetadata("ExactVersion"), Version = dep.GetMetadata("ExactVersion"),
Sha = dep.GetMetadata("Sha"), Sha = dep.GetMetadata("Sha"),
Uri = dep.GetMetadata("Uri") Uri = dep.GetMetadata("Uri"),
GitCommitCount = dep.GetMetadata("GitCommitCount")
})) }))
{ {
string repoName = GetDefaultRepoNameFromUrl(dependency.Uri); string repoName = dependency.SourceBuildRepoName;
string safeRepoName = repoName.Replace("-", ""); string safeRepoName = repoName.Replace("-", "").Replace(".", "");
string propsPath = Path.Combine(SourceBuildMetadataDir, $"{repoName}.props"); string propsPath = Path.Combine(SourceBuildMetadataDir, $"{repoName.Replace(".", "-")}.props");
DerivedVersion derivedVersion = GetVersionInfo(dependency.Version, "0"); DerivedVersion derivedVersion = GetVersionInfo(dependency.Version, "0");
var repoProps = new Dictionary<string, string> var repoProps = new Dictionary<string, string>
{ {
@ -71,6 +73,10 @@ namespace Microsoft.DotNet.SourceBuild.Tasks
["PreReleaseVersionLabel"] = derivedVersion.PreReleaseVersionLabel, ["PreReleaseVersionLabel"] = derivedVersion.PreReleaseVersionLabel,
["IsStable"] = string.IsNullOrWhiteSpace(derivedVersion.PreReleaseVersionLabel) ? "true" : "false", ["IsStable"] = string.IsNullOrWhiteSpace(derivedVersion.PreReleaseVersionLabel) ? "true" : "false",
}; };
if (!string.IsNullOrEmpty(dependency.GitCommitCount))
{
repoProps.Add("GitCommitCount", dependency.GitCommitCount);
}
WritePropsFile(propsPath, repoProps); WritePropsFile(propsPath, repoProps);
allRepoProps[$"{safeRepoName}GitCommitHash"] = dependency.Sha; allRepoProps[$"{safeRepoName}GitCommitHash"] = dependency.Sha;
allRepoProps[$"{safeRepoName}OutputPackageVersion"] = dependency.Version; allRepoProps[$"{safeRepoName}OutputPackageVersion"] = dependency.Version;
@ -98,16 +104,8 @@ namespace Microsoft.DotNet.SourceBuild.Tasks
var releaseParts = nugetVersion.Release.Split('-', '.'); var releaseParts = nugetVersion.Release.Split('-', '.');
if (releaseParts.Length == 2) if (releaseParts.Length == 2)
{ {
if (releaseParts[1].TrimStart('0') == commitCount) // NuGet does this - arbitrary build IDs
{ return new DerivedVersion { OfficialBuildId = DateTime.Now.ToString("yyyyMMdd.1"), PreReleaseVersionLabel = releaseParts[0] };
// core-sdk does this - OfficialBuildId is only used for their fake package and not in anything shipped
return new DerivedVersion { OfficialBuildId = DateTime.Now.ToString("yyyyMMdd.1"), PreReleaseVersionLabel = releaseParts[0] };
}
else
{
// NuGet does this - arbitrary build IDs
return new DerivedVersion { OfficialBuildId = releaseParts[1], PreReleaseVersionLabel = releaseParts[0] };
}
} }
else if (releaseParts.Length == 3) else if (releaseParts.Length == 3)
{ {
@ -147,15 +145,6 @@ namespace Microsoft.DotNet.SourceBuild.Tasks
throw new FormatException($"Can't derive a build ID from version {version} (commit count {commitCount}, release {string.Join(";", nugetVersion.Release.Split('-', '.'))})"); throw new FormatException($"Can't derive a build ID from version {version} (commit count {commitCount}, release {string.Join(";", nugetVersion.Release.Split('-', '.'))})");
} }
private static string GetDefaultRepoNameFromUrl(string repoUrl)
{
if (repoUrl.EndsWith(".git"))
{
repoUrl = repoUrl.Substring(0, repoUrl.Length - ".git".Length);
}
return repoUrl.Substring(repoUrl.LastIndexOf("/") + 1);
}
private static void UpdatePropsFile(string filePath, Dictionary<string, string> properties) private static void UpdatePropsFile(string filePath, Dictionary<string, string> properties)
{ {
if (!File.Exists(filePath)) if (!File.Exists(filePath))

View file

@ -13,7 +13,8 @@
<UsingTask TaskName="Microsoft.DotNet.SourceBuild.Tasks.Tarball_WriteSourceRepoProperties" AssemblyFile="$(SourceBuildTasksAssembly)" /> <UsingTask TaskName="Microsoft.DotNet.SourceBuild.Tasks.Tarball_WriteSourceRepoProperties" AssemblyFile="$(SourceBuildTasksAssembly)" />
<PropertyGroup> <PropertyGroup>
<TarballDir>$(RepoRoot)artifacts/tarball/</TarballDir> <ArtifactsDir>$(RepoRoot)artifacts/</ArtifactsDir>
<TarballDir>$(ArtifactsDir)tarball/</TarballDir>
<TarballRootDir>$([MSBuild]::EnsureTrailingSlash('$(TarballDir)'))</TarballRootDir> <TarballRootDir>$([MSBuild]::EnsureTrailingSlash('$(TarballDir)'))</TarballRootDir>
<TarballSourceDir>$(TarballRootDir)src/</TarballSourceDir> <TarballSourceDir>$(TarballRootDir)src/</TarballSourceDir>
<TarballGitInfoDir>$(TarballRootDir)git-info/</TarballGitInfoDir> <TarballGitInfoDir>$(TarballRootDir)git-info/</TarballGitInfoDir>
@ -27,6 +28,9 @@
CreateTarballDir; CreateTarballDir;
SetupSelfGithubInfo; SetupSelfGithubInfo;
CloneRepoAndDependentsRecursive; CloneRepoAndDependentsRecursive;
CleanClonedSource;
RestoreTextOnlyPackages;
CopyTextOnlyPackages;
CopyTarballContent; CopyTarballContent;
"> ">
@ -68,6 +72,14 @@
<Output TaskParameter="ConsoleOutput" ItemName="RootRepoCommitSha" /> <Output TaskParameter="ConsoleOutput" ItemName="RootRepoCommitSha" />
</Exec> </Exec>
<!-- Get commit count for installer repo only -->
<Exec
Command="cd $(RepoRoot);git rev-list --count HEAD"
ConsoleToMSBuild="true"
WorkingDirectory="$(RepoRoot)">
<Output TaskParameter="ConsoleOutput" ItemName="RootRepoCommitCount" />
</Exec>
<!-- This is hardcoding version for the root repo (installer), since there <!-- This is hardcoding version for the root repo (installer), since there
isn't a Version.Details.xml file to read it from. isn't a Version.Details.xml file to read it from.
See https://github.com/dotnet/source-build/issues/2250 --> See https://github.com/dotnet/source-build/issues/2250 -->
@ -76,8 +88,11 @@
<Name>$(GitHubRepositoryName)</Name> <Name>$(GitHubRepositoryName)</Name>
<Version>1.0.0</Version> <Version>1.0.0</Version>
<ExactVersion>1.0.0</ExactVersion> <ExactVersion>1.0.0</ExactVersion>
<Sha>@(RootRepoCommitSha)</Sha> <!-- Pin source-build to a specific commit to provide stabilization -->
<!-- <Sha>@(RootRepoCommitSha)</Sha> -->
<Sha>2f7c1a94d6c9f8f9173ebadf2ec2ba512b2b4576</Sha>
<Uri>@(RootRepoUri)</Uri> <Uri>@(RootRepoUri)</Uri>
<GitCommitCount>@(RootRepoCommitCount)</GitCommitCount>
<SourceBuildRepoName>$(GitHubRepositoryName)</SourceBuildRepoName> <SourceBuildRepoName>$(GitHubRepositoryName)</SourceBuildRepoName>
<IsRootRepo>true</IsRootRepo> <IsRootRepo>true</IsRootRepo>
</SourceBuildRepos> </SourceBuildRepos>
@ -129,6 +144,12 @@
WorkingDirectory="$(RepoRoot)" WorkingDirectory="$(RepoRoot)"
Condition="$(IsRootRepo) == 'true'" /> Condition="$(IsRootRepo) == 'true'" />
<!-- Needed in cases where source-build is pinned to a version of the root repo. -->
<Exec
Command="git reset --hard $(RepoSha)"
WorkingDirectory="$(TarballRepoSourceDir)"
Condition="$(IsRootRepo) == 'true'" />
<Exec <Exec
Command="git init $(TarballRepoSourceDir)" Command="git init $(TarballRepoSourceDir)"
WorkingDirectory="$(RepoRoot)" WorkingDirectory="$(RepoRoot)"
@ -141,7 +162,7 @@
<!-- Fetching a sha requires git 2.5.0 or newer --> <!-- Fetching a sha requires git 2.5.0 or newer -->
<Exec <Exec
Command="git fetch origin $(RepoSha)" Command="git fetch --depth 1 origin $(RepoSha)"
WorkingDirectory="$(TarballRepoSourceDir)" WorkingDirectory="$(TarballRepoSourceDir)"
Condition="$(IsRootRepo) != 'true'" /> Condition="$(IsRootRepo) != 'true'" />
@ -154,14 +175,31 @@
Command="git submodule update --init --recursive" Command="git submodule update --init --recursive"
WorkingDirectory="$(TarballRepoSourceDir)" /> WorkingDirectory="$(TarballRepoSourceDir)" />
<!-- Remove the git objects folder to free up tarball space -->
<Exec
Command="rm -rf objects"
WorkingDirectory="$(TarballRepoSourceDir).git"
Condition="$(PreserveTarballGitFolders) != 'true'" />
<Message Text="--> Done Cloning Repo $(SourceBuildRepoName)" Importance="High" /> <Message Text="--> Done Cloning Repo $(SourceBuildRepoName)" Importance="High" />
<!-- Override to use a temporary SourceBuild specific Version.Details.xml file in installer for Preview 6 <!-- Apply source-build patches -->
See https://github.com/dotnet/source-build/issues/2266 --> <ItemGroup>
<Copy <SourceBuildPatchFile Include="$(RepoRoot)src/SourceBuild/tarball/patches/$(SourceBuildRepoName)/*.patch" />
Condition=" '$(SourceBuildRepoName)' == 'installer' " </ItemGroup>
SourceFiles="$(RepoRoot)eng/SourceBuild.Version.Details.xml"
DestinationFiles="$(TarballRepoSourceDir)/eng/Version.Details.xml" /> <Message
Text="--> Applying $(SourceBuildRepoName) Patches"
Importance="High"
Condition="'@(SourceBuildPatchFile)' != ''" />
<Exec
Command="git --work-tree=$(TarballRepoSourceDir) apply --ignore-whitespace --whitespace=nowarn &quot;%(SourceBuildPatchFile.FullPath)&quot;"
WorkingDirectory="$(TarballRepoSourceDir)"
Condition="'@(SourceBuildPatchFile)' != ''" />
<Message
Text="--> Done Applying $(SourceBuildRepoName) Patches"
Importance="High"
Condition="'@(SourceBuildPatchFile)' != ''" />
<Tarball_ReadSourceBuildIntermediateNupkgDependencies <Tarball_ReadSourceBuildIntermediateNupkgDependencies
VersionDetailsXmlFile="$([MSBuild]::NormalizePath($(TarballVersionDetailsFile)))" VersionDetailsXmlFile="$([MSBuild]::NormalizePath($(TarballVersionDetailsFile)))"
@ -190,6 +228,41 @@
</Target> </Target>
<Target Name="CleanClonedSource">
<ItemGroup>
<TarballSrcBinaryExtension Include="
.dll;
.Dll;
.exe;
.pdb;
.mdb;
.zip;
.nupkg" />
<TarballSrcBinaryToRemove Include="$(TarballSourceDir)**\*%(TarballSrcBinaryExtension.Identity)" />
<!-- Runtime coreclr and installer parts have empty placeholder PDB files. Keep them. -->
<TarballSrcBinaryToRemove Remove="
$(TarballSourceDir)runtime*\src\coreclr\.nuget\**\*%(TarballSrcBinaryExtension.Identity);
$(TarballSourceDir)runtime*\src\installer\pkg\**\*%(TarballSrcBinaryExtension.Identity)" />
</ItemGroup>
<Delete Files="@(TarballSrcBinaryToRemove)" />
</Target>
<Target Name="RestoreTextOnlyPackages">
<PropertyGroup>
<TextOnlyPackageRestoreDir>$(ArtifactsDir)text-only-packages/</TextOnlyPackageRestoreDir>
<TextOnlyPackageTarballDir>$(TarballRootDir)packages/text-only/</TextOnlyPackageTarballDir>
</PropertyGroup>
<Message Text="Restoring text only packages..." Importance="High" />
<MSBuild Projects="../Arcade/tools/TextOnlyPackages.csproj"
Properties="TargetPackagesPath=$(TextOnlyPackageRestoreDir)"
Targets="Restore" />
</Target>
<Target Name="CopyTarballContent"> <Target Name="CopyTarballContent">
<ItemGroup> <ItemGroup>
<TarballContent Include="$(RepoRoot)src/SourceBuild/tarball/content/**/*" /> <TarballContent Include="$(RepoRoot)src/SourceBuild/tarball/content/**/*" />
@ -232,4 +305,42 @@
<MakeDir Directories="$(TarballRootDir)packages/prebuilt" /> <MakeDir Directories="$(TarballRootDir)packages/prebuilt" />
</Target> </Target>
<!--
Read directories in which text-only packages have been downloaded and copy content to tarball.
-->
<Target Name="CopyTextOnlyPackages" DependsOnTargets="RestoreTextOnlyPackages" >
<ReadLinesFromFile File="$(TextOnlyPackageRestoreDir)/TextOnlyPackageDirectories.txt" Condition="Exists('$(TextOnlyPackageRestoreDir)/TextOnlyPackageDirectories.txt')">
<Output TaskParameter="Lines" ItemName="TextOnlyPackageDirectories" />
</ReadLinesFromFile>
<MSBuild Projects="$(MSBuildProjectFile)"
Targets="CopySingleTextOnlyDirectory"
Properties="TextOnlyDirectory=%(TextOnlyPackageDirectories.Identity);TextOnlyPackageTarballDir=$(TextOnlyPackageTarballDir)" />
</Target>
<Target Name="CopySingleTextOnlyDirectory">
<PropertyGroup>
<DirectoryName>$([System.IO.Path]::GetFileName('$(TextOnlyDirectory)'))</DirectoryName>
</PropertyGroup>
<ItemGroup>
<TextOnlyPackageContent
Include="$(TextOnlyDirectory)/**/*"
Exclude="
$(TextOnlyDirectory)/**/.nupkg.metadata;
$(TextOnlyDirectory)/**/.signature.p7s;
$(TextOnlyDirectory)/**/*.nupkg;
$(TextOnlyDirectory)/**/*.nupkg.sha512;
" />
</ItemGroup>
<Copy
SourceFiles="@(TextOnlyPackageContent)"
DestinationFiles="@(TextOnlyPackageContent->'$(TextOnlyPackageTarballDir)$(DirectoryName)/%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
</Project> </Project>

View file

@ -0,0 +1,69 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<RestorePackagesPath>$(TargetPackagesPath)</RestorePackagesPath>
</PropertyGroup>
<!--
The following text-only packages are ones that are consumed by the installer repo, whose
versions are dynamic. These are maintained here so the dynamic version numbers can
come from the source (eng/Versions.props). All other more static text-only packages
should be added to source-build-reference-packages.
-->
<ItemGroup>
<PackageDownload Include="Microsoft.DotNet.Common.ItemTemplates"
Version="[$(MicrosoftDotNetCommonItemTemplates21PackageVersion)];
[$(MicrosoftDotNetCommonItemTemplates30PackageVersion)];
[$(MicrosoftDotNetCommonItemTemplates31PackageVersion)];
[$(MicrosoftDotNetCommonItemTemplates50PackageVersion)];
[$(MicrosoftDotNetCommonItemTemplates60PackageVersion)]" />
<PackageDownload Include="Microsoft.DotNet.Web.ItemTemplates"
Version="[$(AspNetCorePackageVersionFor21Templates)];
[$(AspNetCorePackageVersionFor30Templates)];
[$(AspNetCorePackageVersionFor31Templates)];
[$(AspNetCorePackageVersionFor50Templates)]" />
<!-- TODO: Re-enable once successful build completes -->
<!-- <PackageDownload Include="Microsoft.DotNet.Web.ItemTemplates.6.0" Version="[$(AspNetCorePackageVersionFor60Templates)]" /> -->
<PackageDownload Include="Microsoft.DotNet.Common.ProjectTemplates.2.1" Version="[$(MicrosoftDotNetCommonProjectTemplates21PackageVersion)]" />
<PackageDownload Include="Microsoft.DotNet.Common.ProjectTemplates.3.0" Version="[$(MicrosoftDotNetCommonProjectTemplates30PackageVersion)]" />
<PackageDownload Include="Microsoft.DotNet.Common.ProjectTemplates.3.1" Version="[$(MicrosoftDotNetCommonProjectTemplates31PackageVersion)]" />
<PackageDownload Include="Microsoft.DotNet.Common.ProjectTemplates.5.0" Version="[$(MicrosoftDotNetCommonProjectTemplates50PackageVersion)]" />
<PackageDownload Include="Microsoft.DotNet.Web.ProjectTemplates.2.1" Version="[$(AspNetCorePackageVersionFor21Templates)]" />
<PackageDownload Include="Microsoft.DotNet.Web.ProjectTemplates.3.0" Version="[$(AspNetCorePackageVersionFor30Templates)]" />
<PackageDownload Include="Microsoft.DotNet.Web.ProjectTemplates.3.1" Version="[$(AspNetCorePackageVersionFor31Templates)]" />
<PackageDownload Include="Microsoft.DotNet.Web.ProjectTemplates.5.0" Version="[$(AspNetCorePackageVersionFor50Templates)]" />
<PackageDownload Include="Microsoft.DotNet.Web.ProjectTemplates.6.0" Version="[$(AspNetCorePackageVersionFor60Templates)]" />
<PackageDownload Include="Microsoft.DotNet.Web.Spa.ProjectTemplates.2.1" Version="[$(AspNetCorePackageVersionFor21Templates)]" />
<PackageDownload Include="Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0" Version="[$(AspNetCorePackageVersionFor30Templates)]" />
<PackageDownload Include="Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1" Version="[$(AspNetCorePackageVersionFor31Templates)]" />
<PackageDownload Include="Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0" Version="[$(AspNetCorePackageVersionFor50Templates)]" />
<PackageDownload Include="Microsoft.DotNet.Web.Spa.ProjectTemplates.6.0" Version="[$(AspNetCorePackageVersionFor60Templates)]" />
<PackageDownload Include="Microsoft.NET.Workload.Emscripten.Manifest-6.0.100" Version="[$(EmscriptenWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100" Version="[$(MonoWorkloadManifestVersion)]" />
</ItemGroup>
<!--
Write out directories in which text-only packages are downloaded to be consumed by the "CopyTextOnlyPackages"
target.
-->
<Target Name="WriteTextOnlyDirectoryFile" BeforeTargets="Restore">
<ItemGroup>
<TextOnlyPackagesDirectories Include="$(TargetPackagesPath)$([System.String]::copy('%(PackageDownload.Identity)').ToLower())" />
</ItemGroup>
<PropertyGroup>
<TextOnlyPackageDirectoriesContent>@(TextOnlyPackagesDirectories)</TextOnlyPackageDirectoriesContent>
</PropertyGroup>
<WriteLinesToFile
Lines="$(TextOnlyPackageDirectoriesContent)"
File="$(TargetPackagesPath)/TextOnlyPackageDirectories.txt"
Overwrite="true" />
</Target>
</Project>

View file

@ -150,7 +150,7 @@
SourceBuildArcadeTargetsFile=$(MSBuildThisFileDirectory)SourceBuildArcade.targets; SourceBuildArcadeTargetsFile=$(MSBuildThisFileDirectory)SourceBuildArcade.targets;
SourceBuildIntermediateNupkgLicenseFile=$(SourceBuildIntermediateNupkgLicenseFile); SourceBuildIntermediateNupkgLicenseFile=$(SourceBuildIntermediateNupkgLicenseFile);
" "
BuildInParallel="true"/> BuildInParallel="false"/>
</Target> </Target>
<Import Project="SourceBuildArcade.targets" /> <Import Project="SourceBuildArcade.targets" />

View file

@ -78,6 +78,8 @@
<InnerBuildArgs>$(InnerBuildArgs) /p:ArtifactsDir=$(CurrentRepoSourceBuildArtifactsDir)</InnerBuildArgs> <InnerBuildArgs>$(InnerBuildArgs) /p:ArtifactsDir=$(CurrentRepoSourceBuildArtifactsDir)</InnerBuildArgs>
<!-- Set a custom binlog location to avoid clashing over the currenly specified file. --> <!-- Set a custom binlog location to avoid clashing over the currenly specified file. -->
<InnerBuildArgs>$(InnerBuildArgs) /bl:$(CurrentRepoSourceBuildBinlogFile)</InnerBuildArgs> <InnerBuildArgs>$(InnerBuildArgs) /bl:$(CurrentRepoSourceBuildBinlogFile)</InnerBuildArgs>
<!-- Flow ContinuousIntegrationBuild to the inner build. -->
<InnerBuildArgs Condition="'$(ContinuousIntegrationBuild)' == 'true'">$(InnerBuildArgs) /p:ContinuousIntegrationBuild=true</InnerBuildArgs>
<!-- The inner build needs to reference the overall output dir for nupkg transport etc. --> <!-- The inner build needs to reference the overall output dir for nupkg transport etc. -->
<InnerBuildArgs>$(InnerBuildArgs) /p:SourceBuildOutputDir=$(SourceBuildOutputDir)</InnerBuildArgs> <InnerBuildArgs>$(InnerBuildArgs) /p:SourceBuildOutputDir=$(SourceBuildOutputDir)</InnerBuildArgs>
@ -97,6 +99,29 @@
</ItemGroup> </ItemGroup>
</Target> </Target>
<!--
PrepareInnerSourceBuildRepoRoot either clones the source to the inner repo
or copies the source to the inner repo depending on CopySrcInsteadOfClone.
Repos take a dependency on PrepareInnerSourceBuildRepoRoot, so this target
exists to wait until either the source is cloned or copied.
-->
<Target Name="PrepareInnerSourceBuildRepoRoot"
DependsOnTargets="CopyInnerSourceBuildRepoRoot;CloneInnerSourceBuildRepoRoot">
</Target>
<Target Name="CopyInnerSourceBuildRepoRoot" Condition=" '$(CopySrcInsteadOfClone)' == 'true' ">
<ItemGroup>
<SourceBuildFilesToCopy Include="$(RepoRoot)/**/*" />
<SourceBuildFilesToCopy Include="$(RepoRoot)/**/.*" />
<SourceBuildFilesToCopy Remove="$(RepoRoot)/artifacts/**/*" />
<SourceBuildFilesToCopy Remove="$(RepoRoot)/artifacts/**/.*" />
</ItemGroup>
<Copy
SourceFiles="@(SourceBuildFilesToCopy)"
DestinationFolder="$(InnerSourceBuildRepoRoot)%(RecursiveDir)" />
</Target>
<!-- <!--
Clone the repo to a new location. Source-build targets will change the source dynamically. Clone the repo to a new location. Source-build targets will change the source dynamically.
Creating a fresh clone avoids overwriting existing work or making subtle changes that might Creating a fresh clone avoids overwriting existing work or making subtle changes that might
@ -104,7 +129,7 @@
access to the git data, this also makes it easy to see what changes the source-build infra has access to the git data, this also makes it easy to see what changes the source-build infra has
made, for diagnosis or exploratory purposes. made, for diagnosis or exploratory purposes.
--> -->
<Target Name="PrepareInnerSourceBuildRepoRoot"> <Target Name="CloneInnerSourceBuildRepoRoot" Condition=" '$(CopySrcInsteadOfClone)' != 'true' ">
<PropertyGroup> <PropertyGroup>
<!-- <!--
By default, copy WIP. WIP copy helps with local machine dev work. Don't copy WIP if this is By default, copy WIP. WIP copy helps with local machine dev work. Don't copy WIP if this is

View file

@ -18,6 +18,7 @@
<Platform Condition="'$(Platform)' == 'AnyCPU'"></Platform> <Platform Condition="'$(Platform)' == 'AnyCPU'"></Platform>
<BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture> <BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
<Platform Condition="'$(Platform)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</Platform> <Platform Condition="'$(Platform)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</Platform>
<Platform Condition="'$(Platform)' == '' AND '$(BuildArchitecture)' == 's390x'">$(BuildArchitecture)</Platform>
<Platform Condition="'$(Platform)' == ''">x64</Platform> <Platform Condition="'$(Platform)' == ''">x64</Platform>
<UseStableVersions Condition="'$(UseStableVersions)' == ''">false</UseStableVersions> <UseStableVersions Condition="'$(UseStableVersions)' == ''">false</UseStableVersions>
@ -44,7 +45,6 @@
<DotNetCliToolDir Condition="'$(DotNetCliToolDir)' == '' and '$(DOTNET_INSTALL_DIR)' != ''">$([MSBuild]::NormalizeDirectory('$(DOTNET_INSTALL_DIR)'))</DotNetCliToolDir> <DotNetCliToolDir Condition="'$(DotNetCliToolDir)' == '' and '$(DOTNET_INSTALL_DIR)' != ''">$([MSBuild]::NormalizeDirectory('$(DOTNET_INSTALL_DIR)'))</DotNetCliToolDir>
<DotNetCliToolDir Condition="'$(DotNetCliToolDir)' == ''">$(ProjectDir).dotnet/</DotNetCliToolDir> <DotNetCliToolDir Condition="'$(DotNetCliToolDir)' == ''">$(ProjectDir).dotnet/</DotNetCliToolDir>
<DotnetToolCommand>$(DotNetCliToolDir)dotnet</DotnetToolCommand> <DotnetToolCommand>$(DotNetCliToolDir)dotnet</DotnetToolCommand>
<PatchesDir>$(ProjectDir)patches/</PatchesDir>
<PackagesDir Condition="'$(NuGetPackageRoot)' != ''">$(NuGetPackageRoot)</PackagesDir> <PackagesDir Condition="'$(NuGetPackageRoot)' != ''">$(NuGetPackageRoot)</PackagesDir>
<PackagesDir Condition="'$(PackagesDir)' == ''">$(ProjectDir)packages/restored/</PackagesDir> <PackagesDir Condition="'$(PackagesDir)' == ''">$(ProjectDir)packages/restored/</PackagesDir>
<ArcadeBootstrapPackageDir>$(PackagesDir)ArcadeBootstrapPackage/</ArcadeBootstrapPackageDir> <ArcadeBootstrapPackageDir>$(PackagesDir)ArcadeBootstrapPackage/</ArcadeBootstrapPackageDir>
@ -81,7 +81,6 @@
<PropertyGroup> <PropertyGroup>
<SubmoduleDirectory Condition="'$(SubmoduleDirectory)' == ''">$(ProjectDir)src/</SubmoduleDirectory> <SubmoduleDirectory Condition="'$(SubmoduleDirectory)' == ''">$(ProjectDir)src/</SubmoduleDirectory>
<GitModulesPath>$(ProjectDir).gitmodules</GitModulesPath> <GitModulesPath>$(ProjectDir).gitmodules</GitModulesPath>
<ProdConFeedPath>$(ProjectDir)ProdConFeed.txt</ProdConFeedPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
@ -253,10 +252,6 @@
<!-- Used by sdk to determine msbuild version for fsharp --> <!-- Used by sdk to determine msbuild version for fsharp -->
<ExtraPackageVersionPropsPackageInfo Include="FSharpBuildVersion" Version="%24(MicrosoftBuildPackageVersion)" /> <ExtraPackageVersionPropsPackageInfo Include="FSharpBuildVersion" Version="%24(MicrosoftBuildPackageVersion)" />
<!-- Used by roslyn-analyzsers to determine rsolyn version -->
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftCodeAnalysisForShippedApisVersion" Version="%24(MicrosoftCodeAnalysisVersion)" />
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftCodeAnalysisForRoslynDiagnosticsAnalyzersVersion" Version="%24(MicrosoftCodeAnalysisVersion)" />
<!-- property used by Arcade to determine what version of SourceLink to use --> <!-- property used by Arcade to determine what version of SourceLink to use -->
<!-- if MicrosoftSourceLinkCommonPackageVersion is non-empty, then we've already built SourceLink, regardless of whether <!-- if MicrosoftSourceLinkCommonPackageVersion is non-empty, then we've already built SourceLink, regardless of whether
this is the production or offline build, so we should use that version. --> this is the production or offline build, so we should use that version. -->

View file

@ -12,11 +12,4 @@
<Import Condition="'$(SkipArcadeSdkImport)' != 'true'" Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" /> <Import Condition="'$(SkipArcadeSdkImport)' != 'true'" Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Target Name="GetProdConBlobFeedUrl">
<PropertyGroup>
<ProdConBlobFeedUrl>$([System.IO.File]::ReadAllText('$(ProdConFeedPath)').Trim())</ProdConBlobFeedUrl>
<ProdConBlobFeedUrl Condition="'$(ProdConBlobFeedUrlPrefix)' != ''">$(ProdConBlobFeedUrl.Replace('https://dotnetfeed.blob.core.windows.net/', '$(ProdConBlobFeedUrlPrefix)'))</ProdConBlobFeedUrl>
</PropertyGroup>
</Target>
</Project> </Project>

View file

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
This file contains PVP versions of packages that will be built when all repos are included.
Including versions that would be built here allows repos that depend on these packages
coming from previously source-built packages to use the current versions. These packages
should show up a prebuilts until all repos are included. Then, the packages will be
in previously source-built packages and will be included in the PVP. At that point, this
file can be removed.
-->
<PropertyGroup>
<MicrosoftExtensionsDependencyModelVersion>6.0.0-preview.6.21352.12</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftNETCorePlatformsPackageVersion>3.1.0</MicrosoftNETCorePlatformsPackageVersion>
<MicrosoftNETCorePlatformsVersion>3.1.0</MicrosoftNETCorePlatformsVersion>
<SystemCollectionsImmutablePackageVersion>6.0.0-preview.6.21352.12</SystemCollectionsImmutablePackageVersion>
<SystemCollectionsImmutableVersion>6.0.0-preview.6.21352.12</SystemCollectionsImmutableVersion>
<SystemReflectionMetadataVersion>5.0.0</SystemReflectionMetadataVersion>
<SystemReflectionMetadataPackageVersion>5.0.0</SystemReflectionMetadataPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>6.0.0-preview.7.21321.2</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0-preview.7.21321.2</SystemRuntimeCompilerServicesUnsafeVersion>
</PropertyGroup>
</Project>

View file

@ -90,7 +90,7 @@
<WriteLinesToFile File="$(CompletedSemaphorePath)GeneratePrebuiltBurndownData.complete" Overwrite="true" /> <WriteLinesToFile File="$(CompletedSemaphorePath)GeneratePrebuiltBurndownData.complete" Overwrite="true" />
</Target> </Target>
<Target Name="RunSmokeTest" DependsOnTargets="GetProdConBlobFeedUrl"> <Target Name="RunSmokeTest">
<PropertyGroup> <PropertyGroup>
<SmokeTestCommand>./smoke-test.sh</SmokeTestCommand> <SmokeTestCommand>./smoke-test.sh</SmokeTestCommand>
<SmokeTestCommand>$(SmokeTestCommand) --minimal</SmokeTestCommand> <SmokeTestCommand>$(SmokeTestCommand) --minimal</SmokeTestCommand>
@ -102,15 +102,9 @@
<SmokeTestCommand Condition="'$(TargetOS)' == 'OSX'">$(SmokeTestCommand) --excludeWebHttpsTests</SmokeTestCommand> <SmokeTestCommand Condition="'$(TargetOS)' == 'OSX'">$(SmokeTestCommand) --excludeWebHttpsTests</SmokeTestCommand>
</PropertyGroup> </PropertyGroup>
<!--
Pass prodConBlobFeedUrl via EnvironmentVariables because it has '//' in it, which is
translated into '/' if it's passed in the Command arg.
This is also a problem when passing CLI feeds: https://github.com/dotnet/source-build/issues/561
-->
<Exec Command="$(SmokeTestCommand)" <Exec Command="$(SmokeTestCommand)"
EnvironmentVariables=" EnvironmentVariables="
targetRid=$(TargetRid); targetRid=$(TargetRid)" />
prodConBlobFeedUrl=$(ProdConBlobFeedUrl)" />
</Target> </Target>
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="UploadToAzure" /> <UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="UploadToAzure" />
@ -139,11 +133,11 @@
</Target> </Target>
<Target Name="CreatePrebuiltsTarball" <Target Name="CreatePrebuiltsTarball"
AfterTargets="Build" > AfterTargets="Build">
<PropertyGroup> <PropertyGroup>
<TarballFileVersion>$(PrivateSourceBuiltPrebuiltsPackageVersionPrefix)$([MSBuild]::Add($(PrivateSourceBuiltPrebuiltsPackageVersionSuffix), 1))</TarballFileVersion> <TarballFileVersion>$(PrivateSourceBuiltPrebuiltsPackageVersionPrefix)$([MSBuild]::Add($(PrivateSourceBuiltPrebuiltsPackageVersionSuffix), 1))</TarballFileVersion>
<TarballFilePath>$(PackageReportDir)$(SourceBuiltPrebuiltsTarballName).$(TarballFileVersion).tar.gz</TarballFilePath> <TarballFilePath>$(OutputPath)$(SourceBuiltPrebuiltsTarballName).$(TarballFileVersion).tar.gz</TarballFilePath>
<TarballWorkingDir>$(ResultingPrebuiltPackagesDir)</TarballWorkingDir> <TarballWorkingDir>$(ResultingPrebuiltPackagesDir)</TarballWorkingDir>
</PropertyGroup> </PropertyGroup>

View file

@ -8,6 +8,7 @@ usage() {
echo " --online build using online sources" echo " --online build using online sources"
echo " --with-packages <dir> use the specified directory of previously-built packages" echo " --with-packages <dir> use the specified directory of previously-built packages"
echo " --with-sdk <dir> use the SDK in the specified directory for bootstrapping" echo " --with-sdk <dir> use the SDK in the specified directory for bootstrapping"
echo " --run-smoke-test don't build; run smoke tests"
echo "use -- to send the remaining arguments to MSBuild" echo "use -- to send the remaining arguments to MSBuild"
echo "" echo ""
} }

View file

@ -21,8 +21,8 @@
</PropertyGroup> </PropertyGroup>
<!-- Production Dependencies --> <!-- Production Dependencies -->
<PropertyGroup> <PropertyGroup>
<PrivateSourceBuiltArtifactsPackageVersion>0.1.0-6.0.100-bootstrap.11</PrivateSourceBuiltArtifactsPackageVersion> <PrivateSourceBuiltArtifactsPackageVersion>0.1.0-6.0.100-bootstrap.19</PrivateSourceBuiltArtifactsPackageVersion>
<PrivateSourceBuiltPrebuiltsPackageVersionPrefix>0.1.0-6.0.100-</PrivateSourceBuiltPrebuiltsPackageVersionPrefix> <PrivateSourceBuiltPrebuiltsPackageVersionPrefix>0.1.0-6.0.100-</PrivateSourceBuiltPrebuiltsPackageVersionPrefix>
<PrivateSourceBuiltPrebuiltsPackageVersionSuffix>19</PrivateSourceBuiltPrebuiltsPackageVersionSuffix> <PrivateSourceBuiltPrebuiltsPackageVersionSuffix>23</PrivateSourceBuiltPrebuiltsPackageVersionSuffix>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View file

@ -1,6 +1,6 @@
{ {
"tools": { "tools": {
"dotnet": "6.0.100-preview.6.21355.2" "dotnet": "6.0.100-rc.2.21426.20"
}, },
"msbuild-sdks": { "msbuild-sdks": {
"Microsoft.Build.CentralPackageVersions": "2.0.1", "Microsoft.Build.CentralPackageVersions": "2.0.1",

View file

@ -1,122 +0,0 @@
From 5288390142a40beb392f5e11380b370ab696830c Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Wed, 21 Jul 2021 21:10:15 +0000
Subject: [PATCH] Update TFM to net6.0
When building from source, only the current TFM is built. Update
TargetFrameworks to only have net6.0.
---
eng/TargetFrameworkDefaults.props | 2 +-
.../Microsoft.DotNet.Deployment.Tasks.Links.csproj | 2 +-
.../tasks/Microsoft.DotNet.NuGetRepack.Tasks.csproj | 2 +-
.../Microsoft.DotNet.GenFacades.csproj | 1 +
.../Microsoft.DotNet.PackageTesting.csproj | 1 +
.../Microsoft.DotNet.SharedFramework.Sdk.csproj | 1 +
src/Microsoft.DotNet.SignTool/Microsoft.DotNet.SignTool.csproj | 2 +-
.../tasks/Microsoft.DotNet.VersionTools.Tasks.csproj | 2 +-
8 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/eng/TargetFrameworkDefaults.props b/eng/TargetFrameworkDefaults.props
index 89f2a8eb..ca3546e8 100644
--- a/eng/TargetFrameworkDefaults.props
+++ b/eng/TargetFrameworkDefaults.props
@@ -6,7 +6,7 @@
-->
<PropertyGroup>
<TargetFrameworkForNETSDK>netcoreapp3.1</TargetFrameworkForNETSDK>
- <TargetFrameworkForNETSDK Condition="'$(DotNetBuildFromSource)' == 'true'">net5.0</TargetFrameworkForNETSDK>
+ <TargetFrameworkForNETSDK Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</TargetFrameworkForNETSDK>
</PropertyGroup>
</Project>
diff --git a/src/Microsoft.DotNet.Deployment.Tasks.Links/Microsoft.DotNet.Deployment.Tasks.Links.csproj b/src/Microsoft.DotNet.Deployment.Tasks.Links/Microsoft.DotNet.Deployment.Tasks.Links.csproj
index 30474e21..c964fbea 100644
--- a/src/Microsoft.DotNet.Deployment.Tasks.Links/Microsoft.DotNet.Deployment.Tasks.Links.csproj
+++ b/src/Microsoft.DotNet.Deployment.Tasks.Links/Microsoft.DotNet.Deployment.Tasks.Links.csproj
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
- <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<Description>Aka.ms link manager</Description>
diff --git a/src/Microsoft.DotNet.NuGetRepack/tasks/Microsoft.DotNet.NuGetRepack.Tasks.csproj b/src/Microsoft.DotNet.NuGetRepack/tasks/Microsoft.DotNet.NuGetRepack.Tasks.csproj
index 6a1cee07..e01890c8 100644
--- a/src/Microsoft.DotNet.NuGetRepack/tasks/Microsoft.DotNet.NuGetRepack.Tasks.csproj
+++ b/src/Microsoft.DotNet.NuGetRepack/tasks/Microsoft.DotNet.NuGetRepack.Tasks.csproj
@@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
- <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackageType>MSBuildSdk</PackageType>
diff --git a/src/Microsoft.DotNet.GenFacades/Microsoft.DotNet.GenFacades.csproj b/src/Microsoft.DotNet.GenFacades/Microsoft.DotNet.GenFacades.csproj
index db51ae17..bca9958d 100644
--- a/src/Microsoft.DotNet.GenFacades/Microsoft.DotNet.GenFacades.csproj
+++ b/src/Microsoft.DotNet.GenFacades/Microsoft.DotNet.GenFacades.csproj
@@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFrameworks>$(TargetFrameworkForNETSDK);net472</TargetFrameworks>
+ <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(TargetFrameworkForNETSDK)</TargetFrameworks>
<PackageType>MSBuildSdk</PackageType>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IsPackable>true</IsPackable>
diff --git a/src/Microsoft.DotNet.PackageTesting/Microsoft.DotNet.PackageTesting.csproj b/src/Microsoft.DotNet.PackageTesting/Microsoft.DotNet.PackageTesting.csproj
index 2f35e4aa..dfe69f4c 100644
--- a/src/Microsoft.DotNet.PackageTesting/Microsoft.DotNet.PackageTesting.csproj
+++ b/src/Microsoft.DotNet.PackageTesting/Microsoft.DotNet.PackageTesting.csproj
@@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
+ <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</TargetFrameworks>
<ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
<PackageType>MSBuildSdk</PackageType>
<IncludeBuildOutput>false</IncludeBuildOutput>
diff --git a/src/Microsoft.DotNet.SharedFramework.Sdk/Microsoft.DotNet.SharedFramework.Sdk.csproj b/src/Microsoft.DotNet.SharedFramework.Sdk/Microsoft.DotNet.SharedFramework.Sdk.csproj
index 4405a1fe..a93edfaa 100644
--- a/src/Microsoft.DotNet.SharedFramework.Sdk/Microsoft.DotNet.SharedFramework.Sdk.csproj
+++ b/src/Microsoft.DotNet.SharedFramework.Sdk/Microsoft.DotNet.SharedFramework.Sdk.csproj
@@ -2,6 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</TargetFrameworks>
<LangVersion>preview</LangVersion>
<ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
diff --git a/src/Microsoft.DotNet.SignTool/Microsoft.DotNet.SignTool.csproj b/src/Microsoft.DotNet.SignTool/Microsoft.DotNet.SignTool.csproj
index 8ec571ae..7a89dfe9 100644
--- a/src/Microsoft.DotNet.SignTool/Microsoft.DotNet.SignTool.csproj
+++ b/src/Microsoft.DotNet.SignTool/Microsoft.DotNet.SignTool.csproj
@@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
- <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>Latest</LangVersion>
<IsPackable>true</IsPackable>
diff --git a/src/Microsoft.DotNet.VersionTools/tasks/Microsoft.DotNet.VersionTools.Tasks.csproj b/src/Microsoft.DotNet.VersionTools/tasks/Microsoft.DotNet.VersionTools.Tasks.csproj
index 208ffb03..2dfa124f 100644
--- a/src/Microsoft.DotNet.VersionTools/tasks/Microsoft.DotNet.VersionTools.Tasks.csproj
+++ b/src/Microsoft.DotNet.VersionTools/tasks/Microsoft.DotNet.VersionTools.Tasks.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
- <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</TargetFrameworks>
<PackageType>MSBuildSdk</PackageType>
</PropertyGroup>
--
2.31.1

View file

@ -1,37 +0,0 @@
From 9531b8ea8fab44bf8b9b19c64c393e0d2d5907c4 Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Wed, 21 Jul 2021 22:07:46 +0000
Subject: [PATCH 1/2] Exclude test projects from source-build
---
.../Microsoft.Arcade.Common.Tests.csproj | 1 +
.../Microsoft.Arcade.Test.Common.csproj | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/Common/Microsoft.Arcade.Common.Tests/Microsoft.Arcade.Common.Tests.csproj b/src/Common/Microsoft.Arcade.Common.Tests/Microsoft.Arcade.Common.Tests.csproj
index 653588d2..98b20958 100644
--- a/src/Common/Microsoft.Arcade.Common.Tests/Microsoft.Arcade.Common.Tests.csproj
+++ b/src/Common/Microsoft.Arcade.Common.Tests/Microsoft.Arcade.Common.Tests.csproj
@@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Nullable>enable</Nullable>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
</PropertyGroup>
<ItemGroup>
diff --git a/src/Common/Microsoft.Arcade.Test.Common/Microsoft.Arcade.Test.Common.csproj b/src/Common/Microsoft.Arcade.Test.Common/Microsoft.Arcade.Test.Common.csproj
index bb3c5eeb..bcc3d717 100644
--- a/src/Common/Microsoft.Arcade.Test.Common/Microsoft.Arcade.Test.Common.csproj
+++ b/src/Common/Microsoft.Arcade.Test.Common/Microsoft.Arcade.Test.Common.csproj
@@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<IsTestProject>true</IsTestProject>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
</PropertyGroup>
<ItemGroup>
--
2.31.1

View file

@ -1,24 +0,0 @@
From 63ab09a985b91f4b30a58dc113abc65d34298a12 Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Wed, 21 Jul 2021 22:09:10 +0000
Subject: [PATCH 2/2] Remove net472 TFM
---
.../Microsoft.Arcade.Common/Microsoft.Arcade.Common.csproj | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/Common/Microsoft.Arcade.Common/Microsoft.Arcade.Common.csproj b/src/Common/Microsoft.Arcade.Common/Microsoft.Arcade.Common.csproj
index 324725f5..ac04f517 100644
--- a/src/Common/Microsoft.Arcade.Common/Microsoft.Arcade.Common.csproj
+++ b/src/Common/Microsoft.Arcade.Common/Microsoft.Arcade.Common.csproj
@@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
+ <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">netstandard2.0</TargetFrameworks>
<IsPackable>true</IsPackable>
</PropertyGroup>
--
2.31.1

View file

@ -1,25 +0,0 @@
From 05673a6eb5004131cd42eda6d372e94c1dfb3165 Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Wed, 21 Jul 2021 22:25:51 +0000
Subject: [PATCH] Use property instead of hardcoded version
---
.../src/Microsoft.DotNet.Build.Tasks.Packaging.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/src/Microsoft.DotNet.Build.Tasks.Packaging.csproj b/src/Microsoft.DotNet.Build.Tasks.Packaging/src/Microsoft.DotNet.Build.Tasks.Packaging.csproj
index 31562d59..200fd507 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/src/Microsoft.DotNet.Build.Tasks.Packaging.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/src/Microsoft.DotNet.Build.Tasks.Packaging.csproj
@@ -89,7 +89,7 @@
<Target Name="FindRuntimeJson" Inputs="%(_candidatPackageFolders.Identity)" Outputs="unused">
<PropertyGroup>
<_candidatePackageFolder>%(_candidatPackageFolders.Identity)</_candidatePackageFolder>
- <_runtimeJsonSubPath>Microsoft.NETCore.Platforms\2.1.0\runtime.json</_runtimeJsonSubPath>
+ <_runtimeJsonSubPath>Microsoft.NETCore.Platforms\$(MicrosoftNETCorePlatformsVersion)\runtime.json</_runtimeJsonSubPath>
<_runtimeJsonPath Condition="'$(_runtimeJsonPath)' == '' AND Exists('$(_candidatePackageFolder)\$(_runtimeJsonSubPath)')">$(_candidatePackageFolder)\$(_runtimeJsonSubPath)</_runtimeJsonPath>
<_runtimeJsonPath Condition="'$(_runtimeJsonPath)' == '' AND Exists('$(_candidatePackageFolder)\$(_runtimeJsonSubPath.ToLower())')">$(_candidatePackageFolder)\$(_runtimeJsonSubPath.ToLower())</_runtimeJsonPath>
</PropertyGroup>
--
2.31.1

View file

@ -1,61 +0,0 @@
From db187e95f62d9bff268e68f39b441b6da8be9111 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Mon, 2 Aug 2021 19:02:27 +0000
Subject: [PATCH] Run GenerateFiles during source build
GenerateFiles is not running in source build yet the outputs are required.
These changes get GenerateFiles to run as part of source build.
These changes also turn on the binaryLog option while building the RepoTasks during source build.
---
eng/SourceBuild.props | 3 +--
eng/Tools.props | 2 +-
eng/tools/GenerateFiles/GenerateFiles.csproj | 1 +
4 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
index 27cbe92036..3dbfe2ce7e 100644
--- a/eng/SourceBuild.props
+++ b/eng/SourceBuild.props
@@ -1,5 +1,4 @@
<Project>
-
<PropertyGroup>
<GitHubRepositoryName>aspnetcore</GitHubRepositoryName>
<SourceBuildManagedOnly>true</SourceBuildManagedOnly>
@@ -47,7 +46,7 @@
BeforeTargets="Execute">
<Exec
- Command="./eng/build.sh --only-build-repo-tasks"
+ Command="./eng/build.sh --only-build-repo-tasks -bl"
WorkingDirectory="$(InnerSourceBuildRepoRoot)"
EnvironmentVariables="@(InnerBuildEnv)" />
</Target>
diff --git a/eng/Tools.props b/eng/Tools.props
index a285c2406a..a38257f770 100644
--- a/eng/Tools.props
+++ b/eng/Tools.props
@@ -13,7 +13,7 @@
<!-- Update the generated files when we restore projects. Skip in desktop msbuild due to VS 16.8 requirements. -->
<Target Name="GenerateDirectoryBuildFiles"
AfterTargets="Restore"
- Condition=" '$(DotNetBuildFromSource)' != 'true' AND '$(MSBuildRuntimeType)' == 'core' ">
+ Condition=" '$(MSBuildRuntimeType)' == 'core' ">
<!-- Separate invocations and use different properties to ensure second can load the restored package info. -->
<MSBuild Projects="$(RepoRoot)eng\tools\GenerateFiles\GenerateFiles.csproj"
RemoveProperties="BaseIntermediateOutputPath"
diff --git a/eng/tools/GenerateFiles/GenerateFiles.csproj b/eng/tools/GenerateFiles/GenerateFiles.csproj
index 0ae5c9753e..dbf9965bf9 100644
--- a/eng/tools/GenerateFiles/GenerateFiles.csproj
+++ b/eng/tools/GenerateFiles/GenerateFiles.csproj
@@ -2,6 +2,7 @@
<PropertyGroup>
<!-- Use fixed version instead of $(DefaultNetCoreTargetFramework) to avoid needing workarounds set up here. -->
<TargetFramework>net5.0</TargetFramework>
+ <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
</PropertyGroup>
<ItemGroup>
--
2.29.2

View file

@ -1,28 +0,0 @@
From 14992fbe4d8f433025cc45be81ef0035ed77221b Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Mon, 2 Aug 2021 13:40:03 +0000
Subject: [PATCH] Use Versions.props MicrosoftExtensionsDependencyModelVersion
in RepoTasks
Source build is loading a reference assembly which fails when the RepoTasks are invoked.
This change gets source build to use the version which is source built.
---
eng/tools/RepoTasks/RepoTasks.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/tools/RepoTasks/RepoTasks.csproj b/eng/tools/RepoTasks/RepoTasks.csproj
index e723beb353..67e01850f8 100644
--- a/eng/tools/RepoTasks/RepoTasks.csproj
+++ b/eng/tools/RepoTasks/RepoTasks.csproj
@@ -16,7 +16,7 @@
<ItemGroup>
<PackageReference Include="NuGet.Packaging" Version="$(NuGetPackagingVersion)" />
- <PackageReference Include="Microsoft.Extensions.DependencyModel" Version="2.1.0" />
+ <PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(MicrosoftExtensionsDependencyModelVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">
--
2.29.2

View file

@ -1,41 +0,0 @@
From c57808231260cc3467b98d97c3249a59db9757f2 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Mon, 9 Aug 2021 13:43:41 +0000
Subject: [PATCH] Update reference versions to be source buildable
Update CodeAnalysis version reference to utilize Versions.props in order to work with source build.
---
eng/Versions.props | 1 +
.../Microsoft.NET.Sdk.Razor.SourceGenerators.csproj | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index 07cca8a35..8fb6dffaf 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -122,6 +122,7 @@
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/roslyn -->
<MicrosoftNetCompilersToolsetPackageVersion>4.0.0-2.21359.14</MicrosoftNetCompilersToolsetPackageVersion>
+ <MicrosoftCodeAnalysisPackageVersion>4.0.0-2.21359.14</MicrosoftCodeAnalysisPackageVersion>
<MicrosoftCodeAnalysisCSharpPackageVersion>4.0.0-2.21359.14</MicrosoftCodeAnalysisCSharpPackageVersion>
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>4.0.0-2.21359.14</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>4.0.0-2.21359.14</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
diff --git a/src/RazorSdk/SourceGenerators/Microsoft.NET.Sdk.Razor.SourceGenerators.csproj b/src/RazorSdk/SourceGenerators/Microsoft.NET.Sdk.Razor.SourceGenerators.csproj
index 1213ec4db..81697986c 100644
--- a/src/RazorSdk/SourceGenerators/Microsoft.NET.Sdk.Razor.SourceGenerators.csproj
+++ b/src/RazorSdk/SourceGenerators/Microsoft.NET.Sdk.Razor.SourceGenerators.csproj
@@ -15,8 +15,8 @@
<!-- Instead of using the version of M.C.C defined in Version.props we pin to a minimum required
version to avoid issues with loading newer versions of the assembly in VS/VS Code. -->
<PackageReference Include="Microsoft.AspNetCore.Razor.Language" Version="$(MicrosoftAspNetCoreRazorLanguageVersion)" GeneratePathProperty="true" />
- <PackageReference Include="Microsoft.CodeAnalysis" Version="4.0.0-2.21354.7" />
- <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.0-2.21354.7" />
+ <PackageReference Include="Microsoft.CodeAnalysis" Version="$(MicrosoftCodeAnalysisPackageVersion)" />
+ <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(MicrosoftCodeAnalysisCSharpPackageVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.Razor" Version="$(MicrosoftCodeAnalysisRazorVersion)" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="$(MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion)" GeneratePathProperty="true" />
</ItemGroup>
--
2.29.2

View file

@ -1,53 +0,0 @@
From 6009d921575a4474c66b812bdb914237ddb04cc2 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Mon, 9 Aug 2021 15:27:19 +0000
Subject: [PATCH] Remove 472 TFM from source build
src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj : error NU1202: Package Microsoft.Build 17.0.0 is not compatible with net472 (.NETFramework,Version=v4.7.2). Package Microsoft.Build 17.0.0 supports: net6.0 (.NETCoreApp,Version=v6.0)
src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj : error NU1202: Package Microsoft.Build 17.0.0 is not compatible with net472 (.NETFramework,Version=v4.7.2). Package Microsoft.Build 17.0.0 supports: net6.0 (.NETCoreApp,Version=v6.0)
.dotnet/sdk/6.0.100-preview.5.21225.11/Microsoft.Common.CurrentVersion.targets(1717,5): error : Project '../Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj' targets 'net6.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.7.2'.
---
.../Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj | 1 +
.../Microsoft.NET.Build.Extensions.Tasks.csproj | 1 +
.../Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj | 1 +
3 files changed, 3 insertions(+)
diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj b/src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
index c10a6224c..66a26913b 100644
--- a/src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
+++ b/src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
@@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFrameworks>$(SdkTargetFramework);net472</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">$(SdkTargetFramework)</TargetFrameworks>
<WarningsAsErrors>true</WarningsAsErrors>
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
<SignAssembly>true</SignAssembly>
diff --git a/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/Microsoft.NET.Build.Extensions.Tasks.csproj b/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/Microsoft.NET.Build.Extensions.Tasks.csproj
index 280fbdc83..13ada8222 100644
--- a/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/Microsoft.NET.Build.Extensions.Tasks.csproj
+++ b/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/Microsoft.NET.Build.Extensions.Tasks.csproj
@@ -16,6 +16,7 @@
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.NET.Build.Tasks</RootNamespace>
<TargetFrameworks>$(SdkTargetFramework);net472</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">$(SdkTargetFramework)</TargetFrameworks>
</PropertyGroup>
<PropertyGroup>
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj b/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj
index e7ff48146..c98ed27cf 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj
@@ -13,6 +13,7 @@
<Description>The MSBuild targets and properties for building .NET Core projects.</Description>
<OutputType>Library</OutputType>
<TargetFrameworks>$(SdkTargetFramework);net472</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">$(SdkTargetFramework)</TargetFrameworks>
<Nullable>annotations</Nullable>
</PropertyGroup>
--
2.29.2

View file

@ -1,156 +0,0 @@
From aba2e21af6d299f0e5c04c7848e4971e0da0e5b5 Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Tue, 20 Jul 2021 21:01:43 +0000
Subject: [PATCH] Update TFMs to net6.0
When building from source, only the current TFM is built. Update
TargetFrameworks to only have net6.0.
---
eng/Versions.props | 1 +
src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj | 1 +
.../Microsoft.SourceLink.AzureDevOpsServer.Git.csproj | 1 +
.../Microsoft.SourceLink.AzureRepos.Git.csproj | 1 +
.../Microsoft.SourceLink.Bitbucket.Git.csproj | 1 +
src/SourceLink.Common/Microsoft.SourceLink.Common.csproj | 1 +
src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj | 1 +
src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj | 1 +
src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj | 1 +
src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj | 1 +
src/SourceLink.Tools/Microsoft.SourceLink.Tools.Package.csproj | 1 +
11 files changed, 11 insertions(+)
diff --git a/eng/Versions.props b/eng/Versions.props
index 4ea51a8..eff58cf 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -7,6 +7,7 @@
<SemanticVersioningV1>true</SemanticVersioningV1>
<!-- Opt-in repo features -->
<UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>
+ <UsingToolNetFrameworkReferenceAssemblies Condition=" '$(DotNetBuildFromSource)' == 'true' ">false</UsingToolNetFrameworkReferenceAssemblies>
<UsingToolSymbolUploader>true</UsingToolSymbolUploader>
<XUnitVersion>2.4.1</XUnitVersion>
<MicrosoftBuildVersion>16.7.0</MicrosoftBuildVersion>
diff --git a/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj b/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj
index 71b45db..9f25e24 100644
--- a/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj
+++ b/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net5.0</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<!-- NuGet -->
diff --git a/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj b/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj
index b905b8e..43cd185 100644
--- a/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj
+++ b/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net5.0</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<!-- Using an explicit nuspec file due to https://github.com/NuGet/Home/issues/6754 -->
diff --git a/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj b/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj
index 8a5a0bf..5400288 100644
--- a/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj
+++ b/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net5.0</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<!-- Using an explicit nuspec file due to https://github.com/NuGet/Home/issues/6754 -->
diff --git a/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj b/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj
index 387b65c..db2ce6c 100644
--- a/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj
+++ b/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net5.0</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<!-- Using an explicit nuspec file since NuGet Pack target currently doesn't support including dependencies in tools packages -->
diff --git a/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj b/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj
index b220563..5cf5ab4 100644
--- a/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj
+++ b/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net5.0</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<!-- NuGet -->
diff --git a/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj b/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj
index 45985c8..1b9edbc 100644
--- a/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj
+++ b/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net5.0</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<!-- Using an explicit nuspec file due to https://github.com/NuGet/Home/issues/6754 -->
diff --git a/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj b/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj
index 18300ce..9ca4657 100644
--- a/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj
+++ b/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net5.0</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<!-- Using an explicit nuspec file due to https://github.com/NuGet/Home/issues/6754 -->
diff --git a/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj b/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj
index 1991db7..ae16d1f 100644
--- a/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj
+++ b/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net5.0</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<!-- Using an explicit nuspec file due to https://github.com/NuGet/Home/issues/6754 -->
diff --git a/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj b/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj
index b5bbc93..164e243 100644
--- a/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj
+++ b/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net5.0</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<!-- Using an explicit nuspec file due to https://github.com/NuGet/Home/issues/6754 -->
diff --git a/src/SourceLink.Tools/Microsoft.SourceLink.Tools.Package.csproj b/src/SourceLink.Tools/Microsoft.SourceLink.Tools.Package.csproj
index 053f124..f27f774 100644
--- a/src/SourceLink.Tools/Microsoft.SourceLink.Tools.Package.csproj
+++ b/src/SourceLink.Tools/Microsoft.SourceLink.Tools.Package.csproj
@@ -3,6 +3,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net5.0;net472</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<DebugType>none</DebugType>
<GenerateDependencyFile>false</GenerateDependencyFile>
--
2.31.1

View file

@ -1,142 +0,0 @@
From e41e61e4c91785ba5ff1761c7d14d9f92a612ae4 Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Thu, 22 Jul 2021 15:00:30 +0000
Subject: [PATCH] Update Task paths to include net6.0
When building from source, only the current TFM is built. Update
tool paths to look in net6.0 path when building from source.
---
.../build/Microsoft.Build.Tasks.Git.props | 1 +
.../build/Microsoft.SourceLink.AzureDevOpsServer.Git.targets | 1 +
.../build/Microsoft.SourceLink.AzureRepos.Git.targets | 1 +
.../build/Microsoft.SourceLink.AzureRepos.Tfvc.targets | 1 +
.../build/Microsoft.SourceLink.Bitbucket.Git.targets | 1 +
src/SourceLink.Common/build/Microsoft.SourceLink.Common.props | 1 +
src/SourceLink.GitHub/build/Microsoft.SourceLink.GitHub.targets | 1 +
src/SourceLink.GitLab/build/Microsoft.SourceLink.GitLab.targets | 1 +
src/SourceLink.GitWeb/build/Microsoft.SourceLink.GitWeb.targets | 1 +
src/SourceLink.Gitea/build/Microsoft.SourceLink.Gitea.targets | 1 +
10 files changed, 10 insertions(+)
diff --git a/src/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.props b/src/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.props
index 337242e..25f1d1d 100644
--- a/src/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.props
+++ b/src/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.props
@@ -3,5 +3,6 @@
<PropertyGroup>
<MicrosoftBuildTasksGitAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.Build.Tasks.Git.dll</MicrosoftBuildTasksGitAssemblyFile>
<MicrosoftBuildTasksGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.Build.Tasks.Git.dll</MicrosoftBuildTasksGitAssemblyFile>
+ <MicrosoftBuildTasksGitAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.Build.Tasks.Git.dll</MicrosoftBuildTasksGitAssemblyFile>
</PropertyGroup>
</Project>
diff --git a/src/SourceLink.AzureDevOpsServer.Git/build/Microsoft.SourceLink.AzureDevOpsServer.Git.targets b/src/SourceLink.AzureDevOpsServer.Git/build/Microsoft.SourceLink.AzureDevOpsServer.Git.targets
index 1c2b313..fcb1ed8 100644
--- a/src/SourceLink.AzureDevOpsServer.Git/build/Microsoft.SourceLink.AzureDevOpsServer.Git.targets
+++ b/src/SourceLink.AzureDevOpsServer.Git/build/Microsoft.SourceLink.AzureDevOpsServer.Git.targets
@@ -3,6 +3,7 @@
<PropertyGroup>
<_SourceLinkAzureDevOpsServerGitAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.AzureDevOpsServer.Git.dll</_SourceLinkAzureDevOpsServerGitAssemblyFile>
<_SourceLinkAzureDevOpsServerGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.AzureDevOpsServer.Git.dll</_SourceLinkAzureDevOpsServerGitAssemblyFile>
+ <_SourceLinkAzureDevOpsServerGitAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.AzureDevOpsServer.Git.dll</_SourceLinkAzureDevOpsServerGitAssemblyFile>
</PropertyGroup>
<UsingTask TaskName="Microsoft.SourceLink.AzureDevOpsServer.Git.GetSourceLinkUrl" AssemblyFile="$(_SourceLinkAzureDevOpsServerGitAssemblyFile)"/>
diff --git a/src/SourceLink.AzureRepos.Git/build/Microsoft.SourceLink.AzureRepos.Git.targets b/src/SourceLink.AzureRepos.Git/build/Microsoft.SourceLink.AzureRepos.Git.targets
index d49e459..74a504c 100644
--- a/src/SourceLink.AzureRepos.Git/build/Microsoft.SourceLink.AzureRepos.Git.targets
+++ b/src/SourceLink.AzureRepos.Git/build/Microsoft.SourceLink.AzureRepos.Git.targets
@@ -3,6 +3,7 @@
<PropertyGroup>
<_SourceLinkAzureReposGitAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.AzureRepos.Git.dll</_SourceLinkAzureReposGitAssemblyFile>
<_SourceLinkAzureReposGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.AzureRepos.Git.dll</_SourceLinkAzureReposGitAssemblyFile>
+ <_SourceLinkAzureReposGitAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.AzureRepos.Git.dll</_SourceLinkAzureReposGitAssemblyFile>
</PropertyGroup>
<UsingTask TaskName="Microsoft.SourceLink.AzureRepos.Git.GetSourceLinkUrl" AssemblyFile="$(_SourceLinkAzureReposGitAssemblyFile)"/>
diff --git a/src/SourceLink.AzureRepos.Tfvc/build/Microsoft.SourceLink.AzureRepos.Tfvc.targets b/src/SourceLink.AzureRepos.Tfvc/build/Microsoft.SourceLink.AzureRepos.Tfvc.targets
index f4045fb..2f3fc2d 100644
--- a/src/SourceLink.AzureRepos.Tfvc/build/Microsoft.SourceLink.AzureRepos.Tfvc.targets
+++ b/src/SourceLink.AzureRepos.Tfvc/build/Microsoft.SourceLink.AzureRepos.Tfvc.targets
@@ -3,6 +3,7 @@
<PropertyGroup>
<_SourceLinkAzureReposTfvcAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.AzureRepos.Tfvc.dll</_SourceLinkAzureReposTfvcAssemblyFile>
<_SourceLinkAzureReposTfvcAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.AzureRepos.Tfvc.dll</_SourceLinkAzureReposTfvcAssemblyFile>
+ <_SourceLinkAzureReposTfvcAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.AzureRepos.Tfvc.dll</_SourceLinkAzureReposTfvcAssemblyFile>
</PropertyGroup>
<UsingTask TaskName="Microsoft.SourceLink.AzureRepos.Tfvc.GetSourceLinkUrl" AssemblyFile="$(_SourceLinkAzureReposTfvcAssemblyFile)"/>
diff --git a/src/SourceLink.Bitbucket.Git/build/Microsoft.SourceLink.Bitbucket.Git.targets b/src/SourceLink.Bitbucket.Git/build/Microsoft.SourceLink.Bitbucket.Git.targets
index 0cb1491..76eb4b5 100644
--- a/src/SourceLink.Bitbucket.Git/build/Microsoft.SourceLink.Bitbucket.Git.targets
+++ b/src/SourceLink.Bitbucket.Git/build/Microsoft.SourceLink.Bitbucket.Git.targets
@@ -3,6 +3,7 @@
<PropertyGroup>
<_SourceLinkBitbucketAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.Bitbucket.Git.dll</_SourceLinkBitbucketAssemblyFile>
<_SourceLinkBitbucketAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.Bitbucket.Git.dll</_SourceLinkBitbucketAssemblyFile>
+ <_SourceLinkBitbucketAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.Bitbucket.Git.dll</_SourceLinkBitbucketAssemblyFile>
</PropertyGroup>
<UsingTask TaskName="Microsoft.SourceLink.Bitbucket.Git.GetSourceLinkUrl" AssemblyFile="$(_SourceLinkBitbucketAssemblyFile)"/>
diff --git a/src/SourceLink.Common/build/Microsoft.SourceLink.Common.props b/src/SourceLink.Common/build/Microsoft.SourceLink.Common.props
index ac63a8a..ab657ff 100644
--- a/src/SourceLink.Common/build/Microsoft.SourceLink.Common.props
+++ b/src/SourceLink.Common/build/Microsoft.SourceLink.Common.props
@@ -3,6 +3,7 @@
<PropertyGroup>
<_MicrosoftSourceLinkCommonAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.Common.dll</_MicrosoftSourceLinkCommonAssemblyFile>
<_MicrosoftSourceLinkCommonAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.Common.dll</_MicrosoftSourceLinkCommonAssemblyFile>
+ <_MicrosoftSourceLinkCommonAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.Common.dll</_MicrosoftSourceLinkCommonAssemblyFile>
</PropertyGroup>
<PropertyGroup>
diff --git a/src/SourceLink.GitHub/build/Microsoft.SourceLink.GitHub.targets b/src/SourceLink.GitHub/build/Microsoft.SourceLink.GitHub.targets
index 2641835..52df43f 100644
--- a/src/SourceLink.GitHub/build/Microsoft.SourceLink.GitHub.targets
+++ b/src/SourceLink.GitHub/build/Microsoft.SourceLink.GitHub.targets
@@ -3,6 +3,7 @@
<PropertyGroup>
<_SourceLinkGitHubAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.GitHub.dll</_SourceLinkGitHubAssemblyFile>
<_SourceLinkGitHubAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.GitHub.dll</_SourceLinkGitHubAssemblyFile>
+ <_SourceLinkGitHubAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.GitHub.dll</_SourceLinkGitHubAssemblyFile>
</PropertyGroup>
<UsingTask TaskName="Microsoft.SourceLink.GitHub.GetSourceLinkUrl" AssemblyFile="$(_SourceLinkGitHubAssemblyFile)"/>
diff --git a/src/SourceLink.GitLab/build/Microsoft.SourceLink.GitLab.targets b/src/SourceLink.GitLab/build/Microsoft.SourceLink.GitLab.targets
index ffc5140..72dae7e 100644
--- a/src/SourceLink.GitLab/build/Microsoft.SourceLink.GitLab.targets
+++ b/src/SourceLink.GitLab/build/Microsoft.SourceLink.GitLab.targets
@@ -3,6 +3,7 @@
<PropertyGroup>
<_SourceLinkGitLabAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.GitLab.dll</_SourceLinkGitLabAssemblyFile>
<_SourceLinkGitLabAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.GitLab.dll</_SourceLinkGitLabAssemblyFile>
+ <_SourceLinkGitLabAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.GitLab.dll</_SourceLinkGitLabAssemblyFile>
</PropertyGroup>
<UsingTask TaskName="Microsoft.SourceLink.GitLab.GetSourceLinkUrl" AssemblyFile="$(_SourceLinkGitLabAssemblyFile)"/>
diff --git a/src/SourceLink.GitWeb/build/Microsoft.SourceLink.GitWeb.targets b/src/SourceLink.GitWeb/build/Microsoft.SourceLink.GitWeb.targets
index 9f21d62..8f5c453 100644
--- a/src/SourceLink.GitWeb/build/Microsoft.SourceLink.GitWeb.targets
+++ b/src/SourceLink.GitWeb/build/Microsoft.SourceLink.GitWeb.targets
@@ -3,6 +3,7 @@
<PropertyGroup>
<_SourceLinkGitWebAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.GitWeb.dll</_SourceLinkGitWebAssemblyFile>
<_SourceLinkGitWebAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.GitWeb.dll</_SourceLinkGitWebAssemblyFile>
+ <_SourceLinkGitWebAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.GitWeb.dll</_SourceLinkGitWebAssemblyFile>
</PropertyGroup>
<UsingTask TaskName="Microsoft.SourceLink.GitWeb.GetSourceLinkUrl" AssemblyFile="$(_SourceLinkGitWebAssemblyFile)" />
diff --git a/src/SourceLink.Gitea/build/Microsoft.SourceLink.Gitea.targets b/src/SourceLink.Gitea/build/Microsoft.SourceLink.Gitea.targets
index 5b6765e..8cccda0 100644
--- a/src/SourceLink.Gitea/build/Microsoft.SourceLink.Gitea.targets
+++ b/src/SourceLink.Gitea/build/Microsoft.SourceLink.Gitea.targets
@@ -3,6 +3,7 @@
<PropertyGroup>
<_SourceLinkGiteaAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.Gitea.dll</_SourceLinkGiteaAssemblyFile>
<_SourceLinkGiteaAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.Gitea.dll</_SourceLinkGiteaAssemblyFile>
+ <_SourceLinkGiteaAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.Gitea.dll</_SourceLinkGiteaAssemblyFile>
</PropertyGroup>
<UsingTask TaskName="Microsoft.SourceLink.Gitea.GetSourceLinkUrl" AssemblyFile="$(_SourceLinkGiteaAssemblyFile)"/>
--
2.31.1

View file

@ -1,36 +0,0 @@
From cfb26098630fe3cd9648ebcbbe9ac59278b63242 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Thu, 5 Aug 2021 19:51:19 +0000
Subject: [PATCH] Allow using .git directory instead of gitdir redirect in
submodules
---
.../GitDataReader/GitRepository.cs | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/Microsoft.Build.Tasks.Git/GitDataReader/GitRepository.cs b/src/Microsoft.Build.Tasks.Git/GitDataReader/GitRepository.cs
index 9f1648f..c079197 100644
--- a/src/Microsoft.Build.Tasks.Git/GitDataReader/GitRepository.cs
+++ b/src/Microsoft.Build.Tasks.Git/GitDataReader/GitRepository.cs
@@ -209,6 +209,18 @@ public static GitRepository OpenRepository(GitRepositoryLocation location, GitEn
/// <returns>Null if the HEAD tip reference can't be resolved.</returns>
internal string? ReadSubmoduleHeadCommitSha(string submoduleWorkingDirectoryFullPath)
{
+ // Submodules don't usually have their own .git directories but this is still legal.
+ // This can occur with older versions of Git or other tools, or when a user clones one
+ // repo into another's source tree (but it was not yet registered as a submodule).
+ // See https://git-scm.com/docs/gitsubmodules#_forms for more details.
+ // Handle this case first since the other case throws.
+ var dotGitPath = Path.Combine(submoduleWorkingDirectoryFullPath, GitDirName);
+ if (IsGitDirectory(dotGitPath, out var directSubmoduleGitDirectory))
+ {
+ var submoduleGitDirResolver = new GitReferenceResolver(directSubmoduleGitDirectory, directSubmoduleGitDirectory);
+ return submoduleGitDirResolver.ResolveHeadReference();
+ }
+
var gitDirectory = ReadDotGitFile(Path.Combine(submoduleWorkingDirectoryFullPath, GitDirName));
if (!IsGitDirectory(gitDirectory, out var commonDirectory))
{
--
2.29.2

View file

@ -1,31 +0,0 @@
From f4978575da2a47049a941260629f0f2e54979778 Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Thu, 22 Jul 2021 13:33:45 +0000
Subject: [PATCH] Exlude test project from source-build
---
src/TestUtilities/TestUtilities.csproj | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/TestUtilities/TestUtilities.csproj b/src/TestUtilities/TestUtilities.csproj
index c83b5df..92279cc 100644
--- a/src/TestUtilities/TestUtilities.csproj
+++ b/src/TestUtilities/TestUtilities.csproj
@@ -3,6 +3,7 @@
<TargetFramework>netstandard1.3</TargetFramework>
<IsShipping>false</IsShipping>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Collections.Immutable" Version="$(SystemCollectionsImmutableVersion)" />
@@ -13,4 +14,4 @@
<ItemGroup>
<ProjectReference Include="..\Microsoft.DiaSymReader\Microsoft.DiaSymReader.csproj" />
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
--
2.31.1

View file

@ -1,99 +0,0 @@
From 3ac6d94eed6cfbb7c06128fe4caa91e9701bc2f9 Mon Sep 17 00:00:00 2001
From: Vlada Shubina <vshubina@microsoft.com>
Date: Wed, 7 Jul 2021 12:10:50 +0300
Subject: [PATCH] fixed TemplateLocalizer tool
See https://github.com/dotnet/templating/issues/3379 for additional details.
---
NuGet.config | 1 +
.../TemplateLocalizer.cs | 8 +++++++-
.../Commands/Export/ExportCommand.cs | 8 ++------
.../ExportCommandTests.cs | 5 +++--
4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index b91f5fa3..30266b54 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -9,6 +9,7 @@
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="nugetbuild" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/nuget-build/nuget/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
+ <add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources />
</configuration>
diff --git a/src/Microsoft.TemplateEngine.TemplateLocalizer.Core/TemplateLocalizer.cs b/src/Microsoft.TemplateEngine.TemplateLocalizer.Core/TemplateLocalizer.cs
index f99ab340..ca64813e 100644
--- a/src/Microsoft.TemplateEngine.TemplateLocalizer.Core/TemplateLocalizer.cs
+++ b/src/Microsoft.TemplateEngine.TemplateLocalizer.Core/TemplateLocalizer.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.IO;
+using System.Linq;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
@@ -48,11 +49,16 @@ public async Task<ExportResult> ExportLocalizationFilesAsync(string templateJson
IReadOnlyList<TemplateString> templateJsonStrings = stringExtractor.ExtractStrings(out string templateJsonLanguage);
string targetDirectory = options.TargetDirectory ?? Path.Combine(Path.GetDirectoryName(templateJsonPath) ?? string.Empty, "localize");
+ IEnumerable<string> languages = ExportOptions.DefaultLanguages;
+ if (options.Languages?.Any() ?? false)
+ {
+ languages = options.Languages;
+ }
await TemplateStringUpdater.UpdateStringsAsync(
templateJsonStrings,
templateJsonLanguage,
- options.Languages ?? ExportOptions.DefaultLanguages,
+ languages,
targetDirectory,
options.DryRun,
_logger,
diff --git a/src/Microsoft.TemplateEngine.TemplateLocalizer/Commands/Export/ExportCommand.cs b/src/Microsoft.TemplateEngine.TemplateLocalizer/Commands/Export/ExportCommand.cs
index 5466ddcb..e1d8df4b 100644
--- a/src/Microsoft.TemplateEngine.TemplateLocalizer/Commands/Export/ExportCommand.cs
+++ b/src/Microsoft.TemplateEngine.TemplateLocalizer/Commands/Export/ExportCommand.cs
@@ -33,15 +33,11 @@ public override Command CreateCommand()
Name = "--recursive",
Description = LocalizableStrings.command_export_help_recursive_description,
});
- exportCommand.AddOption(new Option("-l")
+ exportCommand.AddOption(new Option<string>("-l")
{
Name = "--language",
Description = LocalizableStrings.command_export_help_language_description,
- Argument = new Argument()
- {
- Arity = ArgumentArity.OneOrMore,
- ArgumentType = typeof(string),
- },
+ Arity = ArgumentArity.OneOrMore
});
exportCommand.AddOption(new Option("-d")
{
diff --git a/test/Microsoft.TemplateEngine.TemplateLocalizer.IntegrationTests/ExportCommandTests.cs b/test/Microsoft.TemplateEngine.TemplateLocalizer.IntegrationTests/ExportCommandTests.cs
index 15682740..db81413c 100644
--- a/test/Microsoft.TemplateEngine.TemplateLocalizer.IntegrationTests/ExportCommandTests.cs
+++ b/test/Microsoft.TemplateEngine.TemplateLocalizer.IntegrationTests/ExportCommandTests.cs
@@ -153,11 +153,12 @@ public async Task LanguagesCanBeOverriden()
string[] exportedFiles = await RunTemplateLocalizer(
GetTestTemplateJsonContent(),
_workingDirectory,
- args: new string[] { "export", _workingDirectory, "--language", "tr" })
+ args: new string[] { "export", _workingDirectory, "--language", "tr", "de" })
.ConfigureAwait(false);
- Assert.Single(exportedFiles);
+ Assert.Equal(2, exportedFiles.Length);
Assert.True(File.Exists(Path.Combine(_workingDirectory, "localize", "templatestrings.tr.json")));
+ Assert.True(File.Exists(Path.Combine(_workingDirectory, "localize", "templatestrings.de.json")));
Assert.False(File.Exists(Path.Combine(_workingDirectory, "localize", "templatestrings.es.json")));
}
--
2.29.2

View file

@ -1,26 +0,0 @@
From 0fc9ffcb249411f9911a6e13f939eaf95bf219c8 Mon Sep 17 00:00:00 2001
From: MichaelSimons <msimons@microsoft.com>
Date: Wed, 7 Jul 2021 20:57:34 +0000
Subject: [PATCH] Condition win7-x86 RID
Eliminate build errors from source-build building for linux RIDs
---
src/SettingsMigrator/SettingsMigrator.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/SettingsMigrator/SettingsMigrator.csproj b/src/SettingsMigrator/SettingsMigrator.csproj
index 4f9f6a30..528ed1a4 100644
--- a/src/SettingsMigrator/SettingsMigrator.csproj
+++ b/src/SettingsMigrator/SettingsMigrator.csproj
@@ -15,7 +15,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
- <PropertyGroup>
+ <PropertyGroup Condition="'$(TargetFramework)' == 'net451'">
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
</PropertyGroup>
<ItemGroup>
--
2.26.2

View file

@ -63,16 +63,6 @@
<EnvironmentVariables Include="_InitializeToolset=$(ProjectDir)Tools/source-built/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj" Condition="'$(UseBootstrapArcade)' != 'true'" /> <EnvironmentVariables Include="_InitializeToolset=$(ProjectDir)Tools/source-built/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj" Condition="'$(UseBootstrapArcade)' != 'true'" />
<EnvironmentVariables Include="_OverrideArcadeInitializeBuildToolFramework=net6.0" /> <EnvironmentVariables Include="_OverrideArcadeInitializeBuildToolFramework=net6.0" />
<!--
With ProdCon v2, stabilization options are checked in, unlike ProdCon v1. These should be
deprecated but are left in to avoid potentially regressing edge-case versioning.
-->
<EnvironmentVariables Include="StabilizePackageVersion=$(IsStable)" Condition="'$(IsStable)' != '' and '$(IsToolingProject)' != 'true'" />
<EnvironmentVariables Include="PB_IsStable=$(IsStable)" Condition="'$(IsStable)' != '' and '$(IsToolingProject)' != 'true'" />
<EnvironmentVariables Include="IsStableBuild=$(IsStable)" Condition="'$(IsStable)' != '' and '$(IsToolingProject)' != 'true'" />
<EnvironmentVariables Include="DotNetFinalVersionKind=release" Condition="'$(IsStable)' == 'true' and '$(IsToolingProject)' != 'true'" />
<EnvironmentVariables Include="DropSuffix=true" Condition="'$(IsStable)' == 'true' and '$(IsToolingProject)' != 'true'" />
<EnvironmentVariables Include="DotNetUseShippingVersions=true" /> <EnvironmentVariables Include="DotNetUseShippingVersions=true" />
<EnvironmentVariables Include="PreReleaseVersionLabel=$(PreReleaseVersionLabel)" /> <EnvironmentVariables Include="PreReleaseVersionLabel=$(PreReleaseVersionLabel)" />
@ -147,6 +137,7 @@
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:ArcadeBuildFromSource=true</StandardSourceBuildArgs> <StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:ArcadeBuildFromSource=true</StandardSourceBuildArgs>
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:CopyWipIntoInnerSourceBuildRepo=true</StandardSourceBuildArgs> <StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:CopyWipIntoInnerSourceBuildRepo=true</StandardSourceBuildArgs>
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:DotNetBuildOffline=true</StandardSourceBuildArgs> <StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:DotNetBuildOffline=true</StandardSourceBuildArgs>
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:CopySrcInsteadOfClone=true</StandardSourceBuildArgs>
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:DotNetPackageVersionPropsPath="$(PackageVersionPropsPath)"</StandardSourceBuildArgs> <StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:DotNetPackageVersionPropsPath="$(PackageVersionPropsPath)"</StandardSourceBuildArgs>
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:AdditionalSourceBuiltNupkgCacheDir="$(SourceBuiltPackagesPath)"</StandardSourceBuildArgs> <StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:AdditionalSourceBuiltNupkgCacheDir="$(SourceBuiltPackagesPath)"</StandardSourceBuildArgs>
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:ReferencePackageNupkgCacheDir="$(ReferencePackagesDir)"</StandardSourceBuildArgs> <StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:ReferencePackageNupkgCacheDir="$(ReferencePackagesDir)"</StandardSourceBuildArgs>

View file

@ -70,26 +70,6 @@
<MSBuild Projects="@(_DependentProject)" Targets="Build" BuildInParallel="$(BuildInParallel)" StopOnFirstFailure="true" /> <MSBuild Projects="@(_DependentProject)" Targets="Build" BuildInParallel="$(BuildInParallel)" StopOnFirstFailure="true" />
</Target> </Target>
<ItemGroup Condition="Exists('$(PatchesDir)$(RepositoryName)')" >
<PatchesToApply Include="$(PatchesDir)$(RepositoryName)/*.patch" />
</ItemGroup>
<Target Name="ApplyPatches"
Condition="'@(PatchesToApply)' != '' and '$(SkipPatches)' != 'true'"
Inputs="@(PatchesToApply)"
Outputs="$(RepoCompletedSemaphorePath)ApplyPatches.complete" >
<PropertyGroup>
<PatchCommand>git --work-tree=$(ProjectDirectory) apply --ignore-whitespace --whitespace=nowarn</PatchCommand>
</PropertyGroup>
<Exec Command="$(PatchCommand) %(PatchesToApply.Identity)"
WorkingDirectory="$(ProjectDirectory)"
Condition="'@(PatchesToApply)' != ''" />
<WriteLinesToFile File="$(RepoCompletedSemaphorePath)ApplyPatches.complete" Overwrite="true" />
</Target>
<!-- <!--
Update root repo with trailing slash until https://github.com/dotnet/arcade/pull/7498 gets figured out Update root repo with trailing slash until https://github.com/dotnet/arcade/pull/7498 gets figured out
in arcade an propegated to all repos in arcade an propegated to all repos
@ -162,11 +142,9 @@
This adds additional scenarios when modifying tools.sh to search for the logger_path. Source-build This adds additional scenarios when modifying tools.sh to search for the logger_path. Source-build
builds arcade after the change, so the logger is no longer found in Microsoft.DotNet.Arcade.Sdk, builds arcade after the change, so the logger is no longer found in Microsoft.DotNet.Arcade.Sdk,
rather, it has moved to Microsoft.DotNet.ArcadeLogging. rather, it has moved to Microsoft.DotNet.ArcadeLogging.
The scenarios are: The scenarios are: -->
<!-- 1. Repo has old tools.sh - replace with new search for logger_path from updated tools.sh which looks for ArcadeLogging first,
1. Repo has old tools.sh - replace with new search for logger_path from updated tools.sh which looks for ArcadeLogging first,
but make the source-build search changes to find the right dll. --> but make the source-build search changes to find the right dll. -->
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)" <ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
OldText="local logger_path=&quot;$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll&quot;" OldText="local logger_path=&quot;$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll&quot;"
NewText="$(LoggerPathReplacementText)" /> NewText="$(LoggerPathReplacementText)" />
@ -182,6 +160,12 @@
OldText="_InitializeBuildToolFramework=&quot;netcoreapp3.1&quot;" OldText="_InitializeBuildToolFramework=&quot;netcoreapp3.1&quot;"
NewText="_InitializeBuildToolFramework=&quot;%24{_OverrideArcadeInitializeBuildToolFramework-netcoreapp3.1}&quot;" /> NewText="_InitializeBuildToolFramework=&quot;%24{_OverrideArcadeInitializeBuildToolFramework-netcoreapp3.1}&quot;" />
<!-- Temporary workaround for when the ci option is specified, non-zero exit are swallowed which prevents builds from failing within
the tarball build preocess. https://github.com/dotnet/source-build/issues/2307 -->
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
OldText="ExitWithExitCode 0"
NewText="ExitWithExitCode $exit_code" />
<WriteLinesToFile File="$(RepoCompletedSemaphorePath)UpdateBuildToolFramework.complete" Overwrite="true" /> <WriteLinesToFile File="$(RepoCompletedSemaphorePath)UpdateBuildToolFramework.complete" Overwrite="true" />
</Target> </Target>
@ -200,15 +184,6 @@
BuildWithOnlineSources="$(BuildWithOnlineSources)" BuildWithOnlineSources="$(BuildWithOnlineSources)"
KeepFeedPrefixes="@(KeepFeedPrefixes)" /> KeepFeedPrefixes="@(KeepFeedPrefixes)" />
<!-- Temporarily add dotnet6 feed to all NuGet.Configs
until all repos build so that preview packages
referenced in TemporaryBootstrapPackageVersions.props
can be found. -->
<AddSourceToNuGetConfig NuGetConfigFile="%(NuGetConfigFiles.Identity)"
SourceName="dotnet6-temporary"
SourcePath="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json"
Condition=" '$(BuildWithOnlineSources)' == 'true' " />
<AddSourceToNuGetConfig NuGetConfigFile="%(NuGetConfigFiles.Identity)" <AddSourceToNuGetConfig NuGetConfigFile="%(NuGetConfigFiles.Identity)"
SourceName="prebuilt" SourceName="prebuilt"
SourcePath="$(PrebuiltPackagesPath)" SourcePath="$(PrebuiltPackagesPath)"
@ -503,7 +478,7 @@
<SourceBuiltNupkgFiles Include="$(SourceBuiltPackagesPath)extractArtifacts/**/artifacts/*.nupkg" /> <SourceBuiltNupkgFiles Include="$(SourceBuiltPackagesPath)extractArtifacts/**/artifacts/*.nupkg" />
</ItemGroup> </ItemGroup>
<Copy <Move
Condition="'@(SourceBuiltNupkgFiles)' != ''" Condition="'@(SourceBuiltNupkgFiles)' != ''"
SourceFiles="@(SourceBuiltNupkgFiles)" SourceFiles="@(SourceBuiltNupkgFiles)"
DestinationFiles="@(SourceBuiltNupkgFiles -> '$(_NupkgDestinationPath)%(Filename)%(Extension)')" /> DestinationFiles="@(SourceBuiltNupkgFiles -> '$(_NupkgDestinationPath)%(Filename)%(Extension)')" />
@ -513,7 +488,7 @@
<SourceBuiltAssetFiles Remove="$(SourceBuiltPackagesPath)extractArtifacts/**/artifacts/*.nupkg" /> <SourceBuiltAssetFiles Remove="$(SourceBuiltPackagesPath)extractArtifacts/**/artifacts/*.nupkg" />
</ItemGroup> </ItemGroup>
<Copy <Move
Condition="'@(SourceBuiltAssetFiles)' != ''" Condition="'@(SourceBuiltAssetFiles)' != ''"
SourceFiles="@(SourceBuiltAssetFiles)" SourceFiles="@(SourceBuiltAssetFiles)"
DestinationFiles="@(SourceBuiltAssetFiles -> '$(SourceBuiltAssetsDir)%(Filename)%(Extension)')" /> DestinationFiles="@(SourceBuiltAssetFiles -> '$(SourceBuiltAssetsDir)%(Filename)%(Extension)')" />

View file

@ -29,8 +29,7 @@
<RepositoryReference Include="runtime" /> <RepositoryReference Include="runtime" />
<RepositoryReference Include="msbuild" /> <RepositoryReference Include="msbuild" />
<RepositoryReference Include="roslyn" /> <RepositoryReference Include="roslyn" />
<!-- TODO: https://github.com/dotnet/source-build/issues/2319 <RepositoryReference Include="roslyn-analyzers" />
<RepositoryReference Include="roslyn-analyzers" /> -->
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -40,7 +39,7 @@
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ReplaceRegexInFiles" /> <UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ReplaceRegexInFiles" />
<Target Name="FixAspNetCoreVersion" <Target Name="FixAspNetCoreVersion"
AfterTargets="ApplyPatches"> BeforeTargets="RepoBuild">
<ItemGroup> <ItemGroup>
<MinifiedJavascriptFile Include="$(ProjectDirectory)**\blazor.server.js" /> <MinifiedJavascriptFile Include="$(ProjectDirectory)**\blazor.server.js" />

View file

@ -5,6 +5,8 @@
<LogVerbosityOptOut>true</LogVerbosityOptOut> <LogVerbosityOptOut>true</LogVerbosityOptOut>
<BuildCommandArgs>$(StandardSourceBuildArgs)</BuildCommandArgs> <BuildCommandArgs>$(StandardSourceBuildArgs)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) $(FlagParameterPrefix)v $(LogVerbosity)</BuildCommandArgs> <BuildCommandArgs>$(BuildCommandArgs) $(FlagParameterPrefix)v $(LogVerbosity)</BuildCommandArgs>
<!-- Repo has netcoreapp2.1 projects: https://github.com/dotnet/CliCommandLineParser/issues/189 -->
<BuildCommandArgs>$(BuildCommandArgs) /p:CheckEolTargetFramework=false</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand> <BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile> <GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>

View file

@ -0,0 +1,21 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<BuildCommand>$(ProjectDirectory)eng\common\build$(ShellExtension) $(StandardSourceBuildArgs)</BuildCommand>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
</PropertyGroup>
<ItemGroup>
<RepositoryReference Include="runtime" />
</ItemGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -2,7 +2,8 @@
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup> <PropertyGroup>
<BuildCommand>$(ProjectDirectory)eng\common\build$(ShellExtension) $(StandardSourceBuildArgs)</BuildCommand> <BuildCommandArgs>$(StandardSourceBuildArgs)</BuildCommandArgs>
<BuildCommand>$(ProjectDirectory)eng\common\build$(ShellExtension) $(BuildCommandArgs)</BuildCommand>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile> <GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile> <NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>

View file

@ -62,8 +62,7 @@
<RepositoryReference Include="fsharp" /> <RepositoryReference Include="fsharp" />
<RepositoryReference Include="msbuild" /> <RepositoryReference Include="msbuild" />
<RepositoryReference Include="source-build" /> <RepositoryReference Include="source-build" />
<!-- TODO: https://github.com/dotnet/source-build/issues/2279 <RepositoryReference Include="nuget-client" />
<RepositoryReference Include="nuget-client" /> -->
<RepositoryReference Include="roslyn" /> <RepositoryReference Include="roslyn" />
<RepositoryReference Include="runtime" /> <RepositoryReference Include="runtime" />
<RepositoryReference Include="sdk" /> <RepositoryReference Include="sdk" />
@ -98,15 +97,19 @@
AfterTargets="ExtractIntermediatePackages" AfterTargets="ExtractIntermediatePackages"
Inputs="$(MSBuildProjectFullPath)" Inputs="$(MSBuildProjectFullPath)"
Outputs="$(RepoCompletedSemaphorePath)CopyTarBall.complete"> Outputs="$(RepoCompletedSemaphorePath)CopyTarBall.complete">
<PropertyGroup>
<TarBallPath>$(SourceBuiltAssetsDir)dotnet-sdk-*$(TarBallExtension)</TarBallPath>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<CliTarBalls Include="$(SourceBuiltAssetsDir)*$(TarBallExtension)" /> <TarBall Include="$(TarBallPath)" />
</ItemGroup> </ItemGroup>
<Error Condition="'@(CliTarBalls)' == ''" Text="'$(SourceBuiltPackagesPath)*$(TarBallExtension)' does not exist." /> <Error Condition="'@(TarBall)' == ''" Text="'$(TarBallPath)' does not exist." />
<Copy SourceFiles="@(CliTarBalls)" <Copy SourceFiles="@(TarBall)"
DestinationFolder="$(SourceBuiltTarBallPath)" DestinationFolder="$(SourceBuiltTarBallPath)" />
Condition="'@(CliTarBalls)' != ''" />
<WriteLinesToFile File="$(RepoCompletedSemaphorePath)CopyTarBall.complete" Overwrite="true" /> <WriteLinesToFile File="$(RepoCompletedSemaphorePath)CopyTarBall.complete" Overwrite="true" />
</Target> </Target>

View file

@ -48,8 +48,13 @@
<RepositoryReference Include="runtime" /> <RepositoryReference Include="runtime" />
<RepositoryReference Include="templating" /> <RepositoryReference Include="templating" />
<!-- Tier 3 -->
<RepositoryReference Include="roslyn-analyzers" />
<!-- Tier 4 --> <!-- Tier 4 -->
<RepositoryReference Include="aspnetcore" /> <RepositoryReference Include="aspnetcore" />
<RepositoryReference Include="deployment-tools" />
<RepositoryReference Include="nuget-client" />
<!-- Tier 5 --> <!-- Tier 5 -->
<RepositoryReference Include="fsharp" /> <RepositoryReference Include="fsharp" />

View file

@ -5,7 +5,9 @@
<!-- Package version is pinned to what CoreFX expects because CoreFX doesn't take an override property. --> <!-- Package version is pinned to what CoreFX expects because CoreFX doesn't take an override property. -->
<ILLinkTasksPackageId>Microsoft.NET.ILLink.Tasks</ILLinkTasksPackageId> <ILLinkTasksPackageId>Microsoft.NET.ILLink.Tasks</ILLinkTasksPackageId>
<BuildCommand>$(StandardSourceBuildCommand) $(StandardSourceBuildArgs)</BuildCommand> <BuildCommandArgs>$(StandardSourceBuildArgs)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) $(FlagParameterPrefix)warnAsError $(ArcadeFalseBoolBuildArg)</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<RepoApiImplemented>false</RepoApiImplemented> <RepoApiImplemented>false</RepoApiImplemented>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile> <NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
@ -16,26 +18,6 @@
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" /> <UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup> </ItemGroup>
<!-- Extract this package into packages dir, because repos assume it's restored as a tool. -->
<!-- TODO: Determine if this is still required. See https://github.com/dotnet/source-build/issues/2291 -->
<!-- <Target Name="ExtractLinkerPackageToCache"
AfterTargets="Package"
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(RepoCompletedSemaphorePath)ExtractLinkerPackageToCache.complete">
<PropertyGroup>
<ILLinkTasksPackageFile>$(PackagesOutput)/$(ILLinkTasksPackageId).$(OutputPackageVersion).nupkg</ILLinkTasksPackageFile>
<ILLinkTasksPackageIdToLower>$(ILLinkTasksPackageId.ToLowerInvariant())</ILLinkTasksPackageIdToLower>
</PropertyGroup>
<Message Importance="high" Text="Extracting $(ILLinkTasksPackageFile) to package cache..." />
<ZipFileExtractToDirectory SourceArchive="$(ILLinkTasksPackageFile)"
DestinationDirectory="$(PackagesDir)$(ILLinkTasksPackageIdToLower)/$(OutputPackageVersion)/"
OverwriteDestination="true" />
<WriteLinesToFile File="$(RepoCompletedSemaphorePath)ExtractLinkerPackageToCache.complete" Overwrite="true" />
</Target> -->
<!-- Replace file includes in nuspec as recommended in the linker repo's ./corebuild/README.md --> <!-- Replace file includes in nuspec as recommended in the linker repo's ./corebuild/README.md -->
<Target Name="ReplaceNuspecDllIncludeLines" BeforeTargets="Build" Condition="'$(TargetOS)' != 'Windows_NT'"> <Target Name="ReplaceNuspecDllIncludeLines" BeforeTargets="Build" Condition="'$(TargetOS)' != 'Windows_NT'">
<PropertyGroup> <PropertyGroup>

View file

@ -1,14 +1,7 @@
<Project> <Project>
<PropertyGroup>
<SourceDirectory>nuget.client</SourceDirectory>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup> <PropertyGroup>
<NuGetCoreSourceDirectory>$(ProjectDirectory)src/NuGet.Core/</NuGetCoreSourceDirectory>
<ToolsDirectory>$(ProjectDirectory)cli/</ToolsDirectory>
<NuGetKeyFilePath>$(KeysDir)NuGet.Client.snk</NuGetKeyFilePath> <NuGetKeyFilePath>$(KeysDir)NuGet.Client.snk</NuGetKeyFilePath>
<RepoApiImplemented>false</RepoApiImplemented> <RepoApiImplemented>false</RepoApiImplemented>
<DependencyVersionInputRepoApiImplemented>true</DependencyVersionInputRepoApiImplemented> <DependencyVersionInputRepoApiImplemented>true</DependencyVersionInputRepoApiImplemented>
@ -18,50 +11,17 @@
<ItemGroup> <ItemGroup>
<EnvironmentVariables Include="MS_PFX_PATH=$(NuGetKeyFilePath)" /> <EnvironmentVariables Include="MS_PFX_PATH=$(NuGetKeyFilePath)" />
<EnvironmentVariables Include="NUGET_PFX_PATH=$(NuGetKeyFilePath)" /> <EnvironmentVariables Include="NUGET_PFX_PATH=$(NuGetKeyFilePath)" />
<RepositoryReference Include="common" /> <RepositoryReference Include="source-build" />
<RepositoryReference Include="newtonsoft-json" />
<RepositoryReference Include="msbuild" /> <RepositoryReference Include="msbuild" />
<RepositoryReference Include="aspnet-xdt" /> <RepositoryReference Include="xdt" />
</ItemGroup> </ItemGroup>
<PropertyGroup>
<BuildCommandArgs>$(StandardSourceBuildArgs)</BuildCommandArgs>
<BuildCommand>$(ProjectDirectory)eng/source-build/build$(ShellExtension) $(BuildCommandArgs)</BuildCommand>
</PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<Target Name="RepoBuild">
<PropertyGroup>
<BuildCommandBase>$(DotnetToolCommand) msbuild $(ProjectDirectory)/build/build.proj</BuildCommandBase>
<BuildCommandBase>$(BuildCommandBase) /p:VisualStudioVerion=15.0</BuildCommandBase>
<BuildCommandBase>$(BuildCommandBase) /p:Configuration=$(Configuration)</BuildCommandBase>
<BuildCommandBase>$(BuildCommandBase) /p:BuildRTM=false</BuildCommandBase>
<BuildCommandBase>$(BuildCommandBase) /p:BuildNumber=$(OfficialBuildId)</BuildCommandBase>
<BuildCommandBase>$(BuildCommandBase) /v:$(LogVerbosity)</BuildCommandBase>
<BuildCommandBase>$(BuildCommandBase) /p:TreatWarningsAsErrors=false</BuildCommandBase>
<BuildCommandBase>$(BuildCommandBase) /p:DotNetPackageVersionPropsPath=$(PackageVersionPropsPath)</BuildCommandBase>
</PropertyGroup>
<Exec Command="$(BuildCommandBase) /t:RestoreXPLAT /bl:restore.binlog $(RedirectRepoOutputToLog)"
EnvironmentVariables="@(EnvironmentVariables)"
WorkingDirectory="$(ProjectDirectory)"
IgnoreStandardErrorWarningFormat="true" />
<Exec Command="$(BuildCommandBase) /t:BuildXPLAT /bl:build.binlog $(RedirectRepoOutputToLog)"
EnvironmentVariables="@(EnvironmentVariables)"
WorkingDirectory="$(ProjectDirectory)"
IgnoreStandardErrorWarningFormat="true" />
<PropertyGroup>
<PackCommand>$(BuildCommandBase) /t:PackXPlat</PackCommand>
<PackCommand>$(PackCommand) /p:PackageOutputPath=$(PackagesOutput)</PackCommand>
<PackCommand>$(PackCommand) /p:NoPackageAnalysis=true</PackCommand>
<PackCommand>$(PackCommand) /flp:v=detailed</PackCommand>
<PackCommand>$(PackCommand) /v:$(LogVerbosity)</PackCommand>
<PackCommand>$(PackCommand) /bl:pack.binlog</PackCommand>
<PackCommand>$(PackCommand) $(RedirectRepoOutputToLog)</PackCommand>
</PropertyGroup>
<Exec Command="$(PackCommand)"
EnvironmentVariables="@(EnvironmentVariables)"
WorkingDirectory="$(ProjectDirectory)"
IgnoreStandardErrorWarningFormat="true" />
</Target>
</Project> </Project>

View file

@ -2,30 +2,27 @@
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup> <PropertyGroup>
<BuildCommandArgs>--restore --build --pack</BuildCommandArgs> <!-- roslyn-analyzers does not want to build with the source build packages as this more closely mimics their repo build.
<BuildCommandArgs>$(BuildCommandArgs) --configuration $(Configuration)</BuildCommandArgs> To make this easier, the use of DotNetPackageVersionPropsPath is disabled and its versions.props explicitly imports
<BuildCommandArgs>$(BuildCommandArgs) -v $(LogVerbosity)</BuildCommandArgs> $(SourceBuildPackageVersionPropsPath) at the beginning. -->
<BuildCommandArgs>$(BuildCommandArgs) -bl</BuildCommandArgs> <BuildCommandArgs>$(StandardSourceBuildArgs.Replace('/p:DotNetPackageVersionPropsPath="$(PackageVersionPropsPath)"', ''))</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) -warnaserror false</BuildCommandArgs> <BuildCommandArgs>$(BuildCommandArgs) $(FlagParameterPrefix)warnAsError $(ArcadeFalseBoolBuildArg)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:TreatWarningsAsErrors=false</BuildCommandArgs> <BuildCommandArgs>$(BuildCommandArgs) /p:SourceBuildPackageVersionPropsPath="$(PackageVersionPropsPath)"</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<!-- Versioning args. -->
<BuildCommandArgs>$(BuildCommandArgs) /p:OfficialBuild=true</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:DotNetPackageVersionPropsPath=$(PackageVersionPropsPath)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:DotNetBuildFromSource=true</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:GitHubRepositoryName=roslyn-analyzers</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:RepositoryUrl=git://github.com/dotnet/roslyn-analyzers</BuildCommandArgs>
<BuildCommand>$(ProjectDirectory)build$(ShellExtension) $(BuildCommandArgs)</BuildCommand>
<RepoApiImplemented>false</RepoApiImplemented> <RepoApiImplemented>false</RepoApiImplemented>
<DependencyVersionInputRepoApiImplemented>true</DependencyVersionInputRepoApiImplemented> <DependencyVersionInputRepoApiImplemented>false</DependencyVersionInputRepoApiImplemented>
<LogVerbosityOptOut>true</LogVerbosityOptOut> <LogVerbosityOptOut>true</LogVerbosityOptOut>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile> <GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<RepositoryReference Include="runtime" /> <EnvironmentVariables Include="DotNetPackageVersionPropsPath=" />
</ItemGroup>
<ItemGroup>
<!-- TODO: Enable with https://github.com/dotnet/source-build/issues/2274
<RepositoryReference Include="runtime" /> -->
<RepositoryReference Include="roslyn" /> <RepositoryReference Include="roslyn" />
</ItemGroup> </ItemGroup>

View file

@ -38,12 +38,11 @@
<RepositoryReference Include="runtime" /> <RepositoryReference Include="runtime" />
<RepositoryReference Include="msbuild" /> <RepositoryReference Include="msbuild" />
<RepositoryReference Include="source-build" /> <RepositoryReference Include="source-build" />
<!-- TODO: https://github.com/dotnet/source-build/issues/2279 <RepositoryReference Include="nuget-client" />
<RepositoryReference Include="nuget-client" /> --> <RepositoryReference Include="roslyn-analyzers" />
<!-- TODO: https://github.com/dotnet/source-build/issues/2319
<RepositoryReference Include="roslyn-analyzers" /> -->
<RepositoryReference Include="vstest" /> <RepositoryReference Include="vstest" />
<RepositoryReference Include="fsharp" /> <RepositoryReference Include="fsharp" />
<RepositoryReference Include="deployment-tools" />
</ItemGroup> </ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

View file

@ -2,7 +2,10 @@
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup> <PropertyGroup>
<BuildCommand>$(StandardSourceBuildCommand) $(StandardSourceBuildArgs)</BuildCommand> <BuildCommandArgs>$(StandardSourceBuildArgs)</BuildCommandArgs>
<!-- Repo has netcoreapp2.1 projects: https://github.com/dotnet/xliff-tasks/issues/508 -->
<BuildCommandArgs>$(BuildCommandArgs) /p:CheckEolTargetFramework=false</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<RepoApiImplemented>false</RepoApiImplemented> <RepoApiImplemented>false</RepoApiImplemented>
<DependencyVersionInputRepoApiImplemented>true</DependencyVersionInputRepoApiImplemented> <DependencyVersionInputRepoApiImplemented>true</DependencyVersionInputRepoApiImplemented>

View file

@ -3,10 +3,10 @@ set -euo pipefail
SCRIPT_ROOT="$(cd -P "$( dirname "$0" )" && pwd)" SCRIPT_ROOT="$(cd -P "$( dirname "$0" )" && pwd)"
TARBALL_PREFIX=dotnet-sdk- TARBALL_PREFIX=dotnet-sdk-
VERSION_PREFIX=5.0 VERSION_PREFIX=6.0
# See https://github.com/dotnet/source-build/issues/579, this version # See https://github.com/dotnet/source-build/issues/579, this version
# needs to be compatible with the runtime produced from source-build # needs to be compatible with the runtime produced from source-build
DEV_CERTS_VERSION_DEFAULT=5.0.0-preview.3 DEV_CERTS_VERSION_DEFAULT=6.0.0-preview.6.21355.2
__ROOT_REPO=$(sed 's/\r$//' "$SCRIPT_ROOT/artifacts/obj/rootrepo.txt") # remove CR if mounted repo on Windows drive __ROOT_REPO=$(sed 's/\r$//' "$SCRIPT_ROOT/artifacts/obj/rootrepo.txt") # remove CR if mounted repo on Windows drive
executingUserHome=${HOME:-} executingUserHome=${HOME:-}
@ -32,6 +32,9 @@ case $cpuName in
i686) i686)
buildArch=x86 buildArch=x86
;; ;;
s390x)
buildArch=s390x
;;
*) *)
echo "Unknown CPU $cpuName detected, treating it as x64" echo "Unknown CPU $cpuName detected, treating it as x64"
buildArch=x64 buildArch=x64
@ -154,7 +157,7 @@ while :; do
shift shift
done done
prodConBlobFeedUrl="${prodConBlobFeedUrl-$(cat "$SCRIPT_ROOT/ProdConFeed.txt")}" prodConBlobFeedUrl="${prodConBlobFeedUrl-}"
function doCommand() { function doCommand() {
lang=$1 lang=$1
@ -164,8 +167,11 @@ function doCommand() {
echo "starting language $lang, type $proj" | tee -a smoke-test.log echo "starting language $lang, type $proj" | tee -a smoke-test.log
dotnetCmd=${dotnetDir}/dotnet dotnetCmd=${dotnetDir}/dotnet
mkdir "${lang}_${proj}"
cd "${lang}_${proj}" # rename '#'' to 'Sharp' to workaround https://github.com/dotnet/aspnetcore/issues/36900
projectDir="${lang//"#"/"Sharp"}_${proj}"
mkdir "${projectDir}"
cd "${projectDir}"
newArgs="new $proj -lang $lang" newArgs="new $proj -lang $lang"
@ -199,7 +205,7 @@ function doCommand() {
binlogHttpsPart="https" binlogHttpsPart="https"
fi fi
binlogPrefix="$testingDir/${lang}_${proj}_${binlogOnlinePart}_${binlogHttpsPart}_" binlogPrefix="$testingDir/${projectDir}_${binlogOnlinePart}_${binlogHttpsPart}_"
binlog="${binlogPrefix}$1.binlog" binlog="${binlogPrefix}$1.binlog"
echo " running $1" | tee -a "$logFile" echo " running $1" | tee -a "$logFile"
@ -269,7 +275,7 @@ function doCommand() {
cd .. cd ..
if [ "$keepProjects" == "false" ]; then if [ "$keepProjects" == "false" ]; then
rm -rf "${lang}_${proj}" rm -rf "${projectDir}"
fi fi
echo "finished language $lang, type $proj" | tee -a smoke-test.log echo "finished language $lang, type $proj" | tee -a smoke-test.log
@ -506,6 +512,129 @@ function runXmlDocTests() {
System.Xml.Serialization.xml System.Xml.Serialization.xml
System.Xml.xml System.Xml.xml
System.Xml.XmlDocument.xml System.Xml.XmlDocument.xml
Microsoft.CSharp.xml
# Added temporarily due to https://github.com/dotnet/source-build/issues/2404
Microsoft.VisualBasic.Core.xml
Microsoft.Win32.Primitives.xml
Microsoft.Win32.Registry.xml
System.Collections.Concurrent.xml
System.Collections.Immutable.xml
System.Collections.NonGeneric.xml
System.Collections.Specialized.xml
System.Collections.xml
System.ComponentModel.Annotations.xml
System.ComponentModel.EventBasedAsync.xml
System.ComponentModel.Primitives.xml
System.ComponentModel.TypeConverter.xml
System.ComponentModel.xml
System.Console.xml
System.Data.Common.xml
System.Diagnostics.Contracts.xml
System.Diagnostics.DiagnosticSource.xml
System.Diagnostics.FileVersionInfo.xml
System.Diagnostics.Process.xml
System.Diagnostics.StackTrace.xml
System.Diagnostics.TextWriterTraceListener.xml
System.Diagnostics.TraceSource.xml
System.Diagnostics.Tracing.xml
System.Drawing.Primitives.xml
System.Formats.Asn1.xml
System.IO.Compression.Brotli.xml
System.IO.Compression.ZipFile.xml
System.IO.Compression.xml
System.IO.FileSystem.AccessControl.xml
System.IO.FileSystem.DriveInfo.xml
System.IO.FileSystem.Watcher.xml
System.IO.FileSystem.xml
System.IO.IsolatedStorage.xml
System.IO.MemoryMappedFiles.xml
System.IO.Pipes.AccessControl.xml
System.IO.Pipes.xml
System.Linq.Expressions.xml
System.Linq.Parallel.xml
System.Linq.Queryable.xml
System.Linq.xml
System.Memory.xml
System.Net.Http.Json.xml
System.Net.Http.xml
System.Net.HttpListener.xml
System.Net.Mail.xml
System.Net.NameResolution.xml
System.Net.NetworkInformation.xml
System.Net.Ping.xml
System.Net.Primitives.xml
System.Net.Requests.xml
System.Net.Security.xml
System.Net.ServicePoint.xml
System.Net.Sockets.xml
System.Net.WebClient.xml
System.Net.WebHeaderCollection.xml
System.Net.WebProxy.xml
System.Net.WebSockets.Client.xml
System.Net.WebSockets.xml
System.Numerics.Vectors.xml
System.ObjectModel.xml
System.Reflection.DispatchProxy.xml
System.Reflection.Emit.ILGeneration.xml
System.Reflection.Emit.Lightweight.xml
System.Reflection.Emit.xml
System.Reflection.Metadata.xml
System.Reflection.Primitives.xml
System.Reflection.TypeExtensions.xml
System.Resources.Writer.xml
System.Runtime.CompilerServices.Unsafe.xml
System.Runtime.CompilerServices.VisualC.xml
System.Runtime.InteropServices.RuntimeInformation.xml
System.Runtime.InteropServices.xml
System.Runtime.Intrinsics.xml
System.Runtime.Loader.xml
System.Runtime.Numerics.xml
System.Runtime.Serialization.Formatters.xml
System.Runtime.Serialization.Json.xml
System.Runtime.Serialization.Primitives.xml
System.Runtime.Serialization.Xml.xml
System.Runtime.xml
System.Security.AccessControl.xml
System.Security.Claims.xml
System.Security.Cryptography.Algorithms.xml
System.Security.Cryptography.Cng.xml
System.Security.Cryptography.Csp.xml
System.Security.Cryptography.Encoding.xml
System.Security.Cryptography.OpenSsl.xml
System.Security.Cryptography.Primitives.xml
System.Security.Cryptography.X509Certificates.xml
System.Security.Principal.Windows.xml
System.Text.Encoding.CodePages.xml
System.Text.Encoding.Extensions.xml
System.Text.Encodings.Web.xml
System.Text.Json.xml
System.Text.Json.SourceGeneration.xml
System.Text.Json.SourceGeneration.resources.xml
System.Text.RegularExpressions.xml
System.Threading.Channels.xml
System.Threading.Overlapped.xml
System.Threading.Tasks.Dataflow.xml
System.Threading.Tasks.Parallel.xml
System.Threading.Thread.xml
System.Threading.ThreadPool.xml
System.Threading.xml
System.Transactions.Local.xml
System.Web.HttpUtility.xml
System.Xml.ReaderWriter.xml
System.Xml.XDocument.xml
System.Xml.XPath.XDocument.xml
System.Xml.XPath.xml
System.Xml.XmlSerializer.xml
WindowsBase.xml
mscorlib.xml
)
# Added temporarily due to https://github.com/dotnet/source-build/issues/2404
aspnetcoreappIgnoreList=(
Microsoft.AspNetCore.App.Analyzers.xml
Microsoft.AspNetCore.App.CodeFixes.xml
Microsoft.Extensions.Logging.Generators.resources.xml
Microsoft.Extensions.Logging.Generators.xml
) )
error=0 error=0
@ -530,6 +659,16 @@ function runXmlDocTests() {
fi fi
done done
fi fi
# Added temporarily due to https://github.com/dotnet/source-build/issues/2404
if [[ "$xmlDocFile" == *"/packs/Microsoft.AspNetCore.App.Ref"* ]]; then
xmlFileBasename=$(basename "$xmlDocFile")
for ignoreItem in "${aspnetcoreappIgnoreList[@]}"; do
if [[ "$ignoreItem" == "$xmlFileBasename" ]]; then
skip=1;
break
fi
done
fi
if [[ $skip == 0 ]] && [[ ! -f "$xmlDocFile" ]]; then if [[ $skip == 0 ]] && [[ ! -f "$xmlDocFile" ]]; then
error=1 error=1
echo "error: missing $xmlDocFile" echo "error: missing $xmlDocFile"

View file

@ -15,5 +15,6 @@
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.--> <!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
<add key="source-built-packages" value="SOURCE_BUILT_PACKAGES" /> <add key="source-built-packages" value="SOURCE_BUILT_PACKAGES" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public%40Local/nuget/v3/index.json" /> <add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public%40Local/nuget/v3/index.json" />
<add key="dotnet6" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet6/nuget/v3/index.json" />
</packageSources> </packageSources>
</configuration> </configuration>

View file

@ -24,7 +24,7 @@
BuildXPlatTasks; BuildXPlatTasks;
ExtractToolPackage; ExtractToolPackage;
GenerateRootFs; GenerateRootFs;
ApplyPatches; BuildTextOnlyPackages;
PoisonPrebuiltPackages" /> PoisonPrebuiltPackages" />
</Target> </Target>
@ -58,7 +58,7 @@
<Move SourceFiles="@(UnpackedSourceBuildReferencePackages)" DestinationFiles="$(ReferencePackagesDir)%(Filename)%(Extension)" /> <Move SourceFiles="@(UnpackedSourceBuildReferencePackages)" DestinationFiles="$(ReferencePackagesDir)%(Filename)%(Extension)" />
<!-- remove some reference packages that are generated incorrectly and instead use the prebuilt checked-in version instead --> <!-- remove some reference packages that are generated incorrectly and instead use the prebuilt checked-in version instead -->
<!-- relevant issues: https://github.com/dotnet/runtime/issues/44646, https://github.com/dotnet/runtime/issues/45183, <!-- relevant issues: https://github.com/dotnet/runtime/issues/44646, https://github.com/dotnet/runtime/issues/45183,
https://github.com/dotnet/runtime/issues/45417. this should be fixed for the 6.0 release. --> https://github.com/dotnet/runtime/issues/45417. this should be fixed for the 6.0 release. -->
<ItemGroup> <ItemGroup>
<PrebuiltPackagesToUse Include="$(PrebuiltPackagesPath)/*.nupkg" /> <PrebuiltPackagesToUse Include="$(PrebuiltPackagesPath)/*.nupkg" />
@ -78,7 +78,6 @@
<![CDATA[<?xml version="1.0" encoding="utf-8"?> <![CDATA[<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="PreviouslySourceBuiltPackageVersions.props" Condition="Exists('PreviouslySourceBuiltPackageVersions.props')" /> <Import Project="PreviouslySourceBuiltPackageVersions.props" Condition="Exists('PreviouslySourceBuiltPackageVersions.props')" />
<Import Project="$(ProjectDir)TemporaryBootstrapPackageVersions.props" Condition="Exists('$(ProjectDir)TemporaryBootstrapPackageVersions.props')" />
<Import Project="CurrentSourceBuiltPackageVersions.props" Condition="Exists('CurrentSourceBuiltPackageVersions.props')" /> <Import Project="CurrentSourceBuiltPackageVersions.props" Condition="Exists('CurrentSourceBuiltPackageVersions.props')" />
</Project> </Project>
]]> ]]>
@ -109,17 +108,6 @@
<WriteLinesToFile File="$(CompletedSemaphorePath)BuildXPlatTasks.complete" Overwrite="true" /> <WriteLinesToFile File="$(CompletedSemaphorePath)BuildXPlatTasks.complete" Overwrite="true" />
</Target> </Target>
<Target Name="GetRepoProjects">
<ItemGroup>
<RepoProjects Include="$(ProjectDir)repos/*.proj" />
</ItemGroup>
</Target>
<Target Name="ApplyPatches" DependsOnTargets="GetRepoProjects">
<Message Text="Applying patches only" />
<MSBuild Projects="@(RepoProjects)" Targets="ApplyPatches" BuildInParallel="$(BuildInParallel)" />
</Target>
<Target Name="GenerateRootFs" Condition="'$(OS)' != 'Windows_NT'"> <Target Name="GenerateRootFs" Condition="'$(OS)' != 'Windows_NT'">
<Exec Condition="$(Platform.Contains('arm')) AND '$(Platform)' != 'armel' AND '$(BuildArchitecture)' != 'arm64'" Command="$(ArmEnvironmentVariables) $(ProjectDir)cross/build-rootfs.sh" /> <Exec Condition="$(Platform.Contains('arm')) AND '$(Platform)' != 'armel' AND '$(BuildArchitecture)' != 'arm64'" Command="$(ArmEnvironmentVariables) $(ProjectDir)cross/build-rootfs.sh" />
<Exec Condition="'$(Platform)' == 'armel'" Command="$(ArmEnvironmentVariables) $(ProjectDir)cross/armel/tizen-build-rootfs.sh" /> <Exec Condition="'$(Platform)' == 'armel'" Command="$(ArmEnvironmentVariables) $(ProjectDir)cross/armel/tizen-build-rootfs.sh" />
@ -134,6 +122,13 @@
<TextOnlyPackageNuspecFile Include="$(TextOnlyPackageBaseDir)/**/*.nuspec" /> <TextOnlyPackageNuspecFile Include="$(TextOnlyPackageBaseDir)/**/*.nuspec" />
</ItemGroup> </ItemGroup>
<Message Importance="High" Text="Found text only package nuspec file: %(TextOnlyPackageNuspecFile.Identity)" />
<ReplaceTextInFile
InputFile="%(TextOnlyPackageNuspecFile.Identity)"
OldText="&lt;/package&gt;"
NewText="&lt;files&gt;&lt;file src=&quot;.\**\*&quot;/&gt;&lt;/files&gt;&lt;/package&gt;" />
<NugetPack <NugetPack
Nuspecs="%(TextOnlyPackageNuspecFile.Identity)" Nuspecs="%(TextOnlyPackageNuspecFile.Identity)"
OutputDirectory="$(SourceBuiltPackagesPath)" OutputDirectory="$(SourceBuiltPackagesPath)"
@ -161,7 +156,7 @@
OldText="%3CReadSourceBuildIntermediateNupkgDependencies" OldText="%3CReadSourceBuildIntermediateNupkgDependencies"
NewText="%3CReadSourceBuildIntermediateNupkgDependencies Condition=&quot;'%24%28DotNetBuildOffline%29' != 'true'&quot;" /> NewText="%3CReadSourceBuildIntermediateNupkgDependencies Condition=&quot;'%24%28DotNetBuildOffline%29' != 'true'&quot;" />
<!-- Allow overriding of Arcade targets for SourceBuild to enable quicker <!-- Allow overriding of Arcade targets for SourceBuild to enable quicker
dev turnaround for Preview 6 --> dev turnaround for Preview 6 -->
<ItemGroup> <ItemGroup>
<OverrideArcadeFiles Include="$(ProjectDir)ArcadeOverrides/**/*" /> <OverrideArcadeFiles Include="$(ProjectDir)ArcadeOverrides/**/*" />

View file

@ -0,0 +1,41 @@
From 3610fdc1ac6437973d539177c1427ed7f4f65c2e Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Fri, 27 Aug 2021 13:34:55 +0000
Subject: [PATCH] Build Microsoft.DotNet.Build.Tasks.Workloads for net6.0
---
.../src/Microsoft.DotNet.Build.Tasks.Workloads.csproj | 1 +
.../src/VisualStudioComponent.cs | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Microsoft.DotNet.Build.Tasks.Workloads.csproj b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Microsoft.DotNet.Build.Tasks.Workloads.csproj
index ae34705a..bda5d581 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Microsoft.DotNet.Build.Tasks.Workloads.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Microsoft.DotNet.Build.Tasks.Workloads.csproj
@@ -2,6 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>Latest</LangVersion>
<IsPackable>true</IsPackable>
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/VisualStudioComponent.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/VisualStudioComponent.cs
index ee7e9d6d..b69b6823 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/VisualStudioComponent.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/VisualStudioComponent.cs
@@ -247,7 +247,11 @@ public TaskItem Generate(string projectPath)
// processing direct pack dependencies
if (workload.Extends?.Count() > 0)
{
+#if NET6_0
+ foreach (WorkloadId dependency in workload.Extends)
+#else
foreach (WorkloadDefinitionId dependency in workload.Extends)
+#endif
{
// Component dependencies, aka. workload extensions only have minimum version dependencies.
component.AddDependency($"{Utils.ToSafeId(dependency.ToString())}", new Version("1.0.0.0"), maxVersion: null);
--
2.29.2

View file

@ -0,0 +1,26 @@
From 676bb5aa455dcf877c78792e4e5a62ca6a1d72c1 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Wed, 8 Sep 2021 16:43:11 +0000
Subject: [PATCH] Patch sdk.props to target net6.0
Workaround for https://github.com/dotnet/arcade/issues/7413
---
src/Microsoft.DotNet.SharedFramework.Sdk/sdk/Sdk.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Microsoft.DotNet.SharedFramework.Sdk/sdk/Sdk.props b/src/Microsoft.DotNet.SharedFramework.Sdk/sdk/Sdk.props
index e3c50582..a577f923 100644
--- a/src/Microsoft.DotNet.SharedFramework.Sdk/sdk/Sdk.props
+++ b/src/Microsoft.DotNet.SharedFramework.Sdk/sdk/Sdk.props
@@ -8,7 +8,7 @@
-->
<PropertyGroup Condition="'$(DotNetSharedFrameworkTaskDir)' == ''">
- <DotNetSharedFrameworkTaskDir Condition="'$(MSBuildRuntimeType)' == 'core'">$(MSBuildThisFileDirectory)../tools/netcoreapp3.1/</DotNetSharedFrameworkTaskDir>
+ <DotNetSharedFrameworkTaskDir Condition="'$(MSBuildRuntimeType)' == 'core'">$(MSBuildThisFileDirectory)../tools/net6.0/</DotNetSharedFrameworkTaskDir>
<DotNetSharedFrameworkTaskDir Condition="'$(MSBuildRuntimeType)' != 'core'">$(MSBuildThisFileDirectory)../tools/net472/</DotNetSharedFrameworkTaskDir>
</PropertyGroup>
--
2.29.2

View file

@ -0,0 +1,25 @@
From 4577f60202649281d2c96c4d8b67d331b7e71c35 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Fri, 10 Sep 2021 13:52:54 +0000
Subject: [PATCH] Respond to WorkloadDefinition breaking API change
See https://github.com/dotnet/arcade/issues/7880 for details
---
.../src/GenerateWorkloadMsis.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateWorkloadMsis.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateWorkloadMsis.cs
index 50340821..a65453f2 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateWorkloadMsis.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateWorkloadMsis.cs
@@ -121,6 +121,7 @@ private IEnumerable<WorkloadPack> GetWorkloadPacks()
// platform includes Windows
var workloads = manifests.SelectMany(m => m.Workloads).
Select(w => w.Value).
+ OfType<WorkloadDefinition>().
Where(wd => (wd.Platforms == null) || wd.Platforms.Any(p => p.StartsWith("win")));
var packIds = workloads.Where(w => w.Packs != null).SelectMany(w => w.Packs).Distinct();
--
2.29.2

View file

@ -0,0 +1,32 @@
From 1d34d8396b9c2968163802036ed102e18ef14605 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Fri, 10 Sep 2021 13:57:38 +0000
Subject: [PATCH] Bootstrapping workaround
Temporary workaround until source-build is built with recent source-built.
/repos/tarball1/src/arcade.474307e526160c813c9fd58060eb8356ccca6099/artifacts/source-build/self/src/src/Microsoft.DotNet.CodeAnalysis/Microsoft.DotNet.CodeAnalysis.csproj : error NU1603: Microsoft.CodeAnalysis.Common 4.0.0-5.21453.15 depends on System.Runtime.CompilerServices.Unsafe (>= 6.0.0-rc.1.21415.6) but System.Runtime.CompilerServices.Unsafe 6.0.0-rc.1.21415.6 was not found. An approximate best match of System.Runtime.CompilerServices.Unsafe 6.0.0-rc.2.21457.6 was resolved. [/repos/tarball1/src/arcade.474307e526160c813c9fd58060eb8356ccca6099/artifacts/source-build/self/src/Arcade.sln]
/repos/tarball1/src/arcade.474307e526160c813c9fd58060eb8356ccca6099/artifacts/source-build/self/src/src/Microsoft.DotNet.PackageTesting/Microsoft.DotNet.PackageTesting.csproj : error NU1603: Microsoft.CodeAnalysis.Common 4.0.0-5.21453.15 depends on System.Runtime.CompilerServices.Unsafe (>= 6.0.0-rc.1.21415.6) but System.Runtime.CompilerServices.Unsafe 6.0.0-rc.1.21415.6 was not found. An approximate best match of System.Runtime.CompilerServices.Unsafe 6.0.0-rc.2.21457.6 was resolved. [/repos/tarball1/src/arcade.474307e526160c813c9fd58060eb8356ccca6099/artifacts/source-build/self/src/Arcade.sln]
/repos/tarball1/src/arcade.474307e526160c813c9fd58060eb8356ccca6099/artifacts/source-build/self/src/src/Microsoft.DotNet.GenFacades/Microsoft.DotNet.GenFacades.csproj : error NU1603: Microsoft.CodeAnalysis.Common 4.0.0-5.21453.15 depends on System.Runtime.CompilerServices.Unsafe (>= 6.0.0-rc.1.21415.6) but System.Runtime.CompilerServices.Unsafe 6.0.0-rc.1.21415.6 was not found. An approximate best match of System.Runtime.CompilerServices.Unsafe 6.0.0-rc.2.21457.6 was resolved. [/repos/tarball1/src/arcade.474307e526160c813c9fd58060eb8356ccca6099/artifacts/source-build/self/src/Arcade.sln]
---
Directory.Build.props | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Directory.Build.props b/Directory.Build.props
index 960eb6c9..fa87aaac 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -18,6 +18,10 @@
<IsShipping>false</IsShipping>
</PropertyGroup>
+ <PropertyGroup>
+ <NoWarn>$(NoWarn);NU1603</NoWarn>
+ </PropertyGroup>
+
<PropertyGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
<!--
When building using source-build the process is:
--
2.29.2

View file

@ -0,0 +1,31 @@
From 335f32e48fd5604cdb1340ec04d6503a3e43d783 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Tue, 17 Aug 2021 21:09:35 +0000
Subject: [PATCH] Don't use PublicApiAnalyzer on source-build
CSC : warning AD0001: Analyzer 'Microsoft.CodeAnalysis.PublicApiAnalyzers.DeclarePublicApiAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
CSC : error CS2001: Source file '/repos/installer2/artifacts/tarball/src/nuget-client.7363366401b43f4ea250394db8dad3707e9a9636/src/NuGet.Core/NuGet.Common/PublicAPI/net6.0/PublicAPI.Shipped.txt' could not be found.
---
build/common.targets | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/build/common.targets b/build/common.targets
index 2c387f576..cf5a70c62 100644
--- a/build/common.targets
+++ b/build/common.targets
@@ -65,6 +65,11 @@
<None Include="$(MSBuildThisFileDirectory)..\icon.png" Pack="true" PackagePath="\" Visible="false" />
</ItemGroup>
+ <!-- Don't use PublicApiAnalyzer on source-build .NET -->
+ <PropertyGroup Condition=" '$(IsBuildOnlyXPLATProjects)' == 'true' ">
+ <UsePublicApiAnalyzer>false</UsePublicApiAnalyzer>
+ </PropertyGroup>
+
<!-- Projects we pack become public APIs that others can use -->
<PropertyGroup Condition=" '$(IsBuildOnlyXPLATProjects)' != 'true' and '$(PackProject)' == 'true' ">
<UsePublicApiAnalyzer Condition=" '$(UsePublicApiAnalyzer)' == '' " >true</UsePublicApiAnalyzer>
--
2.29.2

View file

@ -0,0 +1,53 @@
From e0e1d72dfa8881244a76c3dbcc63aa73c05546f4 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Tue, 17 Aug 2021 21:13:07 +0000
Subject: [PATCH] Update netcoreapp TFMs to 6.0
---
build/common.project.props | 10 +++++-----
build/common.targets | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/build/common.project.props b/build/common.project.props
index 80433ed60..8acc4e0bb 100644
--- a/build/common.project.props
+++ b/build/common.project.props
@@ -13,17 +13,17 @@
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<NETFXTargetFrameworkVersion>v4.7.2</NETFXTargetFrameworkVersion>
<NETFXTargetFramework>net472</NETFXTargetFramework>
- <NETCoreTargetFramework>netcoreapp2.1</NETCoreTargetFramework>
+ <NETCoreTargetFramework>net6.0</NETCoreTargetFramework>
<NETCoreTestTargetFramework>netcoreapp5.0</NETCoreTestTargetFramework>
<IsBuildOnlyXPLATProjects>$(DotNetBuildFromSource)</IsBuildOnlyXPLATProjects>
- <NetStandardVersion>netstandard2.0</NetStandardVersion>
+ <NetStandardVersion>net6.0</NetStandardVersion>
<TargetFrameworksExe>$(NETFXTargetFramework);$(NETCoreTargetFramework)</TargetFrameworksExe>
<TargetFrameworksExe Condition="'$(IsBuildOnlyXPLATProjects)' == 'true' OR '$(IsXPlat)' == 'true'">$(NETCoreTargetFramework)</TargetFrameworksExe>
- <TargetFrameworksExeForSigning>$(TargetFrameworksExe);netcoreapp5.0</TargetFrameworksExeForSigning>
- <TargetFrameworksExeForSigning Condition=" '$(IsXPlat)' == 'true' ">$(NETCoreTargetFramework);netcoreapp5.0</TargetFrameworksExeForSigning>
+ <TargetFrameworksExeForSigning>$(TargetFrameworksExe);net6.0</TargetFrameworksExeForSigning>
+ <TargetFrameworksExeForSigning Condition=" '$(IsXPlat)' == 'true' ">$(NETCoreTargetFramework);net6.0</TargetFrameworksExeForSigning>
<TargetFrameworksLibrary>$(NETFXTargetFramework);$(NetStandardVersion)</TargetFrameworksLibrary>
<TargetFrameworksLibrary Condition="'$(IsBuildOnlyXPLATProjects)' == 'true'">$(NetStandardVersion)</TargetFrameworksLibrary>
- <TargetFrameworksLibraryForSigning>$(TargetFrameworksLibrary);netcoreapp5.0</TargetFrameworksLibraryForSigning>
+ <TargetFrameworksLibraryForSigning>$(TargetFrameworksLibrary);net6.0</TargetFrameworksLibraryForSigning>
<TargetFrameworksLibraryForCrossVerificationTests>$(NETFXTargetFramework);netcoreapp5.0</TargetFrameworksLibraryForCrossVerificationTests>
<RepositoryRootDirectory>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'README.md'))\</RepositoryRootDirectory>
<BuildCommonDirectory>$(RepositoryRootDirectory)build\</BuildCommonDirectory>
diff --git a/build/common.targets b/build/common.targets
index cf5a70c62..8827686a7 100644
--- a/build/common.targets
+++ b/build/common.targets
@@ -6,7 +6,7 @@
<IsDesktop>true</IsDesktop>
</PropertyGroup>
- <PropertyGroup Condition=" $(TargetFramework.StartsWith('netcoreapp')) OR $(TargetFramework.StartsWith('netstandard')) ">
+ <PropertyGroup Condition=" $(TargetFramework.StartsWith('netcoreapp')) OR $(TargetFramework.StartsWith('netstandard')) OR '$(TargetFramework)' == 'net6.0' ">
<DefineConstants>$(DefineConstants);IS_CORECLR</DefineConstants>
<IsCore>true</IsCore>
</PropertyGroup>
--
2.29.2

View file

@ -0,0 +1,43 @@
From fecc40e502197e65804177b2aec49a7a5422ed6e Mon Sep 17 00:00:00 2001
From: Davis Goodin <dagood@microsoft.com>
Date: Thu, 10 Dec 2020 16:17:55 -0600
Subject: [PATCH 3/5] Use source-built Microsoft.Web.Xdt &
System.ComponentModel.Composition
---
build/packages.targets | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/build/packages.targets b/build/packages.targets
index 6f72ac3fd..8317f3903 100644
--- a/build/packages.targets
+++ b/build/packages.targets
@@ -15,6 +15,12 @@
<XunitVersion>2.4.1</XunitVersion>
</PropertyGroup>
+ <!-- source-build-relevant package versions -->
+ <PropertyGroup>
+ <MicrosoftWebXdtPackageVersion Condition="'$(MicrosoftWebXdtPackageVersion)' == ''">3.0.0</MicrosoftWebXdtPackageVersion>
+ <SystemComponentModelCompositionPackageVersion Condition="'$(SystemComponentModelCompositionPackageVersion)' == ''">4.5.0</SystemComponentModelCompositionPackageVersion>
+ </PropertyGroup>
+
<ItemGroup>
<!-- PackageDownload -->
<PackageDownload Update="Microsoft.Build" Version="[15.1.262-preview5]" />
@@ -42,10 +48,10 @@
<PackageReference Update="Microsoft.VisualStudio.VCProjectEngine" Version="$(VSFrameworkVersion)" />
<PackageReference Update="Microsoft.VisualStudio.Workspace.VSIntegration" Version="17.0.7-preview-0001-g5492e466a9" />
<PackageReference Update="Microsoft.VSSDK.BuildTools" Version="17.0.1600" />
- <PackageReference Update="Microsoft.Web.Xdt" Version="3.0.0" />
+ <PackageReference Update="Microsoft.Web.Xdt" Version="$(MicrosoftWebXdtPackageVersion)" />
<PackageReference Update="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
<PackageReference Update="SharpZipLib" Version="1.3.2" />
- <PackageReference Update="System.ComponentModel.Composition" Version="4.5.0" />
+ <PackageReference Update="System.ComponentModel.Composition" Version="$(SystemComponentModelCompositionPackageVersion)" />
<!--
The Microsoft.VisualStudio.SDK metapackage brings in System.Threading.Tasks.Dataflow 4.11.1 (assembly version 4.9.5.0).
However, our MSBuild integration tests use Microsoft.Build 16.8.0, which requires System.Threading.Tasks.Dataflow 4.9.0 (assembly version 4.9.3.0).
--
2.18.0

View file

@ -0,0 +1,88 @@
From 9e35a4d319f3288a50bdaf5b32661764761aa0e9 Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Thu, 19 Aug 2021 10:59:36 -0500
Subject: [PATCH 4/5] Build script changes to support ArPow from tarball.
---
eng/source-build/build.sh | 27 +++++++++++++++++++++++++--
eng/source-build/source-build.proj | 6 ++++--
2 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/eng/source-build/build.sh b/eng/source-build/build.sh
index 3bb69b2b0..aaff8ef0f 100755
--- a/eng/source-build/build.sh
+++ b/eng/source-build/build.sh
@@ -13,6 +13,25 @@ while [[ -h $source ]]; do
[[ $source != /* ]] && source="$scriptroot/$source"
done
+
+while [[ $# > 0 ]]; do
+ lowerI="$(echo $1 | awk '{print tolower($0)}')"
+ case $lowerI in
+ --configuration|-c)
+ configuration=$2
+ shift
+ ;;
+ -*)
+ # just eat this so we don't try to pass it along to MSBuild
+ export DOTNET_CORESDK_NOPRETTYPRINT=1
+ ;;
+ *)
+ args="$args $1"
+ ;;
+ esac
+ shift
+done
+
function ReadGlobalVersion {
local key=$1
local global_json_file="$scriptroot/global.json"
@@ -40,8 +59,12 @@ function GetNuGetPackageCachePath {
fi
}
-export DOTNET=${DOTNET:-dotnet}
+if [[ "$DOTNET" == "" && "$DOTNET_PATH" != "" ]]; then
+ export DOTNET="$DOTNET_PATH/dotnet"
+else
+ export DOTNET=${DOTNET:-dotnet}
+fi
ReadGlobalVersion Microsoft.DotNet.Arcade.Sdk
export ARCADE_VERSION=$_ReadGlobalVersion
-"$DOTNET" msbuild "$scriptroot/source-build.proj" /p:DotNetBuildFromSource=true /p:ArcadeBuildFromSource=true "/p:RepoRoot=$scriptroot/../../" "/bl:$scriptroot/../../artifacts/source-build/self/log/source-build.binlog"
+"$DOTNET" msbuild "$scriptroot/source-build.proj" /p:Configuration=$configuration /p:DotNetBuildFromSource=true /p:ArcadeBuildFromSource=true "/p:RepoRoot=$scriptroot/../../" "/bl:$scriptroot/../../artifacts/source-build/self/log/source-build.binlog" $args
diff --git a/eng/source-build/source-build.proj b/eng/source-build/source-build.proj
index 6f90f9793..91ea2d032 100644
--- a/eng/source-build/source-build.proj
+++ b/eng/source-build/source-build.proj
@@ -4,6 +4,8 @@
<PropertyGroup>
<ProjectRoot>$(MSBuildThisFileDirectory)../../</ProjectRoot>
+ <ArcadeDir Condition="'$(SOURCE_BUILT_SDK_DIR_ARCADE)' != ''">$(SOURCE_BUILT_SDK_DIR_ARCADE)/tools/</ArcadeDir>
+ <ArcadeDir Condition="'$(ArcadeDir)' == ''">$(NuGetPackageRoot)/microsoft.dotnet.arcade.sdk/$(ARCADE_VERSION)/tools/</ArcadeDir>
</PropertyGroup>
<Target Name="Build" DependsOnTargets="SourceBuildPostBuild">
@@ -18,14 +20,14 @@
<Target Name="SourceBuildPostBuild" DependsOnTargets="SourceBuildInnerBuild">
<Message Text="Running source-build PostBuild target" Importance="High" />
- <MSbuild Projects="$(NuGetPackageRoot)/microsoft.dotnet.arcade.sdk/$(ARCADE_VERSION)/tools/Build.proj"
+ <MSbuild Projects="$(ArcadeDir)/Build.proj"
Properties="_NETCORE_ENGINEERING_TELEMETRY=AfterSourceBuild;ArcadeBuildFromSource=true;Restore=true;Build=false;Pack=false;Publish=false;Rebuild=false;Test=false;IntegrationTest=false;PerformanceTest=false;PreventPrebuiltBuild=false;BaseInnerSourceBuildCommand=echo skipping internal build with args: "
Targets="Execute"
/>
<Message Text="Finished restoring Arcade" Importance="High" />
- <MSbuild Projects="$(NuGetPackageRoot)/microsoft.dotnet.arcade.sdk/$(ARCADE_VERSION)/tools/SourceBuild/AfterSourceBuild.proj"
+ <MSbuild Projects="$(ArcadeDir)/SourceBuild/AfterSourceBuild.proj"
Properties="_NETCORE_ENGINEERING_TELEMETRY=AfterSourceBuild;ArcadeBuildFromSource=true;CurrentRepoSourceBuildArtifactsPackagesDir=$(ProjectRoot)artifacts/nupkgs/"
/>
--
2.18.0

View file

@ -0,0 +1,124 @@
From d3c633ad00408b2b6122b70d9a152d1ab79c8378 Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Thu, 19 Aug 2021 11:01:04 -0500
Subject: [PATCH 2/2] Upgrade to .NET 6 SDK.
---
.../NuGet.Commands/SignCommand/CertificateProvider.cs | 4 ++--
.../NuGet.Packaging/Signing/Authoring/SignPackageRequest.cs | 2 ++
src/NuGet.Core/NuGet.Packaging/Signing/Cms/NativeUtility.cs | 2 ++
.../HttpSource/HttpRequestMessageExtensions.cs | 6 +++---
.../NuGet.Protocol/HttpSource/HttpRetryHandler.cs | 2 +-
.../HttpSource/HttpSourceAuthenticationHandler.cs | 2 +-
6 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/NuGet.Core/NuGet.Commands/SignCommand/CertificateProvider.cs b/src/NuGet.Core/NuGet.Commands/SignCommand/CertificateProvider.cs
index c6ea71243..beac41889 100644
--- a/src/NuGet.Core/NuGet.Commands/SignCommand/CertificateProvider.cs
+++ b/src/NuGet.Core/NuGet.Commands/SignCommand/CertificateProvider.cs
@@ -115,7 +115,7 @@ public static async Task<X509Certificate2Collection> GetCertificatesAsync(Certif
return resultCollection;
}
-
+#pragma warning disable CS1998
private static async Task<X509Certificate2> LoadCertificateFromFileAsync(CertificateSourceOptions options)
{
X509Certificate2 cert;
@@ -154,7 +154,7 @@ private static async Task<X509Certificate2> LoadCertificateFromFileAsync(Certifi
return cert;
}
-
+#pragma warning restore CS1998
private static X509Certificate2Collection LoadCertificateFromStore(CertificateSourceOptions options)
{
X509Certificate2Collection resultCollection = null;
diff --git a/src/NuGet.Core/NuGet.Packaging/Signing/Authoring/SignPackageRequest.cs b/src/NuGet.Core/NuGet.Packaging/Signing/Authoring/SignPackageRequest.cs
index e0cfae99f..ce19f2d6e 100644
--- a/src/NuGet.Core/NuGet.Packaging/Signing/Authoring/SignPackageRequest.cs
+++ b/src/NuGet.Core/NuGet.Packaging/Signing/Authoring/SignPackageRequest.cs
@@ -98,7 +98,9 @@ protected virtual void Dispose(bool disposing)
Chain?.Dispose();
#if IS_SIGNING_SUPPORTED
+#pragma warning disable CA1416
PrivateKey?.Dispose();
+#pragma warning restore CA1416
#endif
}
diff --git a/src/NuGet.Core/NuGet.Packaging/Signing/Cms/NativeUtility.cs b/src/NuGet.Core/NuGet.Packaging/Signing/Cms/NativeUtility.cs
index 565ac60b7..d57e38a65 100644
--- a/src/NuGet.Core/NuGet.Packaging/Signing/Cms/NativeUtility.cs
+++ b/src/NuGet.Core/NuGet.Packaging/Signing/Cms/NativeUtility.cs
@@ -120,7 +120,9 @@ internal static SignedCms NativeSign(CmsSigner cmsSigner, byte[] data, CngKey pr
signerInfo.cbSize = (uint)Marshal.SizeOf(signerInfo);
signerInfo.pCertInfo = MarshalUtility.PtrToStructure<CERT_CONTEXT>(cmsSigner.Certificate.Handle).pCertInfo;
+#pragma warning disable CA1416
signerInfo.hCryptProvOrhNCryptKey = privateKey.Handle.DangerousGetHandle();
+#pragma warning restore CA1416
signerInfo.HashAlgorithm.pszObjId = cmsSigner.DigestAlgorithm.Value;
if (cmsSigner.SignerIdentifierType == SubjectIdentifierType.SubjectKeyIdentifier)
diff --git a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs
index 7c9595268..1ca751850 100644
--- a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs
+++ b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRequestMessageExtensions.cs
@@ -34,7 +34,7 @@ internal static HttpRequestMessage Clone(this HttpRequestMessage request)
clone.Headers.TryAddWithoutValidation(header.Key, header.Value);
}
-#if NET5_0
+#if NET5_0 || NET6_0
var clonedOptions = (IDictionary<string, object>)clone.Options;
foreach (var option in request.Options)
{
@@ -118,7 +118,7 @@ public static void SetConfiguration(this HttpRequestMessage request, HttpRequest
throw new ArgumentNullException(nameof(configuration));
}
-#if NET5_0
+#if NET5_0 || NET6_0
request.Options.Set(new HttpRequestOptionsKey<HttpRequestMessageConfiguration>(NuGetConfigurationKey), configuration);
#else
request.Properties[NuGetConfigurationKey] = configuration;
@@ -128,7 +128,7 @@ public static void SetConfiguration(this HttpRequestMessage request, HttpRequest
private static T GetProperty<T>(this HttpRequestMessage request, string key)
{
-#if NET5_0
+#if NET5_0 || NET6_0
if (request.Options.TryGetValue<T>(new HttpRequestOptionsKey<T>(key), out T result))
#else
object result;
diff --git a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs
index 67a1726b6..0534e936e 100644
--- a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs
+++ b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandler.cs
@@ -81,7 +81,7 @@ public class HttpRetryHandler : IHttpRetryHandler
headerStopwatch = new Stopwatch();
stopwatches.Add(headerStopwatch);
}
-#if NET5_0
+#if NET5_0 || NET6_0
requestMessage.Options.Set(new HttpRequestOptionsKey<List<Stopwatch>>(StopwatchPropertyName), stopwatches);
#else
requestMessage.Properties[StopwatchPropertyName] = stopwatches;
diff --git a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs
index b9ab58ce7..ebf738e52 100644
--- a/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs
+++ b/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSourceAuthenticationHandler.cs
@@ -98,7 +98,7 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
{
List<Stopwatch> stopwatches = null;
-#if NET5_0
+#if NET5_0 || NET6_0
if (request.Options.TryGetValue(
new HttpRequestOptionsKey<List<Stopwatch>>(HttpRetryHandler.StopwatchPropertyName),
out stopwatches))
--
2.18.0

View file

@ -0,0 +1,25 @@
From 612f18bace3320572dc69b3ee56c0d942c29331f Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Fri, 20 Aug 2021 15:30:52 -0500
Subject: [PATCH] Build NuGet.Frameworks for netstandard as well for VSTest.
---
src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj b/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj
index 65f261dc1..ed81ecf24 100644
--- a/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj
+++ b/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj
@@ -4,7 +4,7 @@
<PropertyGroup>
<Description>NuGet's understanding of target frameworks.</Description>
- <TargetFrameworks>$(TargetFrameworksLibrary)</TargetFrameworks>
+ <TargetFrameworks>$(TargetFrameworksLibrary);netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="'$(IsBuildOnlyXPLATProjects)' != 'true'">$(TargetFrameworks);net40</TargetFrameworks>
<TargetFramework />
<NoWarn>$(NoWarn);CS1591;CS1574;CS1573</NoWarn>
--
2.18.0

View file

@ -0,0 +1,35 @@
From d0596ee04233142bbaa9b3587f2c8b3a0bd82f8f Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Fri, 27 Aug 2021 01:52:56 +0000
Subject: [PATCH] NuGet.Build.Tasks.Pack source-build support
---
.../NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj b/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj
index f11dd752b..c7425dbe8 100644
--- a/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj
+++ b/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj
@@ -180,13 +180,16 @@
<PackagePathDir Condition="'$(TargetFramework)' == '$(NetStandardVersion)'">CoreCLR/</PackagePathDir>
</PropertyGroup>
<ItemGroup>
- <TfmSpecificPackageFile Include="$(OutputPath)\$(ILMergeSubpath)NuGet.Build.Tasks.Pack.dll">
+ <TfmSpecificPackageFile Include="$(OutputPath)\$(ILMergeSubpath)NuGet.Build.Tasks.Pack.dll" Condition="'$(IsBuildOnlyXPLATProjects)' != 'true'">
<PackagePath>$(PackagePathDir)</PackagePath>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Include="$(OutputPath)\$(ILMergeSubpath)**\NuGet*.resources.dll">
<PackagePath>$(PackagePathDir)</PackagePath>
</TfmSpecificPackageFile>
- </ItemGroup>
+ <TfmSpecificPackageFile Include="$(OutputPath)\$(ILMergeSubpath)NuGet*.dll" Condition="'$(IsBuildOnlyXPLATProjects)' == 'true'">
+ <PackagePath>$(PackagePathDir)</PackagePath>
+ </TfmSpecificPackageFile>
+ </ItemGroup>
</Target>
<Import Project="$(BuildCommonDirectory)common.targets"/>
--
2.29.2

View file

@ -0,0 +1,25 @@
From fa733a5a26776c793477b4404bc670e5a8e94260 Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Fri, 24 Sep 2021 17:58:20 +0000
Subject: [PATCH 1/2] Upgrade Newtonsoft.Json to 13.0.1
---
eng/Versions.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index c418a1205..cb27118fb 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -67,7 +67,7 @@
<MicrosoftNETCoreAppRefVersion>6.0.0-preview.4.21253.7</MicrosoftNETCoreAppRefVersion>
<MicrosoftVisualBasicVersion>10.1.0</MicrosoftVisualBasicVersion>
<MicrosoftVisualStudioCompositionVersion>16.1.8</MicrosoftVisualStudioCompositionVersion>
- <NewtonsoftJsonVersion>12.0.1</NewtonsoftJsonVersion>
+ <NewtonsoftJsonVersion>13.0.1</NewtonsoftJsonVersion>
<PerfolizerVersion>0.2.1</PerfolizerVersion>
<SQLitePCLRawVersion>1.1.2</SQLitePCLRawVersion>
<SystemCommandLineRenderingVersion>2.0.0-beta1.20074.1</SystemCommandLineRenderingVersion>
--
2.31.1

View file

@ -0,0 +1,42 @@
From 0b40797eab5933ae0d9dd48e4b8b0ec03d712ca5 Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Fri, 24 Sep 2021 17:58:56 +0000
Subject: [PATCH 2/2] Exclude perfdiff and test project when building from
source
---
src/Tools/PerfDiff/PerfDiff.csproj | 1 +
.../Tests/RulesetToEditorconfigConverter.UnitTests.csproj | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/Tools/PerfDiff/PerfDiff.csproj b/src/Tools/PerfDiff/PerfDiff.csproj
index 7a829e12e..44279f1f9 100644
--- a/src/Tools/PerfDiff/PerfDiff.csproj
+++ b/src/Tools/PerfDiff/PerfDiff.csproj
@@ -4,6 +4,7 @@
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<NonShipping>true</NonShipping>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
</PropertyGroup>
<ItemGroup>
diff --git a/src/Tools/RulesetToEditorconfigConverter/Tests/RulesetToEditorconfigConverter.UnitTests.csproj b/src/Tools/RulesetToEditorconfigConverter/Tests/RulesetToEditorconfigConverter.UnitTests.csproj
index 027ca2b09..46fff2f30 100644
--- a/src/Tools/RulesetToEditorconfigConverter/Tests/RulesetToEditorconfigConverter.UnitTests.csproj
+++ b/src/Tools/RulesetToEditorconfigConverter/Tests/RulesetToEditorconfigConverter.UnitTests.csproj
@@ -4,8 +4,9 @@
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<ServerGarbageCollection>true</ServerGarbageCollection>
<IsShipping>false</IsShipping>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Test.Utilities\Test.Utilities.csproj" />
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
--
2.31.1

View file

@ -0,0 +1,26 @@
From 046e225f600b1bdb37d6e05985db77ff894802fe Mon Sep 17 00:00:00 2001
From: MichaelSimons <msimons@microsoft.com>
Date: Tue, 14 Sep 2021 17:01:16 +0000
Subject: [PATCH] Pin System.Reflection.Metadata version for crossgen
Resolution to the root cause of https://github.com/dotnet/runtime/issues/58800
---
.../ILCompiler.TypeSystem.ReadyToRun.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/coreclr/tools/aot/ILCompiler.TypeSystem.ReadyToRun/ILCompiler.TypeSystem.ReadyToRun.csproj b/src/coreclr/tools/aot/ILCompiler.TypeSystem.ReadyToRun/ILCompiler.TypeSystem.ReadyToRun.csproj
index 82452cfa3e9..23cbbd5ad9f 100644
--- a/src/coreclr/tools/aot/ILCompiler.TypeSystem.ReadyToRun/ILCompiler.TypeSystem.ReadyToRun.csproj
+++ b/src/coreclr/tools/aot/ILCompiler.TypeSystem.ReadyToRun/ILCompiler.TypeSystem.ReadyToRun.csproj
@@ -30,7 +30,7 @@
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Reflection.Metadata">
- <Version>$(SystemReflectionMetadataVersion)</Version>
+ <Version>5.0.0</Version>
</PackageReference>
<PackageReference Condition = "'$(EnableDiaSymReaderUse)' == 'true'" Include="Microsoft.DiaSymReader">
<Version>1.3.0</Version>
--
2.29.2

View file

@ -0,0 +1,68 @@
From 242806d708f4fff996e17185b570bd7d5d934a74 Mon Sep 17 00:00:00 2001
From: MichaelSimons <msimons@microsoft.com>
Date: Tue, 28 Sep 2021 15:45:44 +0000
Subject: [PATCH] Rename DeploymentReleasesVersion Versions.props entry to
align with Arcade naming convention
Backported to SDK with https://github.com/dotnet/sdk/pull/21502
---
eng/Versions.props | 2 +-
src/Cli/dotnet/dotnet.csproj | 2 +-
.../Microsoft.DotNet.MSBuildSdkResolver.csproj | 2 +-
.../Microsoft.DotNet.NativeWrapper.csproj | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index 0a7442c7c4..741b654ec4 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -36,7 +36,7 @@
<WebDeploymentPackageVersion>4.0.5</WebDeploymentPackageVersion>
<SystemTextJsonVersion>5.0.2</SystemTextJsonVersion>
<SystemReflectionMetadataLoadContextVersion>7.0.0-alpha.1.21480.1</SystemReflectionMetadataLoadContextVersion>
- <DeploymentReleasesVersion>1.0.0-preview1.1.21112.1</DeploymentReleasesVersion>
+ <MicrosoftDeploymentDotNetReleasesVersion>1.0.0-preview1.1.21112.1</MicrosoftDeploymentDotNetReleasesVersion>
<SystemManagementPackageVersion>4.6.0</SystemManagementPackageVersion>
<SystemCommandLineVersion>2.0.0-beta1.21473.1</SystemCommandLineVersion>
</PropertyGroup>
diff --git a/src/Cli/dotnet/dotnet.csproj b/src/Cli/dotnet/dotnet.csproj
index b27862fb9d..539e127a63 100644
--- a/src/Cli/dotnet/dotnet.csproj
+++ b/src/Cli/dotnet/dotnet.csproj
@@ -93,7 +93,7 @@
<PackageReference Include="Microsoft.TemplateEngine.Utils" Version="$(MicrosoftTemplateEngineUtilsPackageVersion)" />
<PackageReference Include="Microsoft.TemplateSearch.Common" Version="$(MicrosoftTemplateSearchCommonPackageVersion)" />
<PackageReference Include="System.CommandLine" Version="$(SystemCommandLineVersion)" />
- <PackageReference Include="Microsoft.Deployment.DotNet.Releases" Version="$(DeploymentReleasesVersion)" />
+ <PackageReference Include="Microsoft.Deployment.DotNet.Releases" Version="$(MicrosoftDeploymentDotNetReleasesVersion)" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
</ItemGroup>
<ItemGroup Condition=" '$(IncludeAspNetCoreRuntime)' != 'false' ">
diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj
index de9c3d5cd2..cf53c33fe5 100644
--- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj
+++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj
@@ -56,7 +56,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.NETCore.DotNetHostResolver" Version="$(MicrosoftNETCoreDotNetHostResolverPackageVersion)" PrivateAssets="All" />
- <PackageReference Include="Microsoft.Deployment.DotNet.Releases" Version="$(DeploymentReleasesVersion)" />
+ <PackageReference Include="Microsoft.Deployment.DotNet.Releases" Version="$(MicrosoftDeploymentDotNetReleasesVersion)" />
</ItemGroup>
<!-- To reduce dll load (cause RPS perf regression). Directly compile files from Microsoft.DotNet.NativeWrapper, Microsoft.DotNet.SdkResolver, and the workload resolver -->
diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Microsoft.DotNet.NativeWrapper.csproj b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Microsoft.DotNet.NativeWrapper.csproj
index a97b55bb23..cb2affc131 100644
--- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Microsoft.DotNet.NativeWrapper.csproj
+++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Microsoft.DotNet.NativeWrapper.csproj
@@ -10,6 +10,6 @@
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.Deployment.DotNet.Releases" Version="$(DeploymentReleasesVersion)" />
+ <PackageReference Include="Microsoft.Deployment.DotNet.Releases" Version="$(MicrosoftDeploymentDotNetReleasesVersion)" />
</ItemGroup>
</Project>
--
2.29.2

View file

@ -0,0 +1,30 @@
From c0ec49b887cae58bb860a18982115c5910f29821 Mon Sep 17 00:00:00 2001
From: MichaelSimons <msimons@microsoft.com>
Date: Tue, 14 Sep 2021 22:54:01 +0000
Subject: [PATCH] pin nuget versions
Temporary fix for https://github.com/dotnet/source-build/issues/2455 to unblock source-build
---
Directory.Build.targets | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 0dc99916..7c45fda3 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -12,9 +12,9 @@
<PackageReference Update="Microsoft.Extensions.Logging.Console" Version="$(MicrosoftExtensionsLoggingConsolePackageVersion)" />
<PackageReference Update="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsLoggingAbstractionsPackageVersion)" />
<PackageReference Update="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
- <PackageReference Update="NuGet.Configuration" Version="$(NuGetConfigurationPackageVersion)" />
- <PackageReference Update="NuGet.Credentials" Version="$(NuGetCredentialsPackageVersion)" />
- <PackageReference Update="NuGet.Protocol" Version="$(NuGetProtocolPackageVersion)" />
+ <PackageReference Update="NuGet.Configuration" Version="6.0.0-preview.3.179" />
+ <PackageReference Update="NuGet.Credentials" Version="6.0.0-preview.3.179" />
+ <PackageReference Update="NuGet.Protocol" Version="6.0.0-preview.3.179" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(BuildingInsideVisualStudio)' != 'true'">
--
2.29.2

View file

@ -0,0 +1,26 @@
From 752ab8ab199bd1d99353658cb676a6612508333b Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Wed, 8 Sep 2021 21:31:01 +0000
Subject: [PATCH] Drop vstest.console netcoreapp2.1 support
Workaround for https://github.com/microsoft/vstest/issues/3044
---
src/vstest.console/vstest.console.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vstest.console/vstest.console.csproj b/src/vstest.console/vstest.console.csproj
index 1343e6d9..7c555591 100644
--- a/src/vstest.console/vstest.console.csproj
+++ b/src/vstest.console/vstest.console.csproj
@@ -8,7 +8,7 @@
<PropertyGroup>
<AssemblyName>vstest.console</AssemblyName>
<TargetFrameworks>netcoreapp2.1;net451</TargetFrameworks>
- <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">netcoreapp2.1;net6.0</TargetFrameworks>
+ <TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
<WarningsAsErrors>true</WarningsAsErrors>
<OutputType>Exe</OutputType>
<IsTestProject>false</IsTestProject>
--
2.29.2

View file

@ -31,6 +31,7 @@ target_link_libraries(Finalizer shell32.lib)
target_link_libraries(Finalizer advapi32.lib) target_link_libraries(Finalizer advapi32.lib)
target_link_libraries(Finalizer version.lib) target_link_libraries(Finalizer version.lib)
target_link_libraries(Finalizer msi.lib) target_link_libraries(Finalizer msi.lib)
target_link_libraries(Finalizer pathcch.lib)
# Add WiX libraries # Add WiX libraries
target_link_libraries(Finalizer wcautil.lib) target_link_libraries(Finalizer wcautil.lib)

22
src/finalizer/README.md Normal file
View file

@ -0,0 +1,22 @@
# Manually Testing Finalizer Changes
The finalizer can be partially tested in isolation by creating the necessary registry keys
an installation would create. These can be easily configured on a VM or using Windows Sandbox. Otherwise, a full build of the installer is required along with the modified finalizer that results in a longer inner loop.
The finalizer will use the default hive, e.g., when compiled for x64, the finalizer will default to using the 64-bit registry hive.
### SDK Installation key
The installation key resides under the 32-bit hive, regardless of the OS architecture.
`REG ADD HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\sdk /v 6.0.107 /t REG_DWORD /d 1 /reg:32`
### Workload Pack Records
Records related to workload packs are created by the pack installers. Testing changes to the removal process requires the packs to be installed since the finalizer relies on using specific data such as the workload pack installer's product code to remove the installation.
### Workload Records
A workload record entry can be created using the following command. The key resides in either hive depending on the SDK installation. Records are associated with an SDK feature band, e.g., 6.0.100.
`REG ADD HKLM\SOFTWARE\Microsoft\dotnet\InstalledWorkloads\Standalone\x64\6.0.100\wasm-tools`

View file

@ -38,6 +38,110 @@ LExit:
return hr; return hr;
} }
extern "C" HRESULT DeleteWorkloadRecords(LPWSTR sczSdkFeatureBandVersion, LPWSTR sczArchitecture)
{
HRESULT hr = S_OK;
LPWSTR sczKeyName = NULL;
LPWSTR pszName = NULL;
LPWSTR sczSubKey = NULL;
HKEY hkWorkloadRecordsKey = NULL;
HKEY hkCurrentKey = NULL;
DWORD dwIndex = 0;
DWORD dwType = 0;
DWORD_PTR cbKeyName = 0;
DWORD cbSubKeys = 0;
DWORD cbValues = 0;
BOOL bDeleteKey = FALSE;
hr = StrAllocConcatFormatted(&sczKeyName, L"SOFTWARE\\Microsoft\\dotnet\\InstalledWorkloads\\Standalone\\%ls", sczArchitecture);
ExitOnFailure(hr, "Failed to allocate string for workload records registry path.");
hr = RegOpen(HKEY_LOCAL_MACHINE, sczKeyName, KEY_READ | KEY_WRITE, &hkWorkloadRecordsKey);
if (S_OK == hr)
{
// Delete the SDK feature band's workload records.
hr = RegDelete(hkWorkloadRecordsKey, sczSdkFeatureBandVersion, REG_KEY_DEFAULT, TRUE);
ExitOnFailure(hr, "Failed to delete workload records key under '%ls' for '%ls'.", sczKeyName, sczSdkFeatureBandVersion);
LogStringLine(REPORT_STANDARD, "Deleted workload records for '%ls'.", sczSdkFeatureBandVersion);
}
else if (E_FILENOTFOUND == hr)
{
// Ignore missing registry keys.
hr = S_OK;
}
ExitOnFailure(hr, "Failed to open workload records key: %ls.", sczKeyName);
// Clean out empty registry keys by walking backwards. Eventually we'll hit HKLM\SOFTWARE\Microsoft and stop.
for (;;)
{
bDeleteKey = TRUE;
LogStringLine(REPORT_STANDARD, "Processing '%ls'.", sczKeyName);
hr = RegOpen(HKEY_LOCAL_MACHINE, sczKeyName, KEY_READ | KEY_WRITE, &hkCurrentKey);
if (E_FILENOTFOUND != hr && S_OK != hr)
{
ExitOnFailure(hr, "Failed to open registry key: %ls", sczKeyName);
}
if (S_OK == hr)
{
hr = RegQueryKey(hkCurrentKey, &cbSubKeys, &cbValues);
ExitOnFailure(hr, "Failed to query key info.");
if (0 < cbSubKeys || 0 < cbValues)
{
// If the current key has any subkeys or values then we're done.
LogStringLine(REPORT_STANDARD, "Non-empty key found. '%ls' contains %d value(s) and %d subkey(s).", sczKeyName, cbValues, cbSubKeys);
break;
}
LogStringLine(REPORT_STANDARD, "'%ls' is empty and can be deleted.", sczKeyName);
ReleaseRegKey(hkCurrentKey);
}
else
{
// We want to continue traversing up the registry, but we can't delete a non-existing key.
LogStringLine(REPORT_STANDARD, "'%ls' does not exist, continuing.", sczKeyName);
bDeleteKey = FALSE;
}
// Move up one level and delete the current key. For example, if we looked at SOFTWARE\Microsoft\dotnet\InstalledWorkloads\Standalone\x64, we'll
// delete the x64 subkey.
hr = StrSize(sczKeyName, &cbKeyName);
ExitOnFailure(hr, "Failed to get size of key name.");
// Need to remove trailing backslash otherwise PathFile returns an empty string.
hr = PathCchRemoveBackslash(sczKeyName, cbKeyName);
ExitOnFailure(hr, "Failed to remove backslash.");
hr = StrAllocString(&sczSubKey, PathFile(sczKeyName), 0);
ExitOnFailure(hr, "Failed to allocate string for subkey.");
hr = PathGetParentPath(sczKeyName, &sczKeyName);
ExitOnFailure(hr, "Failed to get parent path of registry key.");
if (bDeleteKey)
{
hr = RegOpen(HKEY_LOCAL_MACHINE, sczKeyName, KEY_READ | KEY_WRITE, &hkCurrentKey);
ExitOnFailure(hr, "Failed to open registry key: %ls.", sczKeyName);
hr = RegDelete(hkCurrentKey, sczSubKey, REG_KEY_DEFAULT, FALSE);
ExitOnFailure(hr, "Failed to delete registry key '%ls' under '%ls'", sczSubKey, sczKeyName);
ReleaseRegKey(hkCurrentKey);
}
}
LExit:
ReleaseStr(sczKeyName);
ReleaseStr(pszName);
ReleaseStr(sczSubKey);
ReleaseRegKey(hkCurrentKey);
ReleaseRegKey(hkWorkloadRecordsKey);
return hr;
}
extern "C" HRESULT RemoveDependent(LPWSTR sczDependent, BOOL * pbRestartRequired) extern "C" HRESULT RemoveDependent(LPWSTR sczDependent, BOOL * pbRestartRequired)
{ {
HRESULT hr = S_OK; HRESULT hr = S_OK;
@ -54,6 +158,12 @@ extern "C" HRESULT RemoveDependent(LPWSTR sczDependent, BOOL * pbRestartRequired
// Optional workloads are always per-machine installs, so we don't need to check HKCU. // Optional workloads are always per-machine installs, so we don't need to check HKCU.
hr = RegOpen(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Classes\\Installer\\Dependencies", KEY_READ, &hkInstallerDependenciesKey); hr = RegOpen(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Classes\\Installer\\Dependencies", KEY_READ, &hkInstallerDependenciesKey);
if (E_FILENOTFOUND == hr)
{
LogStringLine(REPORT_STANDARD, "Installer dependencies key does not exit.");
hr = S_OK;
goto LExit;
}
ExitOnFailure(hr, "Failed to read installer dependencies key."); ExitOnFailure(hr, "Failed to read installer dependencies key.");
// This has to be an exhaustive search as we're not looking for a specific provider key, but for a specific dependent // This has to be an exhaustive search as we're not looking for a specific provider key, but for a specific dependent
@ -317,16 +427,18 @@ int wmain(int argc, wchar_t* argv[])
hr = ::DetectSdk(sczFeatureBandVersion, argv[3], &bSdkFeatureBandInstalled); hr = ::DetectSdk(sczFeatureBandVersion, argv[3], &bSdkFeatureBandInstalled);
ExitOnFailure(hr, "Failed to detect installed SDKs."); ExitOnFailure(hr, "Failed to detect installed SDKs.");
if (bSdkFeatureBandInstalled) if (!bSdkFeatureBandInstalled)
{ {
LogStringLine(REPORT_STANDARD, "SDK with feature band %ls could not be found.", sczFeatureBandVersion);
goto LExit; goto LExit;
} }
LogStringLine(REPORT_STANDARD, "SDK with feature band %ls could not be found.", sczFeatureBandVersion);
hr = ::RemoveDependent(sczDependent, &bRestartRequired); hr = ::RemoveDependent(sczDependent, &bRestartRequired);
ExitOnFailure(hr, "Failed to remove dependent \"%ls\".", sczDependent); ExitOnFailure(hr, "Failed to remove dependent \"%ls\".", sczDependent);
hr = ::DeleteWorkloadRecords(sczFeatureBandVersion, argv[3]);
ExitOnFailure(hr, "Failed to remove workload records.");
if (bRestartRequired) if (bRestartRequired)
{ {
dwExitCode = ERROR_SUCCESS_REBOOT_REQUIRED; dwExitCode = ERROR_SUCCESS_REBOOT_REQUIRED;

View file

@ -11,6 +11,7 @@
#include <cwchar> #include <cwchar>
#include <winreg.h> #include <winreg.h>
#include <msi.h> #include <msi.h>
#include <pathcch.h>
// Configure some logging parameters for WiX // Configure some logging parameters for WiX
#define ExitTrace LogErrorString #define ExitTrace LogErrorString
@ -22,5 +23,6 @@
#include "dutil.h" #include "dutil.h"
#include "regutil.h" #include "regutil.h"
#include "logutil.h" #include "logutil.h"
#include "pathutil.h"
#include "strutil.h" #include "strutil.h"
#include "wiutil.h" #include "wiutil.h"

View file

@ -12,7 +12,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="WiX" Version="$(WixPackageVersion)" GeneratePathProperty="true" /> <PackageReference Include="Microsoft.Signed.Wix" Version="$(WixPackageVersion)" GeneratePathProperty="true" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View file

@ -1,5 +1,4 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<BundledManifests Include="Microsoft.NET.Sdk.Android.Manifest-6.0.100" SdkFeatureBand="6.0.100" Version="$(XamarinAndroidWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.Android" /> <BundledManifests Include="Microsoft.NET.Sdk.Android.Manifest-6.0.100" SdkFeatureBand="6.0.100" Version="$(XamarinAndroidWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.Android" />
<BundledManifests Include="Microsoft.NET.Sdk.iOS.Manifest-6.0.100" SdkFeatureBand="6.0.100" Version="$(XamarinIOSWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.iOS" /> <BundledManifests Include="Microsoft.NET.Sdk.iOS.Manifest-6.0.100" SdkFeatureBand="6.0.100" Version="$(XamarinIOSWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.iOS" />

View file

@ -1,6 +1,7 @@
<Project> <Project>
<!-- Crossgen is currently not supported on the s390x architecture. -->
<Target Name="CrossgenLayout" <Target Name="CrossgenLayout"
Condition="'$(DISABLE_CROSSGEN)' == ''" Condition="'$(DISABLE_CROSSGEN)' == '' AND '$(Architecture)' != 's390x'"
DependsOnTargets="SetSdkBrandingInfo"> DependsOnTargets="SetSdkBrandingInfo">
<PropertyGroup> <PropertyGroup>

View file

@ -26,8 +26,8 @@
<PropertyGroup> <PropertyGroup>
<VersionFeature21>30</VersionFeature21> <VersionFeature21>30</VersionFeature21>
<VersionFeature31>19</VersionFeature31> <VersionFeature31>20</VersionFeature31>
<VersionFeature50>10</VersionFeature50> <VersionFeature50>11</VersionFeature50>
</PropertyGroup> </PropertyGroup>
<Target Name="GenerateBundledVersionsProps" DependsOnTargets="SetupBundledComponents"> <Target Name="GenerateBundledVersionsProps" DependsOnTargets="SetupBundledComponents">
@ -113,7 +113,7 @@
<Net60AppHostRids Include=" <Net60AppHostRids Include="
@(Net50AppHostRids); @(Net50AppHostRids);
osx-arm64; osx-arm64;
freebsd-x64; linux-s390x;
"/> "/>
<Net60RuntimePackRids Include=" <Net60RuntimePackRids Include="
@ -121,7 +121,7 @@
osx-arm64; osx-arm64;
maccatalyst-x64; maccatalyst-x64;
maccatalyst-arm64; maccatalyst-arm64;
freebsd-x64; linux-s390x;
" /> " />
<!-- In .NET 6 the browser-wasm runtime pack started using the Mono naming pattern --> <!-- In .NET 6 the browser-wasm runtime pack started using the Mono naming pattern -->
@ -195,7 +195,7 @@
<AspNetCore31RuntimePackRids Include="@(AspNetCore30RuntimePackRids)" /> <AspNetCore31RuntimePackRids Include="@(AspNetCore30RuntimePackRids)" />
<AspNetCore50RuntimePackRids Include="@(AspNetCore31RuntimePackRids);linux-musl-arm;win-arm64" /> <AspNetCore50RuntimePackRids Include="@(AspNetCore31RuntimePackRids);linux-musl-arm;win-arm64" />
<AspNetCoreRuntimePackRids Include="@(AspNetCore50RuntimePackRids);osx-arm64" /> <AspNetCoreRuntimePackRids Include="@(AspNetCore50RuntimePackRids);osx-arm64;linux-s390x" />
<WindowsDesktop30RuntimePackRids Include="win-x64;win-x86" /> <WindowsDesktop30RuntimePackRids Include="win-x64;win-x86" />
<WindowsDesktop31RuntimePackRids Include="@(WindowsDesktop30RuntimePackRids)" /> <WindowsDesktop31RuntimePackRids Include="@(WindowsDesktop30RuntimePackRids)" />

View file

@ -86,6 +86,7 @@
<CLISdkFiles Include="$(CLISdkRoot)**/*" /> <CLISdkFiles Include="$(CLISdkRoot)**/*" />
<TemplatesFiles Include="$(TemplatesRoot)**/*" /> <TemplatesFiles Include="$(TemplatesRoot)**/*" />
<SdkDebManPageFiles Include="$(ManpagesDirectory)/**/*" /> <SdkDebManPageFiles Include="$(ManpagesDirectory)/**/*" />
<ManifestFiles Include="$(RedistLayoutPath)sdk-manifests/**/*" />
</ItemGroup> </ItemGroup>
<!-- Output Directories --> <!-- Output Directories -->
@ -230,7 +231,7 @@
Condition=" '$(IsDebianBaseDistro)' == 'True' AND '$(DebuildPresent)' == 'true' " Condition=" '$(IsDebianBaseDistro)' == 'True' AND '$(DebuildPresent)' == 'true' "
DependsOnTargets="PrepareDotnetDebDirectories; DependsOnTargets="PrepareDotnetDebDirectories;
GetAspNetSharedFxInstallArgs;" GetAspNetSharedFxInstallArgs;"
Inputs="@(CLISdkFiles);@(TemplatesFiles)" Inputs="@(CLISdkFiles);@(TemplatesFiles);@(ManifestFiles)"
Outputs="$(SdkDebInstallerFile)" > Outputs="$(SdkDebInstallerFile)" >
<!-- Install Shared Framework Packages --> <!-- Install Shared Framework Packages -->
<Exec Command="sudo dpkg -i $(DownloadedNetCoreAppHostPackInstallerFile)" /> <Exec Command="sudo dpkg -i $(DownloadedNetCoreAppHostPackInstallerFile)" />
@ -259,6 +260,14 @@
SkipUnchangedFiles="False" SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" /> UseHardlinksIfPossible="False" />
<!-- Create layout: Workload Manifests -->
<Copy
DestinationFiles="@(ManifestFiles->'$(LayoutPackageRootDir)/sdk-manifests/%(RecursiveDir)%(Filename)%(Extension)')"
SourceFiles="@(ManifestFiles)"
OverwriteReadOnlyFiles="True"
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />
<!-- Create layout: Man Pages --> <!-- Create layout: Man Pages -->
<Copy <Copy
DestinationFiles="@(SdkDebManPageFiles->'$(LayoutDocsDir)/%(RecursiveDir)%(Filename)-$(Version)%(Extension)')" DestinationFiles="@(SdkDebManPageFiles->'$(LayoutDocsDir)/%(RecursiveDir)%(Filename)-$(Version)%(Extension)')"

View file

@ -466,6 +466,13 @@
Overwrite="true" /> Overwrite="true" />
</Target> </Target>
<Target Name="LayoutWorkloadUserLocalMarker"
Condition="'$(DotNetBuildFromSource)' == 'true'">
<WriteLinesToFile File="$(RedistLayoutPath)metadata/workloads/$(CliProductBandVersion)00/userlocal"
Overwrite="true" />
</Target>
<Target Name="LayoutAppHostTemplate" DependsOnTargets="RunResolvePackageDependencies"> <Target Name="LayoutAppHostTemplate" DependsOnTargets="RunResolvePackageDependencies">
<PropertyGroup> <PropertyGroup>
@ -535,6 +542,7 @@
LayoutRuntimeGraph; LayoutRuntimeGraph;
LayoutTemplates; LayoutTemplates;
LayoutManifests; LayoutManifests;
LayoutWorkloadUserLocalMarker;
LayoutBundledTools; LayoutBundledTools;
RetargetTools; RetargetTools;
CrossgenLayout; CrossgenLayout;

View file

@ -2,7 +2,8 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<MicrosoftDotNetBuildTasksInstallersTaskTargetFramework Condition="'$(MSBuildRuntimeType)' == 'Core'">netcoreapp3.1</MicrosoftDotNetBuildTasksInstallersTaskTargetFramework> <MicrosoftDotNetBuildTasksInstallersTaskTargetFramework Condition="'$(MSBuildRuntimeType)' == 'Core'">netcoreapp3.1</MicrosoftDotNetBuildTasksInstallersTaskTargetFramework>
<MicrosoftDotNetBuildTasksInstallersTaskTargetFramework Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</MicrosoftDotNetBuildTasksInstallersTaskTargetFramework> <MicrosoftDotNetBuildTasksInstallersTaskTargetFramework Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildOffline)' != 'true' ">net6.0</MicrosoftDotNetBuildTasksInstallersTaskTargetFramework>
<MicrosoftDotNetBuildTasksInstallersTaskTargetFramework Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildOffline)' == 'true' ">net6.0</MicrosoftDotNetBuildTasksInstallersTaskTargetFramework>
<MicrosoftDotNetBuildTasksInstallersTaskTargetFramework Condition="'$(MSBuildRuntimeType)' != 'Core'">net472</MicrosoftDotNetBuildTasksInstallersTaskTargetFramework> <MicrosoftDotNetBuildTasksInstallersTaskTargetFramework Condition="'$(MSBuildRuntimeType)' != 'Core'">net472</MicrosoftDotNetBuildTasksInstallersTaskTargetFramework>
<MicrosoftDotNetBuildTasksInstallersTaskAssembly>$(NuGetPackageRoot)microsoft.dotnet.build.tasks.installers\$(MicrosoftDotNetBuildTasksInstallersPackageVersion)\tools\$(MicrosoftDotNetBuildTasksInstallersTaskTargetFramework)\Microsoft.DotNet.Build.Tasks.Installers.dll</MicrosoftDotNetBuildTasksInstallersTaskAssembly> <MicrosoftDotNetBuildTasksInstallersTaskAssembly>$(NuGetPackageRoot)microsoft.dotnet.build.tasks.installers\$(MicrosoftDotNetBuildTasksInstallersPackageVersion)\tools\$(MicrosoftDotNetBuildTasksInstallersTaskTargetFramework)\Microsoft.DotNet.Build.Tasks.Installers.dll</MicrosoftDotNetBuildTasksInstallersTaskAssembly>
</PropertyGroup> </PropertyGroup>
@ -12,8 +13,8 @@
<Target Name="SetupWixProperties" DependsOnTargets="GetCurrentRuntimeInformation"> <Target Name="SetupWixProperties" DependsOnTargets="GetCurrentRuntimeInformation">
<!-- AcquireWix Properties --> <!-- AcquireWix Properties -->
<PropertyGroup> <PropertyGroup>
<WixVersion>3.14.0.4118</WixVersion> <WixVersion>1.0.0-v3.14.0.4118</WixVersion>
<WixDownloadUrl>https://dotnetcli.azureedge.net/build/wix/wix.$(WixVersion).zip</WixDownloadUrl> <WixDownloadUrl>https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/wix/Microsoft.Signed.Wix-$(WixVersion).zip</WixDownloadUrl>
<WixRoot>$(ArtifactsDir)Tools/WixTools/$(WixVersion)</WixRoot> <WixRoot>$(ArtifactsDir)Tools/WixTools/$(WixVersion)</WixRoot>
<WixDestinationPath>$(WixRoot)/WixTools.$(WixVersion).zip</WixDestinationPath> <WixDestinationPath>$(WixRoot)/WixTools.$(WixVersion).zip</WixDestinationPath>
<WixDownloadSentinel>$(WixRoot)/WixDownload.$(WixVersion).sentinel</WixDownloadSentinel> <WixDownloadSentinel>$(WixRoot)/WixDownload.$(WixVersion).sentinel</WixDownloadSentinel>
@ -179,6 +180,7 @@
<SdkMsiWixSrcFiles Include="$(WixRoot)\dotnet.wixobj" /> <SdkMsiWixSrcFiles Include="$(WixRoot)\dotnet.wixobj" />
<SdkMsiWixSrcFiles Include="$(WixRoot)\provider.wixobj" /> <SdkMsiWixSrcFiles Include="$(WixRoot)\provider.wixobj" />
<SdkMsiWixSrcFiles Include="$(WixRoot)\registrykeys.wixobj" /> <SdkMsiWixSrcFiles Include="$(WixRoot)\registrykeys.wixobj" />
<SdkMsiWixSrcFiles Include="$(WixRoot)\dotnethome_x64.wixobj" />
<SdkMsiWixSrcFiles Include="$(WixRoot)\install-files.wixobj" /> <SdkMsiWixSrcFiles Include="$(WixRoot)\install-files.wixobj" />
</ItemGroup> </ItemGroup>
<CreateLightCommandPackageDrop <CreateLightCommandPackageDrop
@ -249,6 +251,7 @@
<ItemGroup> <ItemGroup>
<TemplatesMsiWixSrcFiles Include="$(WixRoot)\provider.wixobj" /> <TemplatesMsiWixSrcFiles Include="$(WixRoot)\provider.wixobj" />
<TemplatesMsiWixSrcFiles Include="$(WixRoot)\templates.wixobj" /> <TemplatesMsiWixSrcFiles Include="$(WixRoot)\templates.wixobj" />
<TemplatesMsiWixSrcFiles Include="$(WixRoot)\dotnethome_x64.wixobj" />
<TemplatesMsiWixSrcFiles Include="$(WixRoot)\template-install-files.wixobj" /> <TemplatesMsiWixSrcFiles Include="$(WixRoot)\template-install-files.wixobj" />
</ItemGroup> </ItemGroup>
@ -305,6 +308,7 @@
<ItemGroup> <ItemGroup>
<ManifestsMsiWixSrcFiles Include="$(WixRoot)\provider.wixobj" /> <ManifestsMsiWixSrcFiles Include="$(WixRoot)\provider.wixobj" />
<ManifestsMsiWixSrcFiles Include="$(WixRoot)\Manifests.wixobj" /> <ManifestsMsiWixSrcFiles Include="$(WixRoot)\Manifests.wixobj" />
<ManifestsMsiWixSrcFiles Include="$(WixRoot)\dotnethome_x64.wixobj" />
<ManifestsMsiWixSrcFiles Include="$(WixRoot)\Manifest-install-files.wixobj" /> <ManifestsMsiWixSrcFiles Include="$(WixRoot)\Manifest-install-files.wixobj" />
</ItemGroup> </ItemGroup>

View file

@ -14,6 +14,7 @@
<SdkProductArchiveId>com.microsoft.dotnet.dev.$(Version).osx.$(Architecture)</SdkProductArchiveId> <SdkProductArchiveId>com.microsoft.dotnet.dev.$(Version).osx.$(Architecture)</SdkProductArchiveId>
<PkgInstallDirectory>/usr/local/share/dotnet</PkgInstallDirectory> <PkgInstallDirectory>/usr/local/share/dotnet</PkgInstallDirectory>
<x64EmulationPkgInstallDirectory>/usr/local/share/dotnet/x64</x64EmulationPkgInstallDirectory>
<SdkPkgSourcesRootDirectory>$(MSBuildThisFileDirectory)packaging/osx/clisdk</SdkPkgSourcesRootDirectory> <SdkPkgSourcesRootDirectory>$(MSBuildThisFileDirectory)packaging/osx/clisdk</SdkPkgSourcesRootDirectory>
<SdkPkgScriptsDirectory>$(SdkPkgSourcesRootDirectory)/scripts</SdkPkgScriptsDirectory> <SdkPkgScriptsDirectory>$(SdkPkgSourcesRootDirectory)/scripts</SdkPkgScriptsDirectory>
@ -22,7 +23,8 @@
<SdkPkgScriptFile>$(SdkPkgDestinationScriptsDirectory)/postinstall</SdkPkgScriptFile> <SdkPkgScriptFile>$(SdkPkgDestinationScriptsDirectory)/postinstall</SdkPkgScriptFile>
<SdkProductArchiveResourcesDirectory>$(PkgIntermediateDirectory)/resources</SdkProductArchiveResourcesDirectory> <SdkProductArchiveResourcesDirectory>$(PkgIntermediateDirectory)/resources</SdkProductArchiveResourcesDirectory>
<SdkProductArchiveDistributionTemplateFile>$(SdkPkgSourcesRootDirectory)/Distribution-Template</SdkProductArchiveDistributionTemplateFile> <SdkProductArchiveDistributionTemplateFile Condition="'$(Architecture)' != 'x64'">$(SdkPkgSourcesRootDirectory)/Distribution-Template</SdkProductArchiveDistributionTemplateFile>
<SdkProductArchiveDistributionTemplateFile Condition="'$(Architecture)' == 'x64'">$(SdkPkgSourcesRootDirectory)/Distribution-Template-x64</SdkProductArchiveDistributionTemplateFile>
<SdkProductArchiveDistributionFile>$(PkgIntermediateDirectory)/CLI-SDK-Formatted-Distribution-Template.xml</SdkProductArchiveDistributionFile> <SdkProductArchiveDistributionFile>$(PkgIntermediateDirectory)/CLI-SDK-Formatted-Distribution-Template.xml</SdkProductArchiveDistributionFile>
<SdkPkgIntermediatePath>$(PkgIntermediateDirectory)/$(SdkComponentId).pkg</SdkPkgIntermediatePath> <SdkPkgIntermediatePath>$(PkgIntermediateDirectory)/$(SdkComponentId).pkg</SdkPkgIntermediatePath>
@ -96,6 +98,9 @@
<ReplacementString>10.13</ReplacementString> <ReplacementString>10.13</ReplacementString>
<ReplacementString Condition="'$(Architecture)' == 'arm64'" >11.0</ReplacementString> <ReplacementString Condition="'$(Architecture)' == 'arm64'" >11.0</ReplacementString>
</DistributionTemplateReplacement> </DistributionTemplateReplacement>
<DistributionTemplateReplacement Include="{x64EmulationPkgInstallDirectory}">
<ReplacementString>$(x64EmulationPkgInstallDirectory)</ReplacementString>
</DistributionTemplateReplacement>
<PostInstallScriptReplacement Include="%SDK_VERSION%"> <PostInstallScriptReplacement Include="%SDK_VERSION%">
<ReplacementString>$(Version)</ReplacementString> <ReplacementString>$(Version)</ReplacementString>

View file

@ -34,12 +34,14 @@
<MakeDir Directories="$(RpmLayoutSDK)"/> <MakeDir Directories="$(RpmLayoutSDK)"/>
<MakeDir Directories="$(RpmLayoutDocs)"/> <MakeDir Directories="$(RpmLayoutDocs)"/>
<MakeDir Directories="$(RpmLayoutTemplates)"/> <MakeDir Directories="$(RpmLayoutTemplates)"/>
<MakeDir Directories="$(RpmLayoutManifestFiles)"/>
<MakeDir Directories="$(RpmLayoutScripts)"/> <MakeDir Directories="$(RpmLayoutScripts)"/>
<!-- Copy files to rpm layout --> <!-- Copy files to rpm layout -->
<ItemGroup> <ItemGroup>
<SDKFiles Include="$(InputRoot)/**/*"/> <SDKFiles Include="$(InputRoot)/**/*"/>
<DotnetNewTemplatesFiles Include="$(DotnetNewTemplatesRoot)**/*" /> <DotnetNewTemplatesFiles Include="$(DotnetNewTemplatesRoot)**/*" />
<SDKManifestFiles Include="$(RedistLayoutPath)sdk-manifests/**/*" />
<SDKManpages Include="$(ManPagesDir)/**/*"/> <SDKManpages Include="$(ManPagesDir)/**/*"/>
<SDKTemplatesFiles Include="$(TemplatesDir)/**/*"/> <SDKTemplatesFiles Include="$(TemplatesDir)/**/*"/>
<SDKScriptsFiles Include="$(ScriptsDir)/after_remove_host.sh"/> <SDKScriptsFiles Include="$(ScriptsDir)/after_remove_host.sh"/>
@ -57,6 +59,12 @@
SkipUnchangedFiles="False" SkipUnchangedFiles="False"
UseHardlinksIfPossible="False"/> UseHardlinksIfPossible="False"/>
<Copy SourceFiles="@(SDKManifestFiles)"
DestinationFiles="@(SDKManifestFiles->'$(RpmLayoutManifestFiles)/%(RecursiveDir)%(Filename)%(Extension)')"
OverwriteReadOnlyFiles="True"
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False"/>
<Copy SourceFiles="@(SDKManpages)" <Copy SourceFiles="@(SDKManpages)"
DestinationFiles="@(SDKManpages->'$(RpmLayoutDocs)/%(RecursiveDir)%(Filename)%(Extension)')" DestinationFiles="@(SDKManpages->'$(RpmLayoutDocs)/%(RecursiveDir)%(Filename)%(Extension)')"
OverwriteReadOnlyFiles="True" OverwriteReadOnlyFiles="True"
@ -172,6 +180,12 @@
SkipUnchangedFiles="False" SkipUnchangedFiles="False"
UseHardlinksIfPossible="False"/> UseHardlinksIfPossible="False"/>
<Copy SourceFiles="@(GeneratedRpmFiles)"
DestinationFiles="$(MarinerRpmFile)"
OverwriteReadOnlyFiles="True"
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False"/>
</Target> </Target>
<Target Name="SetupRpmProps" <Target Name="SetupRpmProps"
@ -184,6 +198,7 @@
<DotnetNewTemplatesRoot>$(RedistLayoutPath)templates/</DotnetNewTemplatesRoot> <DotnetNewTemplatesRoot>$(RedistLayoutPath)templates/</DotnetNewTemplatesRoot>
<SdkRPMInstallerFile>$(ArtifactsShippingPackagesDir)$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension)</SdkRPMInstallerFile> <SdkRPMInstallerFile>$(ArtifactsShippingPackagesDir)$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension)</SdkRPMInstallerFile>
<RpmFile>$(SdkRPMInstallerFile)</RpmFile> <RpmFile>$(SdkRPMInstallerFile)</RpmFile>
<MarinerRpmFile>$(ArtifactsShippingPackagesDir)$(MarinerArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension)</MarinerRpmFile>
<!-- Need to acquire manpage files from CLI repo: https://github.com/dotnet/cli/issues/10266 --> <!-- Need to acquire manpage files from CLI repo: https://github.com/dotnet/cli/issues/10266 -->
<ManPagesDir>$(RepoRoot)/Documentation/manpages</ManPagesDir> <ManPagesDir>$(RepoRoot)/Documentation/manpages</ManPagesDir>
<EndToEndTestProject>$(RepoRoot)/test/EndToEnd/EndToEnd.csproj</EndToEndTestProject> <EndToEndTestProject>$(RepoRoot)/test/EndToEnd/EndToEnd.csproj</EndToEndTestProject>
@ -198,6 +213,7 @@
<RpmLayoutPackageRoot>$(RpmLayoutDirectory)package_root</RpmLayoutPackageRoot> <RpmLayoutPackageRoot>$(RpmLayoutDirectory)package_root</RpmLayoutPackageRoot>
<RpmLayoutSDK>$(RpmLayoutPackageRoot)/sdk</RpmLayoutSDK> <RpmLayoutSDK>$(RpmLayoutPackageRoot)/sdk</RpmLayoutSDK>
<RpmLayoutDotnetNewTemplates>$(RpmLayoutPackageRoot)/templates</RpmLayoutDotnetNewTemplates> <RpmLayoutDotnetNewTemplates>$(RpmLayoutPackageRoot)/templates</RpmLayoutDotnetNewTemplates>
<RpmLayoutManifestFiles>$(RpmLayoutPackageRoot)/sdk-manifests</RpmLayoutManifestFiles>
<RpmLayoutDocs>$(RpmLayoutDirectory)docs</RpmLayoutDocs> <!-- Man Pages --> <RpmLayoutDocs>$(RpmLayoutDirectory)docs</RpmLayoutDocs> <!-- Man Pages -->
<RpmLayoutTemplates>$(RpmLayoutDirectory)templates</RpmLayoutTemplates> <!-- Copyright, Changelog --> <RpmLayoutTemplates>$(RpmLayoutDirectory)templates</RpmLayoutTemplates> <!-- Copyright, Changelog -->
<RpmLayoutScripts>$(RpmLayoutDirectory)scripts</RpmLayoutScripts> <RpmLayoutScripts>$(RpmLayoutDirectory)scripts</RpmLayoutScripts>

View file

@ -39,6 +39,7 @@
Changing "ProductBandCombinedHostHostFxrFrameworkSdkName" mid-product-band will break the upgradability of the SDK bundle installer. --> Changing "ProductBandCombinedHostHostFxrFrameworkSdkName" mid-product-band will break the upgradability of the SDK bundle installer. -->
<ProductBandCombinedHostHostFxrFrameworkSdkName>Dotnet SDK Bundle Installer $(CliProductBandVersion) $(ProductMonikerRid)</ProductBandCombinedHostHostFxrFrameworkSdkName> <ProductBandCombinedHostHostFxrFrameworkSdkName>Dotnet SDK Bundle Installer $(CliProductBandVersion) $(ProductMonikerRid)</ProductBandCombinedHostHostFxrFrameworkSdkName>
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(Version)-$(Architecture)</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk> <DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(Version)-$(Architecture)</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
<MarinerArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk Condition=" '$(IsRPMBasedDistro)' == 'True' ">$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(Version)-cm.1-$(Architecture)</MarinerArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
</PropertyGroup> </PropertyGroup>
</Target> </Target>
</Project> </Project>

View file

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
<title>{CLISdkBrandName} ({arch})</title>
<background file="dotnetbackground.png" mime-type="image/png"/>
<options customize="never" require-scripts="false" hostArchitectures="{hostArchitectures}" />
<welcome file="welcome.html" mime-type="text/html" />
<conclusion file="conclusion.html" mime-type="text/html" />
<volume-check>
<allowed-os-versions>
<os-version min="{minOsVersion}" />
</allowed-os-versions>
</volume-check>
<choices-outline>
<line choice="{NetCoreAppTargetingPackComponentId}.pkg.x64" />
<line choice="{NetStandardTargetingPackComponentId}.pkg.x64" />
<line choice="{NetCoreAppHostPackComponentId}.pkg.x64" />
<line choice="{SharedFxComponentId}.pkg.x64" />
<line choice="{HostFxrComponentId}.pkg.x64" />
<line choice="{SharedHostComponentId}.pkg.x64" />
<line choice="{CLISdkComponentId}.pkg.x64"/>
<line choice="{NetCoreAppTargetingPackComponentId}.pkg.arm64" />
<line choice="{NetStandardTargetingPackComponentId}.pkg.arm64" />
<line choice="{NetCoreAppHostPackComponentId}.pkg.arm64" />
<line choice="{SharedFxComponentId}.pkg.arm64" />
<line choice="{HostFxrComponentId}.pkg.arm64" />
<line choice="{SharedHostComponentId}.pkg.arm64" />
<line choice="{CLISdkComponentId}.pkg.arm64"/>
</choices-outline>
<choice id="{NetCoreAppTargetingPackComponentId}.pkg.x64" visible="true" selected="IsX64Machine()" title="{NetCoreAppTargetingPackBrandName} ({arch})" description="The .NET Targeting Pack">
<pkg-ref id="{NetCoreAppTargetingPackComponentId}.pkg" />
</choice>
<choice id="{NetStandardTargetingPackComponentId}.pkg.x64" visible="true" selected="IsX64Machine()" title="{NetStandardTargetingPackBrandName} ({arch})" description="The .NET Standard 2.1 Targeting Pack">
<pkg-ref id="{NetStandardTargetingPackComponentId}.pkg" />
</choice>
<choice id="{NetCoreAppHostPackComponentId}.pkg.x64" visible="true" selected="IsX64Machine()" title="{NetCoreAppHostPackBrandName} ({arch})" description="The .NET App Host Pack">
<pkg-ref id="{NetCoreAppHostPackComponentId}.pkg" />
</choice>
<choice id="{SharedFxComponentId}.pkg.x64" visible="true" selected="IsX64Machine()" title="{SharedFxBrandName} ({arch})" description="The .NET Shared Framework">
<pkg-ref id="{SharedFxComponentId}.pkg" />
</choice>
<choice id="{HostFxrComponentId}.pkg.x64" visible="true" selected="IsX64Machine()" title="{HostFxrBrandName} ({arch})" description="The .NET Host FX Resolver">
<pkg-ref id="{HostFxrComponentId}.pkg" />
</choice>
<choice id="{SharedHostComponentId}.pkg.x64" visible="true" selected="IsX64Machine()" title="{SharedHostBrandName} ({arch})" description="The .NET Shared Host.">
<pkg-ref id="{SharedHostComponentId}.pkg" />
</choice>
<choice id="{CLISdkComponentId}.pkg.x64" visible="true" selected="IsX64Machine()" title="{CLISdkBrandName} ({arch})" description="The .NET SDK">
<pkg-ref id="{CLISdkComponentId}.pkg"/>
</choice>
<choice id="{NetCoreAppTargetingPackComponentId}.pkg.arm64" visible="true" selected="!IsX64Machine()" customLocation="{x64EmulationPkgInstallDirectory}" title="{NetCoreAppTargetingPackBrandName} ({arch})" description="The .NET Targeting Pack">
<pkg-ref id="{NetCoreAppTargetingPackComponentId}.pkg" />
</choice>
<choice id="{NetStandardTargetingPackComponentId}.pkg.arm64" visible="true" selected="!IsX64Machine()" customLocation="{x64EmulationPkgInstallDirectory}" title="{NetStandardTargetingPackBrandName} ({arch})" description="The .NET Standard 2.1 Targeting Pack">
<pkg-ref id="{NetStandardTargetingPackComponentId}.pkg" />
</choice>
<choice id="{NetCoreAppHostPackComponentId}.pkg.arm64" visible="true" selected="!IsX64Machine()" customLocation="{x64EmulationPkgInstallDirectory}" title="{NetCoreAppHostPackBrandName} ({arch})" description="The .NET App Host Pack">
<pkg-ref id="{NetCoreAppHostPackComponentId}.pkg" />
</choice>
<choice id="{SharedFxComponentId}.pkg.arm64" visible="true" selected="!IsX64Machine()" customLocation="{x64EmulationPkgInstallDirectory}" title="{SharedFxBrandName} ({arch})" description="The .NET Shared Framework">
<pkg-ref id="{SharedFxComponentId}.pkg" />
</choice>
<choice id="{HostFxrComponentId}.pkg.arm64" visible="true" selected="!IsX64Machine()" customLocation="{x64EmulationPkgInstallDirectory}" title="{HostFxrBrandName} ({arch})" description="The .NET Host FX Resolver">
<pkg-ref id="{HostFxrComponentId}.pkg" />
</choice>
<choice id="{SharedHostComponentId}.pkg.arm64" visible="true" selected="!IsX64Machine()" customLocation="{x64EmulationPkgInstallDirectory}" title="{SharedHostBrandName} ({arch})" description="The .NET Shared Host.">
<pkg-ref id="{SharedHostComponentId}.pkg" />
</choice>
<choice id="{CLISdkComponentId}.pkg.arm64" visible="true" selected="!IsX64Machine()" customLocation="{x64EmulationPkgInstallDirectory}" title="{CLISdkBrandName} ({arch})" description="The .NET SDK">
<pkg-ref id="{CLISdkComponentId}.pkg"/>
</choice>
<pkg-ref id="{NetCoreAppTargetingPackComponentId}.pkg">{NetCoreAppTargetingPackComponentId}.pkg</pkg-ref>
<pkg-ref id="{NetStandardTargetingPackComponentId}.pkg">{NetStandardTargetingPackComponentId}.pkg</pkg-ref>
<pkg-ref id="{NetCoreAppHostPackComponentId}.pkg">{NetCoreAppHostPackComponentId}.pkg</pkg-ref>
<pkg-ref id="{SharedFxComponentId}.pkg">{SharedFxComponentId}.pkg</pkg-ref>
<pkg-ref id="{HostFxrComponentId}.pkg">{HostFxrComponentId}.pkg</pkg-ref>
<pkg-ref id="{SharedHostComponentId}.pkg">{SharedHostComponentId}.pkg</pkg-ref>
<pkg-ref id="{CLISdkComponentId}.pkg">{CLISdkComponentId}.pkg</pkg-ref>
<script>
<![CDATA[
function IsX64Machine() {
var machine = system.sysctl("hw.machine");
var cputype = system.sysctl("hw.cputype");
var cpu64 = system.sysctl("hw.cpu64bit_capable");
var translated = system.sysctl("sysctl.proc_translated");
system.log("Machine type: " + machine);
system.log("Cpu type: " + cputype);
system.log("64-bit: " + cpu64);
system.log("Translated: " + translated);
// From machine.h
// CPU_TYPE_X86_64 = CPU_TYPE_X86 | CPU_ARCH_ABI64 = 0x010000007 = 16777223
// CPU_TYPE_X86 = 7
var result = machine == "amd64" || machine == "x86_64" || cputype == "16777223" || (cputype == "7" && cpu64 == "1");
// We may be running under translation (Rosetta) that makes it seem like system is x64, if so assume machine is not actually x64
result = result && (translated != "1");
system.log("IsX64Machine: " + result);
return result;
}
]]>
</script>
</installer-gui-script>

View file

@ -16,5 +16,47 @@
</RegistryKey> </RegistryKey>
</Component> </Component>
</ComponentGroup> </ComponentGroup>
<!-- Set values for DOTNETHOME if not passed in.
These searches prefer the existing registry key and fallback to probing the default location if registry key isn't present -->
<Property Id="DOTNETHOME_X86_SEARCH">
<DirectorySearch Id="dirDOTNETHOME_X86_search" Path="[ProgramFilesFolder]dotnet" AssignToProperty="yes">
<FileSearch Id="fileDOTNETHOME_X86_search" Name="dotnet.exe" />
</DirectorySearch>
<RegistrySearch Id="regDOTNETHOME_X86_search" Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\x86" Name="InstallLocation" Win64="no" Type="raw" />
</Property>
<Property Id="DOTNETHOME_X64_SEARCH">
<DirectorySearch Id="dirDOTNETHOME_X64_search" Path="[ProgramFiles64Folder]dotnet" AssignToProperty="yes">
<FileSearch Id="fileDOTNETHOME_X64_search" Name="dotnet.exe" />
</DirectorySearch>
<RegistrySearch Id="regDOTNETHOME_X64_search" Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\x64" Name="InstallLocation" Win64="no" Type="raw" />
</Property>
<Property Id="DOTNETHOME_X64_ALT_SEARCH">
<DirectorySearch Id="dirDOTNETHOME_X64_ALT_search" Path="[ProgramFiles64Folder]dotnet\x64" AssignToProperty="yes">
<FileSearch Id="fileDOTNETHOME_X64_ALT_search" Name="dotnet.exe" />
</DirectorySearch>
<RegistrySearch Id="regDOTNETHOME_X64_ALT_search" Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\x64" Name="InstallLocation" Win64="no" Type="raw" />
</Property>
<Property Id="DOTNETHOME_ARM64_SEARCH">
<DirectorySearch Id="dirDOTNETHOME_ARM64_search" Path="[ProgramFiles64Folder]dotnet" AssignToProperty="yes">
<FileSearch Id="fileDOTNETHOME_ARM64_search" Name="dotnet.exe" />
</DirectorySearch>
<RegistrySearch Id="regDOTNETHOME_ARM64_search" Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\arm64" Name="InstallLocation" Win64="no" Type="raw" />
</Property>
<!-- Set the DOTNETHOME property if not passed in and we found a path -->
<SetProperty Id="DOTNETHOME_X86" Value="[DOTNETHOME_X86_SEARCH]" Before="CostFinalize">
NOT DOTNETHOME_X86 AND DOTNETHOME_X86_SEARCH
</SetProperty>
<SetProperty Id="DOTNETHOME_X64" Value="[DOTNETHOME_X64_SEARCH]" Before="CostFinalize">
NOT DOTNETHOME_X64 AND DOTNETHOME_X64_SEARCH AND %PROCESSOR_ARCHITECTURE="AMD64"
</SetProperty>
<SetProperty Action="Set_DOTNETHOME_X64_alt" Id="DOTNETHOME_X64" Value="[DOTNETHOME_X64_ALT_SEARCH]" Before="CostFinalize">
NOT DOTNETHOME_X64 AND DOTNETHOME_X64_ALT_SEARCH AND NOT %PROCESSOR_ARCHITECTURE="AMD64"
</SetProperty>
<SetProperty Id="DOTNETHOME_ARM64" Value="[DOTNETHOME_ARM64_SEARCH]" Before="CostFinalize">
NOT DOTNETHOME_ARM64 AND DOTNETHOME_ARM64_SEARCH
</SetProperty>
</Fragment> </Fragment>
</Wix> </Wix>

View file

@ -113,7 +113,7 @@ namespace EndToEnd.Tests
.WithWorkingDirectory(projectDirectory) .WithWorkingDirectory(projectDirectory)
.Execute(publishArgs) .Execute(publishArgs)
.Should().Pass(); .Should().Pass();
var selfContainedPublishDir = new DirectoryInfo(projectDirectory) var selfContainedPublishDir = new DirectoryInfo(projectDirectory)
.Sub("bin").Sub("Debug").GetDirectories().FirstOrDefault() .Sub("bin").Sub("Debug").GetDirectories().FirstOrDefault()
.Sub("win-arm64").Sub("publish"); .Sub("win-arm64").Sub("publish");
@ -121,7 +121,7 @@ namespace EndToEnd.Tests
selfContainedPublishDir.Should().HaveFilesMatching("System.Windows.Forms.dll", SearchOption.TopDirectoryOnly); selfContainedPublishDir.Should().HaveFilesMatching("System.Windows.Forms.dll", SearchOption.TopDirectoryOnly);
selfContainedPublishDir.Should().HaveFilesMatching($"{directory.Name}.dll", SearchOption.TopDirectoryOnly); selfContainedPublishDir.Should().HaveFilesMatching($"{directory.Name}.dll", SearchOption.TopDirectoryOnly);
} }
[WindowsOnlyFact] [WindowsOnlyFact]
public void ItCanPublishArm64Wpf() public void ItCanPublishArm64Wpf()
{ {
@ -176,7 +176,7 @@ namespace EndToEnd.Tests
public void DotnetNewShowsCuratedListCorrectly() public void DotnetNewShowsCuratedListCorrectly()
{ {
string locale = System.Threading.Thread.CurrentThread.CurrentUICulture.Name; string locale = System.Threading.Thread.CurrentThread.CurrentUICulture.Name;
if (!string.IsNullOrWhiteSpace(locale) if (!string.IsNullOrWhiteSpace(locale)
&& !locale.StartsWith("en", StringComparison.OrdinalIgnoreCase)) && !locale.StartsWith("en", StringComparison.OrdinalIgnoreCase))
{ {
Console.WriteLine($"[{nameof(DotnetNewShowsCuratedListCorrectly)}] CurrentUICulture: {locale}"); Console.WriteLine($"[{nameof(DotnetNewShowsCuratedListCorrectly)}] CurrentUICulture: {locale}");
@ -258,7 +258,7 @@ namespace EndToEnd.Tests
/// <summary> /// <summary>
/// The test checks if the template creates the template for correct framework by default. /// The test checks if the template creates the template for correct framework by default.
/// For .NET 6 the templates should create the projects targeting net6.0 /// For .NET 6 the templates should create the projects targeting net6.0
/// </summary> /// </summary>
[Theory] [Theory]
[InlineData("console")] [InlineData("console")]

View file

@ -145,5 +145,174 @@
Skip="true" Skip="true"
Issue="" Issue=""
Reason="https://github.com/dotnet/installer/pull/8966#issuecomment-721111308"/> Reason="https://github.com/dotnet/installer/pull/8966#issuecomment-721111308"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_keeps_symbols_by_default"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_links_simple_app_without_analysis_warnings_and_it_runs"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_does_not_include_leftover_artifacts_on_second_run"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_runs_and_creates_linked_app"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_respects_warning_level_independently"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_runs_incrementally"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_symbols_option_can_override_defaults_from_debugger_support"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_removes_symbols_when_debugger_support_is_disabled"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_displays_informational_warning"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.PrepareForILLink_can_set_IsTrimmable"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_accepts_option_to_remove_symbols"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_defaults_keep_nonframework"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_accepts_root_descriptor"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_respects_global_TrimMode"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_only_runs_when_switch_is_enabled"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_error_on_nonboolean_optimization_flag"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishASingleFileApp.It_generates_a_single_file_including_pdbs"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.PrepareForILLink_can_set_TrimMode"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_accepts_option_to_enable_analysis_warnings"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_error_on_portable_app"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_can_treat_warnings_not_as_errors"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.TrimmingOptions_are_defaulted_correctly_on_trimmed_apps"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_errors_fail_the_build"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_can_treat_warnings_as_errors"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_roots_IntermediateAssembly"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_can_treat_warnings_as_errors_independently"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_accepts_option_to_disable_analysis_warnings"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_can_ignore_warnings"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_respects_analysis_level"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_accepts_option_to_enable_analysis_warnings_without_PublishTrimmed"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_ignores_host_config_settings_with_link_false"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_respects_feature_settings_from_host_config"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAWebApp.It_publishes_as_framework_dependent_by_default"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishASingleFileApp.It_errors_when_enabling_compression_targeting_net5"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink.ILLink_analysis_warnings_are_disabled_by_default"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Build.Tests.AppHostTests.It_builds_a_runnable_apphost_by_default"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Build.Tests.GivenThatWeWantToBuildADesktopExeWithFSharp.It_builds_a_simple_net50_app"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishASingleFileApp.It_can_include_ni_pdbs_in_single_file"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Build.Tests.GivenWeWantToRequireWindowsForDesktopApps.It_builds_on_windows_with_the_windows_desktop_sdk_5_0_with_ProjectSdk_set"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Build.Tests.GivenWeWantToRequireWindowsForDesktopApps.When_TargetPlatformVersion_is_set_higher_than_10_It_can_reference_cswinrt_api"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Build.Tests.GivenWeWantToRequireWindowsForDesktopApps.Given_duplicated_ResolvedFileToPublish_It_Can_Publish"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
<Method Name="Microsoft.NET.Build.Tests.GivenWeWantToRequireWindowsForDesktopApps.It_builds_on_windows_with_the_windows_desktop_sdk_5_0_without_ProjectSdk_set"
Skip="true"
Issue=""
Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/>
</SkippedTests> </SkippedTests>
</Tests> </Tests>