diff --git a/.vsts-ci.yml b/.vsts-ci.yml index a2214c702..47390d2bb 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -104,10 +104,17 @@ stages: agentOs: Windows_NT pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: +<<<<<<< HEAD name: NetCore1ESPool-Public demands: ImageOverride -equals build.windows.10.amd64.vs2019.open ${{ if eq(variables['System.TeamProject'], '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 timeoutInMinutes: 180 strategy: @@ -133,10 +140,17 @@ stages: agentOs: Linux pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: +<<<<<<< HEAD name: NetCore1ESPool-Public demands: ImageOverride -equals Build.Ubuntu.1604.Amd64.Open ${{ if eq(variables['System.TeamProject'], '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 timeoutInMinutes: 180 strategy: @@ -298,10 +312,17 @@ stages: agentOs: Linux pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: +<<<<<<< HEAD name: NetCore1ESPool-Public demands: ImageOverride -equals Build.Ubuntu.1604.Amd64.Open ${{ if eq(variables['System.TeamProject'], '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 timeoutInMinutes: 180 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-run-tarball-build.yml - parameters: - dependsOn: Source_Build_Create_Tarball - condition: eq(dependencies.Source_Build_Create_Tarball.outputs['Tarball_Build_Check._includeTarballBuild'], 'true') + # disable tarball build ci until 7.0 stabilizes + # - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml + # parameters: + # 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 # - template: /eng/build.yml diff --git a/Directory.Build.props b/Directory.Build.props index 35439d3b3..c373c9beb 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -10,6 +10,7 @@ $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant()) $(BuildArchitecture) + $(BuildArchitecture) x64 diff --git a/eng/SourceBuild.Version.Details.xml b/eng/SourceBuild.Version.Details.xml deleted file mode 100644 index 86b3857fb..000000000 --- a/eng/SourceBuild.Version.Details.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - https://github.com/dotnet/aspnetcore - 71dd6b0c87d7619668a40876d084d93db57eab41 - - - - https://github.com/dotnet/clicommandlineparser - 3198bf5660cad3dab85f5475bf1fda9688146e3f - - - - https://github.com/dotnet/command-line-api - 5e855e911de7c56fe28400c4500e888fe2a3da8e - - - - https://github.com/dotnet/diagnostics - 6f48c2ae749c29b687af0353e6c2a9590d7e3d22 - - - - https://github.com/dotnet/fsharp - 3af67cd8ffd73b2dc443e1e24dc0cf28f7e1c608 - - - - https://github.com/mono/linker - cb8d86607bcebd8cb3b0a1efe1472839ecdde1ca - - linker - - - https://github.com/dotnet/msbuild - cdc5faeda066a83b084c96b8a455ad0a5e8713ab - - - - https://github.com/dotnet/roslyn - d16c8bd011951d9bd15809d9004276cf7baaa786 - - - - https://github.com/dotnet/runtime - 566b53a66b0afa573f0dae33d07c8de9685aa5c8 - - - - https://github.com/dotnet/sdk - 5fab7585de482237f470634489b969a1bd03e063 - - - - https://github.com/dotnet/symreader - 1968a003d845d119a9d38ac4daaeea22897f7daf - - - - https://github.com/dotnet/templating - 3bc0d90f3e450f3e4ebda128081d091fb42968e3 - - - - https://github.com/dotnet/test-templates - 6898c1c70c2d14e9725ddab6e1ebe8084c4d7e27 - - - - https://github.com/dotnet/xdt - 6a46e7c886cdf499ba3433f665ab417be814135e - - - - https://github.com/microsoft/vstest - e078bbadaf65628c313e97041973db52a84491ef - - - - - - https://github.com/dotnet/arcade - a3377cccde8639089f99107e2ba5df2c8cbe6394 - - - - https://github.com/dotnet/sourcelink - 4b584dbc392bb1aad49c2eb1ab84d8b489b6dccc - - - - https://github.com/dotnet/source-build - 3fb25b8db3bec654e37e71a5b2b7fde14444bc2f - - - - https://github.com/dotnet/source-build-reference-packages - 469769836b88669a58c46e944ab537184055c30a - - - - https://github.com/dotnet/xliff-tasks - 71c811561ad4dcf46825a5077fbcc668ab74754f - - - - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b2e682a23..8dcf9223e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -20,6 +20,7 @@ https://github.com/dotnet/runtime 95569138572484e9e9d1292b890d83e3c121107c + https://github.com/dotnet/runtime @@ -128,6 +129,7 @@ https://github.com/microsoft/vstest d6f64b37c2cfee76c8b1269d688384ced30ecd21 + https://github.com/dotnet/linker @@ -148,6 +150,7 @@ https://github.com/nuget/nuget.client e685bdb6d7b4d1f3664f6542f50b84376a19341c + https://github.com/Microsoft/ApplicationInsights-dotnet @@ -198,4 +201,4 @@ - + \ No newline at end of file diff --git a/eng/Versions.props b/eng/Versions.props index 47c6df540..6d9de8dd3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -108,7 +108,7 @@ $(MicrosoftNETCoreAppRuntimePackageVersion) - 3.14.0-dotnet + 1.0.0-v3.14.0.4118 @@ -182,4 +182,4 @@ 2.0.1-servicing-26011-01 - + \ No newline at end of file diff --git a/eng/docker/debian/Dockerfile b/eng/docker/debian/Dockerfile index 891658239..ebafe9adb 100644 --- a/eng/docker/debian/Dockerfile +++ b/eng/docker/debian/Dockerfile @@ -4,7 +4,7 @@ # # 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 RUN apt-get update \ diff --git a/src/SourceBuild/Arcade/README.md b/src/SourceBuild/Arcade/README.md index 914a87b3f..ad15a2f14 100644 --- a/src/SourceBuild/Arcade/README.md +++ b/src/SourceBuild/Arcade/README.md @@ -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 \ No newline at end of file +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 diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml index bf0b812dc..88ba3f01c 100644 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml +++ b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml @@ -27,13 +27,15 @@ jobs: Fedora33-Online: _runOnline: true _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: # _runOnline: false # _Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2 - timeoutInMinutes: 180 + timeoutInMinutes: 210 variables: _TarballDir: $(Build.StagingDirectory)/tarball + _BuildConfig: Release + _BuildArch: x64 workspace: clean: all @@ -56,6 +58,7 @@ jobs: mkdir -p "$(_TarballDir)" tarballFilePath="$(PIPELINE.WORKSPACE)/${resourceIdPathSegment}BlobArtifacts/dotnet-sdk-source*.tar.gz" eval tar -ozxf "$tarballFilePath" -C "$(_TarballDir)" + eval rm -f "$tarballFilePath" displayName: Extract Tarball - script: | @@ -79,21 +82,16 @@ jobs: docker run --rm -v $(_TarballDir):/tarball -w /tarball ${networkArgs} $(_Container) ./build.sh ${customBuildArgs} -- /p:CleanWhileBuilding=true displayName: Build Tarball - - task: CopyFiles@2 - displayName: Gather Source Build Artifacts - inputs: - SourceFolder: $(_TarballDir) - Contents: | - artifacts/**/Private.SourceBuilt.Artifacts*.tar.gz - artifacts/prebuilt-report/Private.SourceBuilt.Prebuilts.*.tar.gz - TargetFolder: '$(Build.StagingDirectory)/artifacts' - CleanTargetFolder: true + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - publish: '$(_TarballDir)/artifacts/$(_BuildArch)/$(_BuildConfig)/' + artifact: $(Agent.JobName)_Artifacts_Attempt$(System.JobAttempt) + displayName: Publish Source Build Artifacts - - task: PublishPipelineArtifact@1 - displayName: Publish Source Build Artifacts - inputs: - targetPath: '$(Build.StagingDirectory)/artifacts' - artifactName: $(Agent.JobName)_Artifacts_Attempt$(System.JobAttempt) + - script: | + set -x + + docker run --rm -v $(_TarballDir):/tarball -w /tarball $(_Container) ./build.sh --run-smoke-test + displayName: Run Tests - template: /src/SourceBuild/Arcade/eng/common/templates/steps/source-build-publish-logs.yml parameters: diff --git a/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-publish-logs.yml b/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-publish-logs.yml index 15cd9ceb9..f26933bc9 100644 --- a/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-publish-logs.yml +++ b/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-publish-logs.yml @@ -12,16 +12,14 @@ steps: Contents: | **/*.log **/*.binlog - artifacts/source-build/self/prebuilt-report/** + artifacts/prebuilt-report/* TargetFolder: '$(Build.StagingDirectory)/BuildLogs' CleanTargetFolder: true continueOnError: true condition: succeededOrFailed() -- task: PublishPipelineArtifact@1 +- publish: '$(Build.StagingDirectory)/BuildLogs' + artifact: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt) displayName: Publish BuildLogs - inputs: - targetPath: '$(Build.StagingDirectory)/BuildLogs' - artifactName: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt) continueOnError: true condition: succeededOrFailed() diff --git a/src/SourceBuild/Arcade/src/Tarball_ReadSourceBuildIntermediateNupkgDependencies.cs b/src/SourceBuild/Arcade/src/Tarball_ReadSourceBuildIntermediateNupkgDependencies.cs index fbd497b72..59f7eb499 100644 --- a/src/SourceBuild/Arcade/src/Tarball_ReadSourceBuildIntermediateNupkgDependencies.cs +++ b/src/SourceBuild/Arcade/src/Tarball_ReadSourceBuildIntermediateNupkgDependencies.cs @@ -59,8 +59,14 @@ namespace Microsoft.DotNet.SourceBuild.Tasks if (sourceBuildElement == null) { - // Ignore element: doesn't represent a source-build dependency. - return null; + // Workaround for https://github.com/dotnet/source-build/issues/2481 + 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; diff --git a/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs b/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs index 58dbab586..b6b2793f3 100644 --- a/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs +++ b/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs @@ -54,14 +54,16 @@ namespace Microsoft.DotNet.SourceBuild.Tasks foreach (var dependency in Dependencies.Select(dep => new { Name = dep.GetMetadata("Name"), + SourceBuildRepoName = dep.GetMetadata("SourceBuildRepoName"), Version = dep.GetMetadata("ExactVersion"), Sha = dep.GetMetadata("Sha"), - Uri = dep.GetMetadata("Uri") + Uri = dep.GetMetadata("Uri"), + GitCommitCount = dep.GetMetadata("GitCommitCount") })) { - string repoName = GetDefaultRepoNameFromUrl(dependency.Uri); - string safeRepoName = repoName.Replace("-", ""); - string propsPath = Path.Combine(SourceBuildMetadataDir, $"{repoName}.props"); + string repoName = dependency.SourceBuildRepoName; + string safeRepoName = repoName.Replace("-", "").Replace(".", ""); + string propsPath = Path.Combine(SourceBuildMetadataDir, $"{repoName.Replace(".", "-")}.props"); DerivedVersion derivedVersion = GetVersionInfo(dependency.Version, "0"); var repoProps = new Dictionary { @@ -71,6 +73,10 @@ namespace Microsoft.DotNet.SourceBuild.Tasks ["PreReleaseVersionLabel"] = derivedVersion.PreReleaseVersionLabel, ["IsStable"] = string.IsNullOrWhiteSpace(derivedVersion.PreReleaseVersionLabel) ? "true" : "false", }; + if (!string.IsNullOrEmpty(dependency.GitCommitCount)) + { + repoProps.Add("GitCommitCount", dependency.GitCommitCount); + } WritePropsFile(propsPath, repoProps); allRepoProps[$"{safeRepoName}GitCommitHash"] = dependency.Sha; allRepoProps[$"{safeRepoName}OutputPackageVersion"] = dependency.Version; @@ -98,16 +104,8 @@ namespace Microsoft.DotNet.SourceBuild.Tasks var releaseParts = nugetVersion.Release.Split('-', '.'); if (releaseParts.Length == 2) { - if (releaseParts[1].TrimStart('0') == commitCount) - { - // 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] }; - } + // NuGet does this - arbitrary build IDs + return new DerivedVersion { OfficialBuildId = DateTime.Now.ToString("yyyyMMdd.1"), PreReleaseVersionLabel = releaseParts[0] }; } 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('-', '.'))})"); } - 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 properties) { if (!File.Exists(filePath)) diff --git a/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets b/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets index b9e415dce..34ccaf5d6 100644 --- a/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets +++ b/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets @@ -13,7 +13,8 @@ - $(RepoRoot)artifacts/tarball/ + $(RepoRoot)artifacts/ + $(ArtifactsDir)tarball/ $([MSBuild]::EnsureTrailingSlash('$(TarballDir)')) $(TarballRootDir)src/ $(TarballRootDir)git-info/ @@ -27,6 +28,9 @@ CreateTarballDir; SetupSelfGithubInfo; CloneRepoAndDependentsRecursive; + CleanClonedSource; + RestoreTextOnlyPackages; + CopyTextOnlyPackages; CopyTarballContent; "> @@ -68,6 +72,14 @@ + + + + + @@ -76,8 +88,11 @@ $(GitHubRepositoryName) 1.0.0 1.0.0 - @(RootRepoCommitSha) + + + 2f7c1a94d6c9f8f9173ebadf2ec2ba512b2b4576 @(RootRepoUri) + @(RootRepoCommitCount) $(GitHubRepositoryName) true @@ -129,6 +144,12 @@ WorkingDirectory="$(RepoRoot)" Condition="$(IsRootRepo) == 'true'" /> + + + @@ -154,14 +175,31 @@ Command="git submodule update --init --recursive" WorkingDirectory="$(TarballRepoSourceDir)" /> + + + - - + + + + + + + + + + + + + + + + + + + + + + + + $(ArtifactsDir)text-only-packages/ + $(TarballRootDir)packages/text-only/ + + + + + + + @@ -232,4 +305,42 @@ + + + + + + + + + + + + + + + $([System.IO.Path]::GetFileName('$(TextOnlyDirectory)')) + + + + + + + + + + diff --git a/src/SourceBuild/Arcade/tools/TextOnlyPackages.csproj b/src/SourceBuild/Arcade/tools/TextOnlyPackages.csproj new file mode 100644 index 000000000..17f84b37d --- /dev/null +++ b/src/SourceBuild/Arcade/tools/TextOnlyPackages.csproj @@ -0,0 +1,69 @@ + + + net6.0 + $(TargetPackagesPath) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @(TextOnlyPackagesDirectories) + + + + + \ No newline at end of file diff --git a/src/SourceBuild/tarball/content/ArcadeOverrides/AfterSourceBuild.proj b/src/SourceBuild/tarball/content/ArcadeOverrides/AfterSourceBuild.proj index f9ea30ab1..141743561 100644 --- a/src/SourceBuild/tarball/content/ArcadeOverrides/AfterSourceBuild.proj +++ b/src/SourceBuild/tarball/content/ArcadeOverrides/AfterSourceBuild.proj @@ -150,7 +150,7 @@ SourceBuildArcadeTargetsFile=$(MSBuildThisFileDirectory)SourceBuildArcade.targets; SourceBuildIntermediateNupkgLicenseFile=$(SourceBuildIntermediateNupkgLicenseFile); " - BuildInParallel="true"/> + BuildInParallel="false"/> diff --git a/src/SourceBuild/tarball/content/ArcadeOverrides/SourceBuildArcadeBuild.targets b/src/SourceBuild/tarball/content/ArcadeOverrides/SourceBuildArcadeBuild.targets index 7662ad41d..eeea55fcc 100644 --- a/src/SourceBuild/tarball/content/ArcadeOverrides/SourceBuildArcadeBuild.targets +++ b/src/SourceBuild/tarball/content/ArcadeOverrides/SourceBuildArcadeBuild.targets @@ -78,6 +78,8 @@ $(InnerBuildArgs) /p:ArtifactsDir=$(CurrentRepoSourceBuildArtifactsDir) $(InnerBuildArgs) /bl:$(CurrentRepoSourceBuildBinlogFile) + + $(InnerBuildArgs) /p:ContinuousIntegrationBuild=true $(InnerBuildArgs) /p:SourceBuildOutputDir=$(SourceBuildOutputDir) @@ -97,6 +99,29 @@ + + + + + + + + + + + + + + + - + - - - - diff --git a/src/SourceBuild/tarball/content/Directory.Build.targets b/src/SourceBuild/tarball/content/Directory.Build.targets index 15a75864c..02ff624bc 100644 --- a/src/SourceBuild/tarball/content/Directory.Build.targets +++ b/src/SourceBuild/tarball/content/Directory.Build.targets @@ -12,11 +12,4 @@ - - - $([System.IO.File]::ReadAllText('$(ProdConFeedPath)').Trim()) - $(ProdConBlobFeedUrl.Replace('https://dotnetfeed.blob.core.windows.net/', '$(ProdConBlobFeedUrlPrefix)')) - - - diff --git a/src/SourceBuild/tarball/content/TemporaryBootstrapPackageVersions.props b/src/SourceBuild/tarball/content/TemporaryBootstrapPackageVersions.props deleted file mode 100755 index 234801de0..000000000 --- a/src/SourceBuild/tarball/content/TemporaryBootstrapPackageVersions.props +++ /dev/null @@ -1,22 +0,0 @@ - - - - - 6.0.0-preview.6.21352.12 - 3.1.0 - 3.1.0 - 6.0.0-preview.6.21352.12 - 6.0.0-preview.6.21352.12 - 5.0.0 - 5.0.0 - 6.0.0-preview.7.21321.2 - 6.0.0-preview.7.21321.2 - - diff --git a/src/SourceBuild/tarball/content/build.proj b/src/SourceBuild/tarball/content/build.proj index 1ae201332..117a13675 100644 --- a/src/SourceBuild/tarball/content/build.proj +++ b/src/SourceBuild/tarball/content/build.proj @@ -90,7 +90,7 @@ - + ./smoke-test.sh $(SmokeTestCommand) --minimal @@ -102,15 +102,9 @@ $(SmokeTestCommand) --excludeWebHttpsTests - + targetRid=$(TargetRid)" /> @@ -139,11 +133,11 @@ + AfterTargets="Build"> $(PrivateSourceBuiltPrebuiltsPackageVersionPrefix)$([MSBuild]::Add($(PrivateSourceBuiltPrebuiltsPackageVersionSuffix), 1)) - $(PackageReportDir)$(SourceBuiltPrebuiltsTarballName).$(TarballFileVersion).tar.gz + $(OutputPath)$(SourceBuiltPrebuiltsTarballName).$(TarballFileVersion).tar.gz $(ResultingPrebuiltPackagesDir) diff --git a/src/SourceBuild/tarball/content/build.sh b/src/SourceBuild/tarball/content/build.sh index ef54f09e6..6379f0aee 100755 --- a/src/SourceBuild/tarball/content/build.sh +++ b/src/SourceBuild/tarball/content/build.sh @@ -8,6 +8,7 @@ usage() { echo " --online build using online sources" echo " --with-packages use the specified directory of previously-built packages" echo " --with-sdk 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 "" } diff --git a/src/SourceBuild/tarball/content/eng/Versions.props b/src/SourceBuild/tarball/content/eng/Versions.props index a43c34cd5..b27697389 100644 --- a/src/SourceBuild/tarball/content/eng/Versions.props +++ b/src/SourceBuild/tarball/content/eng/Versions.props @@ -21,8 +21,8 @@ - 0.1.0-6.0.100-bootstrap.11 + 0.1.0-6.0.100-bootstrap.19 0.1.0-6.0.100- - 19 + 23 diff --git a/src/SourceBuild/tarball/content/global.json b/src/SourceBuild/tarball/content/global.json index b58293327..a9d0ed4c6 100644 --- a/src/SourceBuild/tarball/content/global.json +++ b/src/SourceBuild/tarball/content/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "6.0.100-preview.6.21355.2" + "dotnet": "6.0.100-rc.2.21426.20" }, "msbuild-sdks": { "Microsoft.Build.CentralPackageVersions": "2.0.1", diff --git a/src/SourceBuild/tarball/content/patches/arcade/0001-Update-TFM-to-net6.0.patch b/src/SourceBuild/tarball/content/patches/arcade/0001-Update-TFM-to-net6.0.patch deleted file mode 100644 index f577d4158..000000000 --- a/src/SourceBuild/tarball/content/patches/arcade/0001-Update-TFM-to-net6.0.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 5288390142a40beb392f5e11380b370ab696830c Mon Sep 17 00:00:00 2001 -From: dseefeld -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 @@ - --> - - netcoreapp3.1 -- net5.0 -+ net6.0 - - - -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 @@ - - - netcoreapp3.1;net472 -- netcoreapp3.1 -+ net6.0 - - true - Aka.ms link manager -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 @@ - - - net472;netcoreapp3.1 -- netcoreapp3.1 -+ net6.0 - - true - MSBuildSdk -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 @@ - - - $(TargetFrameworkForNETSDK);net472 -+ $(TargetFrameworkForNETSDK) - MSBuildSdk - false - true -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 @@ - - - netcoreapp3.1;net472 -+ net6.0 - false - MSBuildSdk - false -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 @@ - - - net472;netcoreapp3.1 -+ net6.0 - preview - false - -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 @@ - - - net472;netcoreapp3.1 -- netcoreapp3.1 -+ net6.0 - true - Latest - true -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 @@ - - - net472;netcoreapp3.1 -- netcoreapp3.1 -+ net6.0 - MSBuildSdk - - --- -2.31.1 - diff --git a/src/SourceBuild/tarball/content/patches/arcade/0002-Exclude-test-projects-from-source-build.patch b/src/SourceBuild/tarball/content/patches/arcade/0002-Exclude-test-projects-from-source-build.patch deleted file mode 100644 index 67bbb7be1..000000000 --- a/src/SourceBuild/tarball/content/patches/arcade/0002-Exclude-test-projects-from-source-build.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 9531b8ea8fab44bf8b9b19c64c393e0d2d5907c4 Mon Sep 17 00:00:00 2001 -From: dseefeld -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 @@ - - netcoreapp3.1 - enable -+ true - - - -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 @@ - - netcoreapp3.1;net472 - true -+ true - - - --- -2.31.1 - diff --git a/src/SourceBuild/tarball/content/patches/arcade/0003-Remove-net472-TFM.patch b/src/SourceBuild/tarball/content/patches/arcade/0003-Remove-net472-TFM.patch deleted file mode 100644 index e34352c51..000000000 --- a/src/SourceBuild/tarball/content/patches/arcade/0003-Remove-net472-TFM.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 63ab09a985b91f4b30a58dc113abc65d34298a12 Mon Sep 17 00:00:00 2001 -From: dseefeld -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 @@ - - - net472;netstandard2.0 -+ netstandard2.0 - true - - --- -2.31.1 - diff --git a/src/SourceBuild/tarball/content/patches/arcade/0004-Use-property-instead-of-hardcoded-version.patch b/src/SourceBuild/tarball/content/patches/arcade/0004-Use-property-instead-of-hardcoded-version.patch deleted file mode 100644 index aea25220b..000000000 --- a/src/SourceBuild/tarball/content/patches/arcade/0004-Use-property-instead-of-hardcoded-version.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 05673a6eb5004131cd42eda6d372e94c1dfb3165 Mon Sep 17 00:00:00 2001 -From: dseefeld -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 @@ - - - <_candidatePackageFolder>%(_candidatPackageFolders.Identity) -- <_runtimeJsonSubPath>Microsoft.NETCore.Platforms\2.1.0\runtime.json -+ <_runtimeJsonSubPath>Microsoft.NETCore.Platforms\$(MicrosoftNETCorePlatformsVersion)\runtime.json - <_runtimeJsonPath Condition="'$(_runtimeJsonPath)' == '' AND Exists('$(_candidatePackageFolder)\$(_runtimeJsonSubPath)')">$(_candidatePackageFolder)\$(_runtimeJsonSubPath) - <_runtimeJsonPath Condition="'$(_runtimeJsonPath)' == '' AND Exists('$(_candidatePackageFolder)\$(_runtimeJsonSubPath.ToLower())')">$(_candidatePackageFolder)\$(_runtimeJsonSubPath.ToLower()) - --- -2.31.1 - diff --git a/src/SourceBuild/tarball/content/patches/aspnetcore/0001-Run-GenerateFiles-during-source-build.patch b/src/SourceBuild/tarball/content/patches/aspnetcore/0001-Run-GenerateFiles-during-source-build.patch deleted file mode 100644 index e5d4b2551..000000000 --- a/src/SourceBuild/tarball/content/patches/aspnetcore/0001-Run-GenerateFiles-during-source-build.patch +++ /dev/null @@ -1,61 +0,0 @@ -From db187e95f62d9bff268e68f39b441b6da8be9111 Mon Sep 17 00:00:00 2001 -From: Michael Simons -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 @@ - -- - - aspnetcore - true -@@ -47,7 +46,7 @@ - BeforeTargets="Execute"> - - - -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 @@ - - -+ Condition=" '$(MSBuildRuntimeType)' == 'core' "> - - - - net5.0 -+ false - - - --- -2.29.2 - diff --git a/src/SourceBuild/tarball/content/patches/aspnetcore/0002-Use-Versions.props-MicrosoftExtensionsDependencyMode.patch b/src/SourceBuild/tarball/content/patches/aspnetcore/0002-Use-Versions.props-MicrosoftExtensionsDependencyMode.patch deleted file mode 100644 index 2a52ae656..000000000 --- a/src/SourceBuild/tarball/content/patches/aspnetcore/0002-Use-Versions.props-MicrosoftExtensionsDependencyMode.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 14992fbe4d8f433025cc45be81ef0035ed77221b Mon Sep 17 00:00:00 2001 -From: Michael Simons -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 @@ - - - -- -+ - - - --- -2.29.2 - diff --git a/src/SourceBuild/tarball/content/patches/sdk/0001-Update-reference-versions-to-be-source-buildable.patch b/src/SourceBuild/tarball/content/patches/sdk/0001-Update-reference-versions-to-be-source-buildable.patch deleted file mode 100644 index dc62d78b9..000000000 --- a/src/SourceBuild/tarball/content/patches/sdk/0001-Update-reference-versions-to-be-source-buildable.patch +++ /dev/null @@ -1,41 +0,0 @@ -From c57808231260cc3467b98d97c3249a59db9757f2 Mon Sep 17 00:00:00 2001 -From: Michael Simons -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 @@ - - - 4.0.0-2.21359.14 -+ 4.0.0-2.21359.14 - 4.0.0-2.21359.14 - 4.0.0-2.21359.14 - 4.0.0-2.21359.14 -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 @@ - - -- -- -+ -+ - - - --- -2.29.2 - diff --git a/src/SourceBuild/tarball/content/patches/sdk/0003-Remove-472-TFM-from-source-build.patch b/src/SourceBuild/tarball/content/patches/sdk/0003-Remove-472-TFM-from-source-build.patch deleted file mode 100644 index 29c8a7c26..000000000 --- a/src/SourceBuild/tarball/content/patches/sdk/0003-Remove-472-TFM-from-source-build.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 6009d921575a4474c66b812bdb914237ddb04cc2 Mon Sep 17 00:00:00 2001 -From: Michael Simons -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 @@ - - - $(SdkTargetFramework);net472 -+ $(SdkTargetFramework) - true - MicrosoftAspNetCore - true -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 @@ - Library - Microsoft.NET.Build.Tasks - $(SdkTargetFramework);net472 -+ $(SdkTargetFramework) - - - -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 @@ - The MSBuild targets and properties for building .NET Core projects. - Library - $(SdkTargetFramework);net472 -+ $(SdkTargetFramework) - annotations - - --- -2.29.2 - diff --git a/src/SourceBuild/tarball/content/patches/sourcelink/0001-Update-TFMs-to-net6.0.patch b/src/SourceBuild/tarball/content/patches/sourcelink/0001-Update-TFMs-to-net6.0.patch deleted file mode 100644 index 58e98997c..000000000 --- a/src/SourceBuild/tarball/content/patches/sourcelink/0001-Update-TFMs-to-net6.0.patch +++ /dev/null @@ -1,156 +0,0 @@ -From aba2e21af6d299f0e5c04c7848e4971e0da0e5b5 Mon Sep 17 00:00:00 2001 -From: dseefeld -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 @@ - true - - true -+ false - true - 2.4.1 - 16.7.0 -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 @@ -  - - net472;net5.0 -+ net6.0 - true - - -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 @@ -  - - net472;net5.0 -+ net6.0 - true - - -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 @@ -  - - net472;net5.0 -+ net6.0 - true - - -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 @@ -  - - net472;net5.0 -+ net6.0 - true - - -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 @@ -  - - net472;net5.0 -+ net6.0 - true - - -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 @@ -  - - net472;net5.0 -+ net6.0 - true - - -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 @@ -  - - net472;net5.0 -+ net6.0 - true - - -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 @@ -  - - net472;net5.0 -+ net6.0 - true - - -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 @@ -  - - net472;net5.0 -+ net6.0 - true - - -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 @@ - - - net5.0;net472 -+ net6.0 - false - none - false --- -2.31.1 - diff --git a/src/SourceBuild/tarball/content/patches/sourcelink/0002-Update-Task-paths-to-include-net6.0.patch b/src/SourceBuild/tarball/content/patches/sourcelink/0002-Update-Task-paths-to-include-net6.0.patch deleted file mode 100644 index 927840635..000000000 --- a/src/SourceBuild/tarball/content/patches/sourcelink/0002-Update-Task-paths-to-include-net6.0.patch +++ /dev/null @@ -1,142 +0,0 @@ -From e41e61e4c91785ba5ff1761c7d14d9f92a612ae4 Mon Sep 17 00:00:00 2001 -From: dseefeld -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 @@ - - $(MSBuildThisFileDirectory)..\tools\net472\Microsoft.Build.Tasks.Git.dll - $(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.Build.Tasks.Git.dll -+ $(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.Build.Tasks.Git.dll - - -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 @@ - - <_SourceLinkAzureDevOpsServerGitAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.AzureDevOpsServer.Git.dll - <_SourceLinkAzureDevOpsServerGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.AzureDevOpsServer.Git.dll -+ <_SourceLinkAzureDevOpsServerGitAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.AzureDevOpsServer.Git.dll - - - -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 @@ - - <_SourceLinkAzureReposGitAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.AzureRepos.Git.dll - <_SourceLinkAzureReposGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.AzureRepos.Git.dll -+ <_SourceLinkAzureReposGitAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.AzureRepos.Git.dll - - - -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 @@ - - <_SourceLinkAzureReposTfvcAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.AzureRepos.Tfvc.dll - <_SourceLinkAzureReposTfvcAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.AzureRepos.Tfvc.dll -+ <_SourceLinkAzureReposTfvcAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.AzureRepos.Tfvc.dll - - - -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 @@ - - <_SourceLinkBitbucketAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.Bitbucket.Git.dll - <_SourceLinkBitbucketAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.Bitbucket.Git.dll -+ <_SourceLinkBitbucketAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.Bitbucket.Git.dll - - - -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 @@ - - <_MicrosoftSourceLinkCommonAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.Common.dll - <_MicrosoftSourceLinkCommonAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.Common.dll -+ <_MicrosoftSourceLinkCommonAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.Common.dll - - - -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 @@ - - <_SourceLinkGitHubAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.GitHub.dll - <_SourceLinkGitHubAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.GitHub.dll -+ <_SourceLinkGitHubAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.GitHub.dll - - - -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 @@ - - <_SourceLinkGitLabAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.GitLab.dll - <_SourceLinkGitLabAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.GitLab.dll -+ <_SourceLinkGitLabAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.GitLab.dll - - - -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 @@ - - <_SourceLinkGitWebAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.GitWeb.dll - <_SourceLinkGitWebAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.GitWeb.dll -+ <_SourceLinkGitWebAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.GitWeb.dll - - - -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 @@ - - <_SourceLinkGiteaAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.Gitea.dll - <_SourceLinkGiteaAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\Microsoft.SourceLink.Gitea.dll -+ <_SourceLinkGiteaAssemblyFile Condition="'$(DotNetBuildFromSource)' == 'true'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.Gitea.dll - - - --- -2.31.1 - diff --git a/src/SourceBuild/tarball/content/patches/sourcelink/0003-Allow-using-.git-directory-instead-of-gitdir-redirec.patch b/src/SourceBuild/tarball/content/patches/sourcelink/0003-Allow-using-.git-directory-instead-of-gitdir-redirec.patch deleted file mode 100644 index ea5947e52..000000000 --- a/src/SourceBuild/tarball/content/patches/sourcelink/0003-Allow-using-.git-directory-instead-of-gitdir-redirec.patch +++ /dev/null @@ -1,36 +0,0 @@ -From cfb26098630fe3cd9648ebcbbe9ac59278b63242 Mon Sep 17 00:00:00 2001 -From: Michael Simons -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 - /// Null if the HEAD tip reference can't be resolved. - 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 - diff --git a/src/SourceBuild/tarball/content/patches/symreader/0001-Exlude-test-project-from-source-build.patch b/src/SourceBuild/tarball/content/patches/symreader/0001-Exlude-test-project-from-source-build.patch deleted file mode 100644 index 1c6f1f3bc..000000000 --- a/src/SourceBuild/tarball/content/patches/symreader/0001-Exlude-test-project-from-source-build.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f4978575da2a47049a941260629f0f2e54979778 Mon Sep 17 00:00:00 2001 -From: dseefeld -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 @@ - netstandard1.3 - false - true -+ true - - - -@@ -13,4 +14,4 @@ - - - -- -\ No newline at end of file -+ --- -2.31.1 - diff --git a/src/SourceBuild/tarball/content/patches/templating/0001-fixed-TemplateLocalizer-tool.patch b/src/SourceBuild/tarball/content/patches/templating/0001-fixed-TemplateLocalizer-tool.patch deleted file mode 100644 index ffc8a7f51..000000000 --- a/src/SourceBuild/tarball/content/patches/templating/0001-fixed-TemplateLocalizer-tool.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 3ac6d94eed6cfbb7c06128fe4caa91e9701bc2f9 Mon Sep 17 00:00:00 2001 -From: Vlada Shubina -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 @@ - - - -+ - - - -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 ExportLocalizationFilesAsync(string templateJson - IReadOnlyList templateJsonStrings = stringExtractor.ExtractStrings(out string templateJsonLanguage); - - string targetDirectory = options.TargetDirectory ?? Path.Combine(Path.GetDirectoryName(templateJsonPath) ?? string.Empty, "localize"); -+ IEnumerable 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("-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 - diff --git a/src/SourceBuild/tarball/content/patches/vstest/0001-Condition-win7-x86-RID.patch b/src/SourceBuild/tarball/content/patches/vstest/0001-Condition-win7-x86-RID.patch deleted file mode 100644 index 143becaed..000000000 --- a/src/SourceBuild/tarball/content/patches/vstest/0001-Condition-win7-x86-RID.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0fc9ffcb249411f9911a6e13f939eaf95bf219c8 Mon Sep 17 00:00:00 2001 -From: MichaelSimons -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 @@ - AnyCPU - true - -- -+ - win7-x64 - - --- -2.26.2 - diff --git a/src/SourceBuild/tarball/content/repos/Directory.Build.props b/src/SourceBuild/tarball/content/repos/Directory.Build.props index 9d065c35c..64536436d 100644 --- a/src/SourceBuild/tarball/content/repos/Directory.Build.props +++ b/src/SourceBuild/tarball/content/repos/Directory.Build.props @@ -63,16 +63,6 @@ - - - - - - - @@ -147,6 +137,7 @@ $(StandardSourceBuildArgs) /p:ArcadeBuildFromSource=true $(StandardSourceBuildArgs) /p:CopyWipIntoInnerSourceBuildRepo=true $(StandardSourceBuildArgs) /p:DotNetBuildOffline=true + $(StandardSourceBuildArgs) /p:CopySrcInsteadOfClone=true $(StandardSourceBuildArgs) /p:DotNetPackageVersionPropsPath="$(PackageVersionPropsPath)" $(StandardSourceBuildArgs) /p:AdditionalSourceBuiltNupkgCacheDir="$(SourceBuiltPackagesPath)" $(StandardSourceBuildArgs) /p:ReferencePackageNupkgCacheDir="$(ReferencePackagesDir)" diff --git a/src/SourceBuild/tarball/content/repos/Directory.Build.targets b/src/SourceBuild/tarball/content/repos/Directory.Build.targets index 2d16ccc02..f7bf1d2bd 100644 --- a/src/SourceBuild/tarball/content/repos/Directory.Build.targets +++ b/src/SourceBuild/tarball/content/repos/Directory.Build.targets @@ -70,26 +70,6 @@ - - - - - - - - git --work-tree=$(ProjectDirectory) apply --ignore-whitespace --whitespace=nowarn - - - - - - - + - @@ -182,6 +160,12 @@ OldText="_InitializeBuildToolFramework="netcoreapp3.1"" NewText="_InitializeBuildToolFramework="%24{_OverrideArcadeInitializeBuildToolFramework-netcoreapp3.1}"" /> + + + @@ -200,15 +184,6 @@ BuildWithOnlineSources="$(BuildWithOnlineSources)" KeepFeedPrefixes="@(KeepFeedPrefixes)" /> - - - - @@ -513,7 +488,7 @@ - diff --git a/src/SourceBuild/tarball/content/repos/aspnetcore.proj b/src/SourceBuild/tarball/content/repos/aspnetcore.proj index b2dce51f0..8be2152e4 100644 --- a/src/SourceBuild/tarball/content/repos/aspnetcore.proj +++ b/src/SourceBuild/tarball/content/repos/aspnetcore.proj @@ -29,8 +29,7 @@ - + @@ -40,7 +39,7 @@ + BeforeTargets="RepoBuild"> diff --git a/src/SourceBuild/tarball/content/repos/clicommandlineparser.proj b/src/SourceBuild/tarball/content/repos/clicommandlineparser.proj index 6dafc3ec5..e4d90c5ec 100644 --- a/src/SourceBuild/tarball/content/repos/clicommandlineparser.proj +++ b/src/SourceBuild/tarball/content/repos/clicommandlineparser.proj @@ -5,6 +5,8 @@ true $(StandardSourceBuildArgs) $(BuildCommandArgs) $(FlagParameterPrefix)v $(LogVerbosity) + + $(BuildCommandArgs) /p:CheckEolTargetFramework=false $(StandardSourceBuildCommand) $(BuildCommandArgs) $(ProjectDirectory)global.json diff --git a/src/SourceBuild/tarball/content/repos/deployment-tools.proj b/src/SourceBuild/tarball/content/repos/deployment-tools.proj new file mode 100644 index 000000000..7d1bf5785 --- /dev/null +++ b/src/SourceBuild/tarball/content/repos/deployment-tools.proj @@ -0,0 +1,21 @@ + + + + + $(ProjectDirectory)eng\common\build$(ShellExtension) $(StandardSourceBuildArgs) + + $(ProjectDirectory)global.json + $(ProjectDirectory)NuGet.config + false + + + + + + + + + + + + \ No newline at end of file diff --git a/src/SourceBuild/tarball/content/repos/diagnostics.proj b/src/SourceBuild/tarball/content/repos/diagnostics.proj index 71b0b80c6..a46c4d1e7 100644 --- a/src/SourceBuild/tarball/content/repos/diagnostics.proj +++ b/src/SourceBuild/tarball/content/repos/diagnostics.proj @@ -2,7 +2,8 @@ - $(ProjectDirectory)eng\common\build$(ShellExtension) $(StandardSourceBuildArgs) + $(StandardSourceBuildArgs) + $(ProjectDirectory)eng\common\build$(ShellExtension) $(BuildCommandArgs) $(ProjectDirectory)global.json $(ProjectDirectory)NuGet.config diff --git a/src/SourceBuild/tarball/content/repos/installer.proj b/src/SourceBuild/tarball/content/repos/installer.proj index 9f2af5e9a..a3a2f394c 100644 --- a/src/SourceBuild/tarball/content/repos/installer.proj +++ b/src/SourceBuild/tarball/content/repos/installer.proj @@ -62,8 +62,7 @@ - + @@ -98,15 +97,19 @@ AfterTargets="ExtractIntermediatePackages" Inputs="$(MSBuildProjectFullPath)" Outputs="$(RepoCompletedSemaphorePath)CopyTarBall.complete"> + + + $(SourceBuiltAssetsDir)dotnet-sdk-*$(TarBallExtension) + + - + - + - + diff --git a/src/SourceBuild/tarball/content/repos/known-good.proj b/src/SourceBuild/tarball/content/repos/known-good.proj index 6eddb2362..1208a937a 100644 --- a/src/SourceBuild/tarball/content/repos/known-good.proj +++ b/src/SourceBuild/tarball/content/repos/known-good.proj @@ -48,8 +48,13 @@ + + + + + diff --git a/src/SourceBuild/tarball/content/repos/linker.proj b/src/SourceBuild/tarball/content/repos/linker.proj index d006497db..eb0fecf74 100644 --- a/src/SourceBuild/tarball/content/repos/linker.proj +++ b/src/SourceBuild/tarball/content/repos/linker.proj @@ -5,7 +5,9 @@ Microsoft.NET.ILLink.Tasks - $(StandardSourceBuildCommand) $(StandardSourceBuildArgs) + $(StandardSourceBuildArgs) + $(BuildCommandArgs) $(FlagParameterPrefix)warnAsError $(ArcadeFalseBoolBuildArg) + $(StandardSourceBuildCommand) $(BuildCommandArgs) false $(ProjectDirectory)NuGet.config @@ -16,26 +18,6 @@ - - - - diff --git a/src/SourceBuild/tarball/content/repos/nuget-client.proj b/src/SourceBuild/tarball/content/repos/nuget-client.proj index 2186ca8e5..0bb80e91a 100644 --- a/src/SourceBuild/tarball/content/repos/nuget-client.proj +++ b/src/SourceBuild/tarball/content/repos/nuget-client.proj @@ -1,14 +1,7 @@ - - - nuget.client - - - $(ProjectDirectory)src/NuGet.Core/ - $(ProjectDirectory)cli/ $(KeysDir)NuGet.Client.snk false true @@ -18,50 +11,17 @@ - - + - + + + $(StandardSourceBuildArgs) + + $(ProjectDirectory)eng/source-build/build$(ShellExtension) $(BuildCommandArgs) + + - - - $(DotnetToolCommand) msbuild $(ProjectDirectory)/build/build.proj - $(BuildCommandBase) /p:VisualStudioVerion=15.0 - $(BuildCommandBase) /p:Configuration=$(Configuration) - $(BuildCommandBase) /p:BuildRTM=false - $(BuildCommandBase) /p:BuildNumber=$(OfficialBuildId) - $(BuildCommandBase) /v:$(LogVerbosity) - $(BuildCommandBase) /p:TreatWarningsAsErrors=false - $(BuildCommandBase) /p:DotNetPackageVersionPropsPath=$(PackageVersionPropsPath) - - - - - - - - $(BuildCommandBase) /t:PackXPlat - $(PackCommand) /p:PackageOutputPath=$(PackagesOutput) - $(PackCommand) /p:NoPackageAnalysis=true - $(PackCommand) /flp:v=detailed - $(PackCommand) /v:$(LogVerbosity) - $(PackCommand) /bl:pack.binlog - $(PackCommand) $(RedirectRepoOutputToLog) - - - - - diff --git a/src/SourceBuild/tarball/content/repos/roslyn-analyzers.proj b/src/SourceBuild/tarball/content/repos/roslyn-analyzers.proj index 2880c054d..3c7dc4453 100644 --- a/src/SourceBuild/tarball/content/repos/roslyn-analyzers.proj +++ b/src/SourceBuild/tarball/content/repos/roslyn-analyzers.proj @@ -2,30 +2,27 @@ - --restore --build --pack - $(BuildCommandArgs) --configuration $(Configuration) - $(BuildCommandArgs) -v $(LogVerbosity) - $(BuildCommandArgs) -bl - $(BuildCommandArgs) -warnaserror false - $(BuildCommandArgs) /p:TreatWarningsAsErrors=false - - - $(BuildCommandArgs) /p:OfficialBuild=true - $(BuildCommandArgs) /p:DotNetPackageVersionPropsPath=$(PackageVersionPropsPath) - $(BuildCommandArgs) /p:DotNetBuildFromSource=true - $(BuildCommandArgs) /p:GitHubRepositoryName=roslyn-analyzers - $(BuildCommandArgs) /p:RepositoryUrl=git://github.com/dotnet/roslyn-analyzers - - $(ProjectDirectory)build$(ShellExtension) $(BuildCommandArgs) + + $(StandardSourceBuildArgs.Replace('/p:DotNetPackageVersionPropsPath="$(PackageVersionPropsPath)"', '')) + $(BuildCommandArgs) $(FlagParameterPrefix)warnAsError $(ArcadeFalseBoolBuildArg) + $(BuildCommandArgs) /p:SourceBuildPackageVersionPropsPath="$(PackageVersionPropsPath)" + $(StandardSourceBuildCommand) $(BuildCommandArgs) false - true + false true $(ProjectDirectory)global.json - + + + + + diff --git a/src/SourceBuild/tarball/content/repos/sdk.proj b/src/SourceBuild/tarball/content/repos/sdk.proj index 8a55e87c1..9cb477726 100644 --- a/src/SourceBuild/tarball/content/repos/sdk.proj +++ b/src/SourceBuild/tarball/content/repos/sdk.proj @@ -38,12 +38,11 @@ - - + + + diff --git a/src/SourceBuild/tarball/content/repos/xliff-tasks.proj b/src/SourceBuild/tarball/content/repos/xliff-tasks.proj index 9f063dcf4..7964fabdc 100644 --- a/src/SourceBuild/tarball/content/repos/xliff-tasks.proj +++ b/src/SourceBuild/tarball/content/repos/xliff-tasks.proj @@ -2,7 +2,10 @@ - $(StandardSourceBuildCommand) $(StandardSourceBuildArgs) + $(StandardSourceBuildArgs) + + $(BuildCommandArgs) /p:CheckEolTargetFramework=false + $(StandardSourceBuildCommand) $(BuildCommandArgs) false true diff --git a/src/SourceBuild/tarball/content/smoke-test.sh b/src/SourceBuild/tarball/content/smoke-test.sh index cdfdacad6..4d2ec772f 100755 --- a/src/SourceBuild/tarball/content/smoke-test.sh +++ b/src/SourceBuild/tarball/content/smoke-test.sh @@ -3,10 +3,10 @@ set -euo pipefail SCRIPT_ROOT="$(cd -P "$( dirname "$0" )" && pwd)" TARBALL_PREFIX=dotnet-sdk- -VERSION_PREFIX=5.0 +VERSION_PREFIX=6.0 # See https://github.com/dotnet/source-build/issues/579, this version # 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 executingUserHome=${HOME:-} @@ -32,6 +32,9 @@ case $cpuName in i686) buildArch=x86 ;; + s390x) + buildArch=s390x + ;; *) echo "Unknown CPU $cpuName detected, treating it as x64" buildArch=x64 @@ -154,7 +157,7 @@ while :; do shift done -prodConBlobFeedUrl="${prodConBlobFeedUrl-$(cat "$SCRIPT_ROOT/ProdConFeed.txt")}" +prodConBlobFeedUrl="${prodConBlobFeedUrl-}" function doCommand() { lang=$1 @@ -164,8 +167,11 @@ function doCommand() { echo "starting language $lang, type $proj" | tee -a smoke-test.log 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" @@ -199,7 +205,7 @@ function doCommand() { binlogHttpsPart="https" fi - binlogPrefix="$testingDir/${lang}_${proj}_${binlogOnlinePart}_${binlogHttpsPart}_" + binlogPrefix="$testingDir/${projectDir}_${binlogOnlinePart}_${binlogHttpsPart}_" binlog="${binlogPrefix}$1.binlog" echo " running $1" | tee -a "$logFile" @@ -269,7 +275,7 @@ function doCommand() { cd .. if [ "$keepProjects" == "false" ]; then - rm -rf "${lang}_${proj}" + rm -rf "${projectDir}" fi echo "finished language $lang, type $proj" | tee -a smoke-test.log @@ -506,6 +512,129 @@ function runXmlDocTests() { System.Xml.Serialization.xml System.Xml.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 @@ -530,6 +659,16 @@ function runXmlDocTests() { fi done 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 error=1 echo "error: missing $xmlDocFile" diff --git a/src/SourceBuild/tarball/content/smoke-testNuGet.Config b/src/SourceBuild/tarball/content/smoke-testNuGet.Config index 07754412d..7dee71e3e 100644 --- a/src/SourceBuild/tarball/content/smoke-testNuGet.Config +++ b/src/SourceBuild/tarball/content/smoke-testNuGet.Config @@ -15,5 +15,6 @@ + diff --git a/src/SourceBuild/tarball/content/tools-local/init-build.proj b/src/SourceBuild/tarball/content/tools-local/init-build.proj index 366b2f47d..3835e019c 100644 --- a/src/SourceBuild/tarball/content/tools-local/init-build.proj +++ b/src/SourceBuild/tarball/content/tools-local/init-build.proj @@ -24,7 +24,7 @@ BuildXPlatTasks; ExtractToolPackage; GenerateRootFs; - ApplyPatches; + BuildTextOnlyPackages; PoisonPrebuiltPackages" /> @@ -58,7 +58,7 @@ - @@ -78,7 +78,6 @@ - ]]> @@ -109,17 +108,6 @@ - - - - - - - - - - - @@ -134,6 +122,13 @@ + + + + - diff --git a/src/SourceBuild/tarball/patches/arcade/0005-Build-Microsoft.DotNet.Build.Tasks.Workloads-for-net.patch b/src/SourceBuild/tarball/patches/arcade/0005-Build-Microsoft.DotNet.Build.Tasks.Workloads-for-net.patch new file mode 100644 index 000000000..f14acf094 --- /dev/null +++ b/src/SourceBuild/tarball/patches/arcade/0005-Build-Microsoft.DotNet.Build.Tasks.Workloads-for-net.patch @@ -0,0 +1,41 @@ +From 3610fdc1ac6437973d539177c1427ed7f4f65c2e Mon Sep 17 00:00:00 2001 +From: Michael Simons +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 @@ + + + net472;netcoreapp3.1 ++ net6.0 + true + Latest + true +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 + diff --git a/src/SourceBuild/tarball/patches/arcade/0005-Patch-sdk.props-to-target-net6.0.patch b/src/SourceBuild/tarball/patches/arcade/0005-Patch-sdk.props-to-target-net6.0.patch new file mode 100644 index 000000000..5141348f2 --- /dev/null +++ b/src/SourceBuild/tarball/patches/arcade/0005-Patch-sdk.props-to-target-net6.0.patch @@ -0,0 +1,26 @@ +From 676bb5aa455dcf877c78792e4e5a62ca6a1d72c1 Mon Sep 17 00:00:00 2001 +From: Michael Simons +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 @@ + --> + + +- $(MSBuildThisFileDirectory)../tools/netcoreapp3.1/ ++ $(MSBuildThisFileDirectory)../tools/net6.0/ + $(MSBuildThisFileDirectory)../tools/net472/ + + +-- +2.29.2 + diff --git a/src/SourceBuild/tarball/patches/arcade/0007-Respond-to-WorkloadDefinition-breaking-API-change.patch b/src/SourceBuild/tarball/patches/arcade/0007-Respond-to-WorkloadDefinition-breaking-API-change.patch new file mode 100644 index 000000000..acb46223f --- /dev/null +++ b/src/SourceBuild/tarball/patches/arcade/0007-Respond-to-WorkloadDefinition-breaking-API-change.patch @@ -0,0 +1,25 @@ +From 4577f60202649281d2c96c4d8b67d331b7e71c35 Mon Sep 17 00:00:00 2001 +From: Michael Simons +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 GetWorkloadPacks() + // platform includes Windows + var workloads = manifests.SelectMany(m => m.Workloads). + Select(w => w.Value). ++ OfType(). + 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 + diff --git a/src/SourceBuild/tarball/patches/arcade/0008-Bootstrapping-workaround.patch b/src/SourceBuild/tarball/patches/arcade/0008-Bootstrapping-workaround.patch new file mode 100644 index 000000000..6aba415a7 --- /dev/null +++ b/src/SourceBuild/tarball/patches/arcade/0008-Bootstrapping-workaround.patch @@ -0,0 +1,32 @@ +From 1d34d8396b9c2968163802036ed102e18ef14605 Mon Sep 17 00:00:00 2001 +From: Michael Simons +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 @@ + false + + ++ ++ $(NoWarn);NU1603 ++ ++ + + ++ ++ false ++ ++ + + + true +-- +2.29.2 + diff --git a/src/SourceBuild/tarball/patches/nuget-client/0002-Update-netcoreapp-TFMs-to-6.0.patch b/src/SourceBuild/tarball/patches/nuget-client/0002-Update-netcoreapp-TFMs-to-6.0.patch new file mode 100644 index 000000000..6be953ae4 --- /dev/null +++ b/src/SourceBuild/tarball/patches/nuget-client/0002-Update-netcoreapp-TFMs-to-6.0.patch @@ -0,0 +1,53 @@ +From e0e1d72dfa8881244a76c3dbcc63aa73c05546f4 Mon Sep 17 00:00:00 2001 +From: Michael Simons +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 @@ + PackageReference + v4.7.2 + net472 +- netcoreapp2.1 ++ net6.0 + netcoreapp5.0 + $(DotNetBuildFromSource) +- netstandard2.0 ++ net6.0 + $(NETFXTargetFramework);$(NETCoreTargetFramework) + $(NETCoreTargetFramework) +- $(TargetFrameworksExe);netcoreapp5.0 +- $(NETCoreTargetFramework);netcoreapp5.0 ++ $(TargetFrameworksExe);net6.0 ++ $(NETCoreTargetFramework);net6.0 + $(NETFXTargetFramework);$(NetStandardVersion) + $(NetStandardVersion) +- $(TargetFrameworksLibrary);netcoreapp5.0 ++ $(TargetFrameworksLibrary);net6.0 + $(NETFXTargetFramework);netcoreapp5.0 + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'README.md'))\ + $(RepositoryRootDirectory)build\ +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 @@ + true + + +- ++ + $(DefineConstants);IS_CORECLR + true + +-- +2.29.2 + diff --git a/src/SourceBuild/tarball/patches/nuget-client/0003-Use-source-built-Microsoft.Web.Xdt-System.ComponentM.patch b/src/SourceBuild/tarball/patches/nuget-client/0003-Use-source-built-Microsoft.Web.Xdt-System.ComponentM.patch new file mode 100644 index 000000000..714b0ea00 --- /dev/null +++ b/src/SourceBuild/tarball/patches/nuget-client/0003-Use-source-built-Microsoft.Web.Xdt-System.ComponentM.patch @@ -0,0 +1,43 @@ +From fecc40e502197e65804177b2aec49a7a5422ed6e Mon Sep 17 00:00:00 2001 +From: Davis Goodin +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 @@ + 2.4.1 + + ++ ++ ++ 3.0.0 ++ 4.5.0 ++ ++ + + + +@@ -42,10 +48,10 @@ + + + +- ++ + + +- ++ + +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 @@ + + + +- ++ + + +-- +2.29.2 + diff --git a/src/SourceBuild/tarball/content/patches/sdk/0002-NoWarn-NU1605-until-DeploymentTools-is-in-SourceBuil.patch b/src/SourceBuild/tarball/patches/sdk/0002-NoWarn-NU1605-until-DeploymentTools-is-in-SourceBuil.patch similarity index 100% rename from src/SourceBuild/tarball/content/patches/sdk/0002-NoWarn-NU1605-until-DeploymentTools-is-in-SourceBuil.patch rename to src/SourceBuild/tarball/patches/sdk/0002-NoWarn-NU1605-until-DeploymentTools-is-in-SourceBuil.patch diff --git a/src/SourceBuild/tarball/patches/templating/0001-pin-nuget-versions.patch b/src/SourceBuild/tarball/patches/templating/0001-pin-nuget-versions.patch new file mode 100644 index 000000000..a78c3d97f --- /dev/null +++ b/src/SourceBuild/tarball/patches/templating/0001-pin-nuget-versions.patch @@ -0,0 +1,30 @@ +From c0ec49b887cae58bb860a18982115c5910f29821 Mon Sep 17 00:00:00 2001 +From: MichaelSimons +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 @@ + + + +- +- +- ++ ++ ++ + + + +-- +2.29.2 + diff --git a/src/SourceBuild/tarball/patches/vstest/0001-Drop-vstest.console-netcoreapp2.1-support.patch b/src/SourceBuild/tarball/patches/vstest/0001-Drop-vstest.console-netcoreapp2.1-support.patch new file mode 100644 index 000000000..aa1e198cc --- /dev/null +++ b/src/SourceBuild/tarball/patches/vstest/0001-Drop-vstest.console-netcoreapp2.1-support.patch @@ -0,0 +1,26 @@ +From 752ab8ab199bd1d99353658cb676a6612508333b Mon Sep 17 00:00:00 2001 +From: Michael Simons +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 @@ + + vstest.console + netcoreapp2.1;net451 +- netcoreapp2.1;net6.0 ++ net6.0 + true + Exe + false +-- +2.29.2 + diff --git a/src/finalizer/CMakeLists.txt b/src/finalizer/CMakeLists.txt index fe1b531ea..bdb26d893 100644 --- a/src/finalizer/CMakeLists.txt +++ b/src/finalizer/CMakeLists.txt @@ -31,6 +31,7 @@ target_link_libraries(Finalizer shell32.lib) target_link_libraries(Finalizer advapi32.lib) target_link_libraries(Finalizer version.lib) target_link_libraries(Finalizer msi.lib) +target_link_libraries(Finalizer pathcch.lib) # Add WiX libraries target_link_libraries(Finalizer wcautil.lib) diff --git a/src/finalizer/README.md b/src/finalizer/README.md new file mode 100644 index 000000000..e4b4ffa79 --- /dev/null +++ b/src/finalizer/README.md @@ -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` diff --git a/src/finalizer/finalizer.cpp b/src/finalizer/finalizer.cpp index 4f215de40..0d1df6193 100644 --- a/src/finalizer/finalizer.cpp +++ b/src/finalizer/finalizer.cpp @@ -38,6 +38,110 @@ LExit: 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) { 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. 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."); // 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); 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; } - LogStringLine(REPORT_STANDARD, "SDK with feature band %ls could not be found.", sczFeatureBandVersion); - hr = ::RemoveDependent(sczDependent, &bRestartRequired); ExitOnFailure(hr, "Failed to remove dependent \"%ls\".", sczDependent); + hr = ::DeleteWorkloadRecords(sczFeatureBandVersion, argv[3]); + ExitOnFailure(hr, "Failed to remove workload records."); + if (bRestartRequired) { dwExitCode = ERROR_SUCCESS_REBOOT_REQUIRED; diff --git a/src/finalizer/precomp.h b/src/finalizer/precomp.h index 92e713d52..1a6cd5df0 100644 --- a/src/finalizer/precomp.h +++ b/src/finalizer/precomp.h @@ -11,6 +11,7 @@ #include #include #include +#include // Configure some logging parameters for WiX #define ExitTrace LogErrorString @@ -22,5 +23,6 @@ #include "dutil.h" #include "regutil.h" #include "logutil.h" +#include "pathutil.h" #include "strutil.h" #include "wiutil.h" diff --git a/src/finalizer_shim/finalizer_shim.csproj b/src/finalizer_shim/finalizer_shim.csproj index 1f378f56b..ad9af2548 100644 --- a/src/finalizer_shim/finalizer_shim.csproj +++ b/src/finalizer_shim/finalizer_shim.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/redist/targets/BundledManifests.targets b/src/redist/targets/BundledManifests.targets index c7857a065..043468d9f 100644 --- a/src/redist/targets/BundledManifests.targets +++ b/src/redist/targets/BundledManifests.targets @@ -1,5 +1,4 @@ - diff --git a/src/redist/targets/Crossgen.targets b/src/redist/targets/Crossgen.targets index b6bf16790..284b2a593 100644 --- a/src/redist/targets/Crossgen.targets +++ b/src/redist/targets/Crossgen.targets @@ -1,6 +1,7 @@ + diff --git a/src/redist/targets/GenerateBundledVersions.targets b/src/redist/targets/GenerateBundledVersions.targets index a3e85ae0c..369eeecec 100644 --- a/src/redist/targets/GenerateBundledVersions.targets +++ b/src/redist/targets/GenerateBundledVersions.targets @@ -26,8 +26,8 @@ 30 - 19 - 10 + 20 + 11 @@ -113,7 +113,7 @@ @@ -195,7 +195,7 @@ - + diff --git a/src/redist/targets/GenerateDebs.targets b/src/redist/targets/GenerateDebs.targets index a8b5f5540..7135c8672 100644 --- a/src/redist/targets/GenerateDebs.targets +++ b/src/redist/targets/GenerateDebs.targets @@ -86,6 +86,7 @@ + @@ -230,7 +231,7 @@ Condition=" '$(IsDebianBaseDistro)' == 'True' AND '$(DebuildPresent)' == 'true' " DependsOnTargets="PrepareDotnetDebDirectories; GetAspNetSharedFxInstallArgs;" - Inputs="@(CLISdkFiles);@(TemplatesFiles)" + Inputs="@(CLISdkFiles);@(TemplatesFiles);@(ManifestFiles)" Outputs="$(SdkDebInstallerFile)" > @@ -259,6 +260,14 @@ SkipUnchangedFiles="False" UseHardlinksIfPossible="False" /> + + + + + + + + @@ -535,6 +542,7 @@ LayoutRuntimeGraph; LayoutTemplates; LayoutManifests; + LayoutWorkloadUserLocalMarker; LayoutBundledTools; RetargetTools; CrossgenLayout; diff --git a/src/redist/targets/GenerateMSIs.targets b/src/redist/targets/GenerateMSIs.targets index 667dccd6d..c4d4b28ba 100644 --- a/src/redist/targets/GenerateMSIs.targets +++ b/src/redist/targets/GenerateMSIs.targets @@ -2,7 +2,8 @@ netcoreapp3.1 - net6.0 + net6.0 + net6.0 net472 $(NuGetPackageRoot)microsoft.dotnet.build.tasks.installers\$(MicrosoftDotNetBuildTasksInstallersPackageVersion)\tools\$(MicrosoftDotNetBuildTasksInstallersTaskTargetFramework)\Microsoft.DotNet.Build.Tasks.Installers.dll @@ -12,8 +13,8 @@ - 3.14.0.4118 - https://dotnetcli.azureedge.net/build/wix/wix.$(WixVersion).zip + 1.0.0-v3.14.0.4118 + https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/wix/Microsoft.Signed.Wix-$(WixVersion).zip $(ArtifactsDir)Tools/WixTools/$(WixVersion) $(WixRoot)/WixTools.$(WixVersion).zip $(WixRoot)/WixDownload.$(WixVersion).sentinel @@ -179,6 +180,7 @@ + + @@ -305,6 +308,7 @@ + diff --git a/src/redist/targets/GeneratePKG.targets b/src/redist/targets/GeneratePKG.targets index 700ee7ab7..39a79152d 100644 --- a/src/redist/targets/GeneratePKG.targets +++ b/src/redist/targets/GeneratePKG.targets @@ -14,6 +14,7 @@ com.microsoft.dotnet.dev.$(Version).osx.$(Architecture) /usr/local/share/dotnet + /usr/local/share/dotnet/x64 $(MSBuildThisFileDirectory)packaging/osx/clisdk $(SdkPkgSourcesRootDirectory)/scripts @@ -22,7 +23,8 @@ $(SdkPkgDestinationScriptsDirectory)/postinstall $(PkgIntermediateDirectory)/resources - $(SdkPkgSourcesRootDirectory)/Distribution-Template + $(SdkPkgSourcesRootDirectory)/Distribution-Template + $(SdkPkgSourcesRootDirectory)/Distribution-Template-x64 $(PkgIntermediateDirectory)/CLI-SDK-Formatted-Distribution-Template.xml $(PkgIntermediateDirectory)/$(SdkComponentId).pkg @@ -96,6 +98,9 @@ 10.13 11.0 + + $(x64EmulationPkgInstallDirectory) + $(Version) diff --git a/src/redist/targets/GenerateRPMs.targets b/src/redist/targets/GenerateRPMs.targets index 757f9491e..935684431 100644 --- a/src/redist/targets/GenerateRPMs.targets +++ b/src/redist/targets/GenerateRPMs.targets @@ -34,12 +34,14 @@ + + @@ -57,6 +59,12 @@ SkipUnchangedFiles="False" UseHardlinksIfPossible="False"/> + + + + $(RedistLayoutPath)templates/ $(ArtifactsShippingPackagesDir)$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension) $(SdkRPMInstallerFile) + $(ArtifactsShippingPackagesDir)$(MarinerArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension) $(RepoRoot)/Documentation/manpages $(RepoRoot)/test/EndToEnd/EndToEnd.csproj @@ -198,6 +213,7 @@ $(RpmLayoutDirectory)package_root $(RpmLayoutPackageRoot)/sdk $(RpmLayoutPackageRoot)/templates + $(RpmLayoutPackageRoot)/sdk-manifests $(RpmLayoutDirectory)docs $(RpmLayoutDirectory)templates $(RpmLayoutDirectory)scripts diff --git a/src/redist/targets/GetRuntimeInformation.targets b/src/redist/targets/GetRuntimeInformation.targets index e27b4b712..259cb1398 100644 --- a/src/redist/targets/GetRuntimeInformation.targets +++ b/src/redist/targets/GetRuntimeInformation.targets @@ -39,6 +39,7 @@ Changing "ProductBandCombinedHostHostFxrFrameworkSdkName" mid-product-band will break the upgradability of the SDK bundle installer. --> Dotnet SDK Bundle Installer $(CliProductBandVersion) $(ProductMonikerRid) $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(Version)-$(Architecture) + $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(Version)-cm.1-$(Architecture) diff --git a/src/redist/targets/packaging/osx/clisdk/Distribution-Template-x64 b/src/redist/targets/packaging/osx/clisdk/Distribution-Template-x64 new file mode 100644 index 000000000..cbd637311 --- /dev/null +++ b/src/redist/targets/packaging/osx/clisdk/Distribution-Template-x64 @@ -0,0 +1,101 @@ + + + {CLISdkBrandName} ({arch}) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {NetCoreAppTargetingPackComponentId}.pkg + {NetStandardTargetingPackComponentId}.pkg + {NetCoreAppHostPackComponentId}.pkg + {SharedFxComponentId}.pkg + {HostFxrComponentId}.pkg + {SharedHostComponentId}.pkg + {CLISdkComponentId}.pkg + + diff --git a/src/redist/targets/packaging/windows/clisdk/registrykeys.wxs b/src/redist/targets/packaging/windows/clisdk/registrykeys.wxs index f47cfca05..c6f44ccc3 100644 --- a/src/redist/targets/packaging/windows/clisdk/registrykeys.wxs +++ b/src/redist/targets/packaging/windows/clisdk/registrykeys.wxs @@ -16,5 +16,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NOT DOTNETHOME_X86 AND DOTNETHOME_X86_SEARCH + + + NOT DOTNETHOME_X64 AND DOTNETHOME_X64_SEARCH AND %PROCESSOR_ARCHITECTURE="AMD64" + + + NOT DOTNETHOME_X64 AND DOTNETHOME_X64_ALT_SEARCH AND NOT %PROCESSOR_ARCHITECTURE="AMD64" + + + NOT DOTNETHOME_ARM64 AND DOTNETHOME_ARM64_SEARCH + + diff --git a/test/EndToEnd/ProjectBuildTests.cs b/test/EndToEnd/ProjectBuildTests.cs index 3b6bb7056..b8aaaaf9c 100644 --- a/test/EndToEnd/ProjectBuildTests.cs +++ b/test/EndToEnd/ProjectBuildTests.cs @@ -113,7 +113,7 @@ namespace EndToEnd.Tests .WithWorkingDirectory(projectDirectory) .Execute(publishArgs) .Should().Pass(); - + var selfContainedPublishDir = new DirectoryInfo(projectDirectory) .Sub("bin").Sub("Debug").GetDirectories().FirstOrDefault() .Sub("win-arm64").Sub("publish"); @@ -121,7 +121,7 @@ namespace EndToEnd.Tests selfContainedPublishDir.Should().HaveFilesMatching("System.Windows.Forms.dll", SearchOption.TopDirectoryOnly); selfContainedPublishDir.Should().HaveFilesMatching($"{directory.Name}.dll", SearchOption.TopDirectoryOnly); } - + [WindowsOnlyFact] public void ItCanPublishArm64Wpf() { @@ -176,7 +176,7 @@ namespace EndToEnd.Tests public void DotnetNewShowsCuratedListCorrectly() { string locale = System.Threading.Thread.CurrentThread.CurrentUICulture.Name; - if (!string.IsNullOrWhiteSpace(locale) + if (!string.IsNullOrWhiteSpace(locale) && !locale.StartsWith("en", StringComparison.OrdinalIgnoreCase)) { Console.WriteLine($"[{nameof(DotnetNewShowsCuratedListCorrectly)}] CurrentUICulture: {locale}"); @@ -258,7 +258,7 @@ namespace EndToEnd.Tests /// /// 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 /// [Theory] [InlineData("console")] diff --git a/test/SdkTests/TestConfig.xml b/test/SdkTests/TestConfig.xml index 7f25ca27a..30ef0caae 100644 --- a/test/SdkTests/TestConfig.xml +++ b/test/SdkTests/TestConfig.xml @@ -145,5 +145,174 @@ Skip="true" Issue="" Reason="https://github.com/dotnet/installer/pull/8966#issuecomment-721111308"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +