From d8808e42045676fd9b588d530f0145d47fe84ea9 Mon Sep 17 00:00:00 2001 From: YuliiaKovalova Date: Wed, 25 Jan 2023 12:30:08 +0100 Subject: [PATCH 1/3] add tests for covering adding item templates (C# and VB) --- test/EndToEnd/ProjectBuildTests.cs | 85 ++++++++++++++++++++++++------ 1 file changed, 69 insertions(+), 16 deletions(-) diff --git a/test/EndToEnd/ProjectBuildTests.cs b/test/EndToEnd/ProjectBuildTests.cs index ec6684750379..a19309b52064 100644 --- a/test/EndToEnd/ProjectBuildTests.cs +++ b/test/EndToEnd/ProjectBuildTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices; @@ -115,7 +116,7 @@ public void ItCanPublishArm64Winforms(string TargetFramework) .Execute(newArgs) .Should().Pass(); - string publishArgs="-r win-arm64"; + string publishArgs = "-r win-arm64"; new PublishCommand() .WithWorkingDirectory(projectDirectory) .Execute(publishArgs) @@ -149,7 +150,7 @@ public void ItCanPublishArm64Wpf(string TargetFramework) .Execute(newArgs) .Should().Pass(); - string publishArgs="-r win-arm64"; + string publishArgs = "-r win-arm64"; new PublishCommand() .WithWorkingDirectory(projectDirectory) .Execute(publishArgs) @@ -248,6 +249,47 @@ public void ItCanCreateItemTemplate(string templateName) Assert.True(directory.EnumerateFileSystemInfos().Any()); } + [Theory] + // microsoft.dotnet.common.itemtemplates templates + [InlineData("class")] + [InlineData("struct")] + [InlineData("enum")] + [InlineData("record")] + [InlineData("interface")] + [InlineData("class", "C#")] + [InlineData("class", "VB")] + [InlineData("struct", "VB")] + [InlineData("enum", "VB")] + [InlineData("interface", "VB")] + public void ItCanCreateItemTemplateWithProjectRestriction(string templateName, string language = "") + { + var languageExtensionMap = new Dictionary() + { + { "", ".cs" }, + { "C#", ".cs" }, + { "VB", ".vb" } + }; + + DirectoryInfo directory = InstantiateProjectTemplate("classlib", language, withNoRestore: false); + string projectDirectory = directory.FullName; + string expectedItemName = $"TestItem_{templateName}"; + string newArgs = $"{templateName} --name {expectedItemName} --debug:ephemeral-hive"; + if (!string.IsNullOrWhiteSpace(language)) + { + newArgs += $" --language {language}"; + } + + new NewCommandShim() + .WithWorkingDirectory(projectDirectory) + .Execute(newArgs) + .Should().Pass(); + + //check if the template created files + Assert.True(directory.Exists); + Assert.True(directory.EnumerateFileSystemInfos().Any()); + Assert.True(directory.GetFile($"{expectedItemName}.{languageExtensionMap[language]}") != null); + } + [WindowsOnlyTheory] [InlineData("wpf", Skip = "https://github.com/dotnet/wpf/issues/2363")] [InlineData("winforms", Skip = "https://github.com/dotnet/wpf/issues/2363")] @@ -402,20 +444,9 @@ private static string DetectExpectedDefaultFramework(string template = "") private static void TestTemplateCreateAndBuild(string templateName, bool build = true, bool selfContained = false, string language = "", string framework = "") { - DirectoryInfo directory = TestAssets.CreateTestDirectory(identifier: string.IsNullOrWhiteSpace(language) ? templateName : $"{templateName}[{language}]"); + DirectoryInfo directory = InstantiateProjectTemplate(templateName, language); string projectDirectory = directory.FullName; - string newArgs = $"{templateName} --debug:ephemeral-hive --no-restore"; - if (!string.IsNullOrWhiteSpace(language)) - { - newArgs += $" --language {language}"; - } - - new NewCommandShim() - .WithWorkingDirectory(projectDirectory) - .Execute(newArgs) - .Should().Pass(); - if (!string.IsNullOrWhiteSpace(framework)) { //check if MSBuild TargetFramework property for *proj is set to expected framework @@ -439,13 +470,13 @@ private static void TestTemplateCreateAndBuild(string templateName, bool build = { buildArgs += $" --framework {framework}"; } - + // Remove this (or formalize it) after https://github.com/dotnet/installer/issues/12479 is resolved. if (language == "F#") { buildArgs += $" /p:_NETCoreSdkIsPreview=true"; } - + string dotnetRoot = Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest); new BuildCommand() .WithEnvironmentVariable("PATH", dotnetRoot) // override PATH since razor rely on PATH to find dotnet @@ -454,5 +485,27 @@ private static void TestTemplateCreateAndBuild(string templateName, bool build = .Should().Pass(); } } + + private static DirectoryInfo InstantiateProjectTemplate(string templateName, string language = "", bool withNoRestore = true) + { + DirectoryInfo directory = TestAssets.CreateTestDirectory( + identifier: string.IsNullOrWhiteSpace(language) + ? templateName + : $"{templateName}[{language}]"); + string projectDirectory = directory.FullName; + + string newArgs = $"{templateName} --debug:ephemeral-hive {(withNoRestore ? "--no-restore" : "")}"; + if (!string.IsNullOrWhiteSpace(language)) + { + newArgs += $" --language {language}"; + } + + new NewCommandShim() + .WithWorkingDirectory(projectDirectory) + .Execute(newArgs) + .Should().Pass(); + + return directory; + } } } From de2469ee6b59f27e62e6876dd184d162ff752d3d Mon Sep 17 00:00:00 2001 From: YuliiaKovalova Date: Mon, 30 Jan 2023 14:07:33 +0100 Subject: [PATCH 2/3] include sdk updates --- eng/Version.Details.xml | 42 ++++++++++++++++++++--------------------- eng/Versions.props | 8 ++++---- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e2d2b72a7e48..ad3f5f7ef70a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -98,22 +98,22 @@ bb3695688177f5f80eeb3c0498168612e31549d5 - + https://github.com/dotnet/sdk - b3d3ae6773f6015c1b0713de52bb66d2152c3da9 + cc1eef3b839cf0a24efdbbbebce81560594761ab - + https://github.com/dotnet/sdk - b3d3ae6773f6015c1b0713de52bb66d2152c3da9 + cc1eef3b839cf0a24efdbbbebce81560594761ab - + https://github.com/dotnet/sdk - b3d3ae6773f6015c1b0713de52bb66d2152c3da9 + cc1eef3b839cf0a24efdbbbebce81560594761ab - + https://github.com/dotnet/sdk - b3d3ae6773f6015c1b0713de52bb66d2152c3da9 + cc1eef3b839cf0a24efdbbbebce81560594761ab @@ -124,34 +124,34 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-wpf 636e2b7a00a434a354a126f510a56e16ce3c6bbc - + https://github.com/dotnet/fsharp - 6ebe669cd147075a2e66699cf4e1b1a338f89fe5 + a19fbdde1cd6e120f01493c4a9488622944f627f - + https://github.com/dotnet/fsharp - 6ebe669cd147075a2e66699cf4e1b1a338f89fe5 + a19fbdde1cd6e120f01493c4a9488622944f627f - + https://github.com/microsoft/vstest - 5e9c3debd9d0007c53e7510ac030ea5e8fc483f4 + d8ee1c1b86aeaaa44d2bbef3d9f5a89acd0c0eed - + https://github.com/dotnet/linker - 19fa656d35252ccf926e6a6d783b16a2f094aaef + de8bf14fcdfb55f2bae3db8cfc310ddd8ee921e6 linker - + https://github.com/dotnet/roslyn - 7061c64ddbd931d55b9a97f95243fcf91d04d7b1 + 5964d1a8e82d7a6e27b3b31bc1d6e44d0a2127b4 - + https://github.com/dotnet/msbuild - 98924b86bbc19aff3360f9cc3a2922df6a5c5d6a + 5f95887e07c8173b1c24c26c791e3ade924a4e8d @@ -217,4 +217,4 @@ - + \ No newline at end of file diff --git a/eng/Versions.props b/eng/Versions.props index 47414d52ba5c..cb725bc366c4 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,9 +63,9 @@ - 7.0.300-preview.23068.2 - 7.0.300-preview.23068.2 - 7.0.300-preview.23068.2 + 7.0.300-preview.23080.2 + 7.0.300-preview.23080.2 + 7.0.300-preview.23080.2 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) @@ -171,7 +171,7 @@ 2.2.0-beta.19072.10 2.0.0 - 17.6.0-preview-20230117-02 + 17.6.0-preview-20230126-02 From 87e5e2e100b2ddca394289c87c2442411fad9246 Mon Sep 17 00:00:00 2001 From: YuliiaKovalova Date: Tue, 14 Feb 2023 12:48:27 +0100 Subject: [PATCH 3/3] merge --- eng/AfterSigning.targets | 24 +++++ eng/Version.Details.xml | 58 ++++++------ eng/Versions.props | 12 +-- eng/common/generate-locproject.ps1 | 48 +++++++++- eng/common/loc/P22DotNetHtmlLocalization.lss | Bin 0 -> 3810 bytes eng/common/templates/job/execute-sdl.yml | 3 +- eng/common/templates/job/onelocbuild.yml | 43 +++++---- .../templates/job/publish-build-assets.yml | 14 ++- eng/common/templates/job/source-build.yml | 7 +- .../templates/job/source-index-stage1.yml | 5 +- eng/common/templates/jobs/jobs.yml | 9 -- .../templates/post-build/post-build.yml | 12 ++- .../templates/variables/pool-providers.yml | 57 ++++++++++++ global.json | 4 +- .../job/source-build-build-tarball.yml | 29 ++++++ .../job/source-build-run-tarball-build.yml | 24 ++++- .../src/Tarball_WriteSourceRepoProperties.cs | 1 - .../tools/SourceBuildArcadeTarball.targets | 4 - .../tarball/content/Directory.Build.props | 31 ++----- .../bootstrap/OverrideBootstrapVersions.props | 4 + .../buildBootstrapPreviouslySB.csproj | 70 +++++++++----- .../pipelines/security-partners-dotnet.yml | 16 +++- src/SourceBuild/tarball/content/global.json | 2 +- .../content/repos/Directory.Build.props | 4 +- .../tarball/content/repos/aspnetcore.proj | 1 + .../tarball/content/repos/fsharp.proj | 1 - .../tarball/content/repos/installer.proj | 2 +- .../tarball/content/repos/known-good.proj | 1 - .../content/repos/package-source-build.proj | 2 +- .../content/repos/runtime-portable.proj | 47 ---------- .../content/repos/runtime.common.props | 47 ---------- .../content/repos/runtime.common.targets | 46 ---------- .../tarball/content/repos/runtime.proj | 86 +++++++++++++++++- .../tarball/content/repos/sdk.proj | 3 + .../source-build-reference-packages.proj | 6 +- .../tarball/content/repos/xliff-tasks.proj | 2 - .../content/tools-local/init-build.proj | 12 +++ ...ess-Microsoft.Build.Locator-prebuilt.patch | 36 -------- ...-Exclude-Analyzers-from-source-build.patch | 23 ----- src/redist/redist.csproj | 1 - src/redist/targets/Crossgen.targets | 2 +- src/redist/targets/GenerateLayout.targets | 3 + test/SdkTests/SdkTests.csproj | 5 + test/SdkTests/TestsToSkipOSX.xml | 23 +++++ 44 files changed, 482 insertions(+), 348 deletions(-) create mode 100644 eng/AfterSigning.targets create mode 100644 eng/common/loc/P22DotNetHtmlLocalization.lss create mode 100644 eng/common/templates/variables/pool-providers.yml delete mode 100644 src/SourceBuild/tarball/content/repos/runtime-portable.proj delete mode 100644 src/SourceBuild/tarball/content/repos/runtime.common.props delete mode 100644 src/SourceBuild/tarball/content/repos/runtime.common.targets delete mode 100644 src/SourceBuild/tarball/patches/format/0001-Address-Microsoft.Build.Locator-prebuilt.patch delete mode 100644 src/SourceBuild/tarball/patches/razor/0001-Exclude-Analyzers-from-source-build.patch create mode 100644 test/SdkTests/TestsToSkipOSX.xml diff --git a/eng/AfterSigning.targets b/eng/AfterSigning.targets new file mode 100644 index 000000000000..b8a08378a1b5 --- /dev/null +++ b/eng/AfterSigning.targets @@ -0,0 +1,24 @@ + + + <_SuppressSdkImports>false + + + + + + + + + + + + + %(FullPath).sha512 + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ad3f5f7ef70a..2d523d445d3a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -98,22 +98,22 @@ bb3695688177f5f80eeb3c0498168612e31549d5 - + https://github.com/dotnet/sdk - cc1eef3b839cf0a24efdbbbebce81560594761ab + 6d253cefc0cd96e51b5185cf65be05867311da54 - + https://github.com/dotnet/sdk - cc1eef3b839cf0a24efdbbbebce81560594761ab + 6d253cefc0cd96e51b5185cf65be05867311da54 - + https://github.com/dotnet/sdk - cc1eef3b839cf0a24efdbbbebce81560594761ab + 6d253cefc0cd96e51b5185cf65be05867311da54 - + https://github.com/dotnet/sdk - cc1eef3b839cf0a24efdbbbebce81560594761ab + 6d253cefc0cd96e51b5185cf65be05867311da54 @@ -124,39 +124,39 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-wpf 636e2b7a00a434a354a126f510a56e16ce3c6bbc - + https://github.com/dotnet/fsharp - a19fbdde1cd6e120f01493c4a9488622944f627f + 3263ac15552940d944b4bff27547022ade3da16a - + https://github.com/dotnet/fsharp - a19fbdde1cd6e120f01493c4a9488622944f627f + 3263ac15552940d944b4bff27547022ade3da16a - + https://github.com/microsoft/vstest - d8ee1c1b86aeaaa44d2bbef3d9f5a89acd0c0eed + b6a8c3b174380a5d57059428d8d3840915325373 - + https://github.com/dotnet/linker - de8bf14fcdfb55f2bae3db8cfc310ddd8ee921e6 + 19b53fbd053afc02fc20456d07d83fb8a94649c8 linker - + https://github.com/dotnet/roslyn - 5964d1a8e82d7a6e27b3b31bc1d6e44d0a2127b4 + 73338d92270b9f26982eca2e8872037a0214b912 - + https://github.com/dotnet/msbuild - 5f95887e07c8173b1c24c26c791e3ade924a4e8d + dba9b2343547c39971c92627476a926bf6f730bd - + https://github.com/nuget/nuget.client - 743503cb3c7e9ced2602ee2e29c38d63cc339451 + b84ca7373557c5725836697f81786ed22e20ead5 @@ -188,18 +188,18 @@ - + https://github.com/dotnet/arcade - ac5977ebf05451c1adcf24a15d16263e4d25fd0c + 5eac3ace1b09862bd7421ba55795cc2a9c6a57d5 - + https://github.com/dotnet/arcade - ac5977ebf05451c1adcf24a15d16263e4d25fd0c + 5eac3ace1b09862bd7421ba55795cc2a9c6a57d5 - + https://github.com/dotnet/arcade - ac5977ebf05451c1adcf24a15d16263e4d25fd0c + 5eac3ace1b09862bd7421ba55795cc2a9c6a57d5 https://github.com/dotnet/source-build-reference-packages @@ -217,4 +217,4 @@ - \ No newline at end of file + diff --git a/eng/Versions.props b/eng/Versions.props index cb725bc366c4..f4a96577704d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -27,7 +27,7 @@ - 7.0.0-beta.23060.4 + 7.0.0-beta.23108.1 @@ -63,9 +63,9 @@ - 7.0.300-preview.23080.2 - 7.0.300-preview.23080.2 - 7.0.300-preview.23080.2 + 7.0.300-preview.23113.21 + 7.0.300-preview.23113.21 + 7.0.300-preview.23113.21 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) @@ -171,7 +171,7 @@ 2.2.0-beta.19072.10 2.0.0 - 17.6.0-preview-20230126-02 + 17.6.0-preview-20230213-02 @@ -193,7 +193,7 @@ or minor release, prebuilts may be needed. When the release is mature, prebuilts are not necessary, and this property is removed from the file. --> - 7.0.100 + 7.0.102-4 diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1 index bab18543d6c4..bcb579e37a91 100644 --- a/eng/common/generate-locproject.ps1 +++ b/eng/common/generate-locproject.ps1 @@ -34,6 +34,25 @@ $jsonTemplateFiles | ForEach-Object { $jsonWinformsTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern $wxlFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\.+\.wxl" -And -Not( $_.Directory.Name -Match "\d{4}" ) } # localized files live in four digit lang ID directories; this excludes them +if (-not $wxlFiles) { + $wxlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\1033\\.+\.wxl" } # pick up en files (1033 = en) specifically so we can copy them to use as the neutral xlf files + if ($wxlEnFiles) { + $wxlFiles = @() + $wxlEnFiles | ForEach-Object { + $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)" + $wxlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru + } + } +} + +$macosHtmlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\.lproj\\.+\.html" } # add installer HTML files +$macosHtmlFiles = @() +if ($macosHtmlEnFiles) { + $macosHtmlEnFiles | ForEach-Object { + $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)" + $macosHtmlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru + } +} $xlfFiles = @() @@ -91,6 +110,7 @@ $locJson = @{ ) }, @{ + LanguageSet = $LanguageSet CloneLanguageSet = "WiX_CloneLanguages" LssFiles = @( "wxl_loc.lss" ) LocItems = @( @@ -98,8 +118,7 @@ $locJson = @{ $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\" $continue = $true foreach ($exclusion in $exclusions.Exclusions) { - if ($_.FullName.Contains($exclusion)) - { + if ($_.FullName.Contains($exclusion)) { $continue = $false } } @@ -110,7 +129,30 @@ $locJson = @{ SourceFile = $sourceFile CopyOption = "LangIDOnPath" OutputPath = $outputPath - Languages = "cs-CZ;de-DE;es-ES;fr-FR;it-IT;ja-JP;ko-KR;pl-PL;pt-BR;ru-RU;tr-TR;zh-CN;zh-TW" + } + } + } + ) + }, + @{ + LanguageSet = $LanguageSet + CloneLanguageSet = "VS_macOS_CloneLanguages" + LssFiles = @( ".\eng\common\loc\P22DotNetHtmlLocalization.lss" ) + LocItems = @( + $macosHtmlFiles | ForEach-Object { + $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\" + $continue = $true + foreach ($exclusion in $exclusions.Exclusions) { + if ($_.FullName.Contains($exclusion)) { + $continue = $false + } + } + $sourceFile = ($_.FullName | Resolve-Path -Relative) + if ($continue) { + return @{ + SourceFile = $sourceFile + CopyOption = "LangIDOnPath" + OutputPath = $outputPath } } } diff --git a/eng/common/loc/P22DotNetHtmlLocalization.lss b/eng/common/loc/P22DotNetHtmlLocalization.lss new file mode 100644 index 0000000000000000000000000000000000000000..6661fed566e49b0c206665bc21f135e06c9b89c4 GIT binary patch literal 3810 zcmd^CT~8BH5S?ce|HG9Bo&v?0;P_m6l= znU-wb=}VLT7UH{>{5H;0M4iLmRE8QeBRr|>&k=uV*L;heKY+dq>B$0^=0I}|x`)s{ zht4t9zaiEh5Fe>E-;zVT;c4G?v;9N0G=rWwo~*(Cs`OS6ZL`HL;vsL0J@I%$+0YvE zx{9ukK|FtFx1PlPD5M;6ZM>f;1BhCf?`8y6QH*?RT9T>XwF z#~m_N+i^UKE^j{e;KdNW`kH9Rbj{G8tDY}mafCgG+m3H`I@_PhrDmcIzxD&IX@s083kV|lLUE^0(h6wWRPN0QN1n^PU5eX8r6OZ*s^g)tt77#SZCB}znxye#U$Dtinr6lnVu z!LzA{A}0~no7p$thFGJAnI}oSW||9H=Bz}I7kD#2MLg7WfrlE5o9sQjePc>qmv+6iQCmdp(y}(Vr literal 0 HcmV?d00001 diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml index aaeb83b4dcbd..7c164ac02f4d 100644 --- a/eng/common/templates/job/execute-sdl.yml +++ b/eng/common/templates/job/execute-sdl.yml @@ -46,6 +46,7 @@ jobs: - template: /eng/common/templates/variables/sdl-variables.yml - name: GuardianVersion value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }} + - template: /eng/common/templates/variables/pool-providers.yml pool: # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: @@ -53,7 +54,7 @@ jobs: demands: Cmd # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Svc-Internal + name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 steps: - checkout: self diff --git a/eng/common/templates/job/onelocbuild.yml b/eng/common/templates/job/onelocbuild.yml index 6b8fc9970808..60ab00c4de3a 100644 --- a/eng/common/templates/job/onelocbuild.yml +++ b/eng/common/templates/job/onelocbuild.yml @@ -14,6 +14,7 @@ parameters: ReusePr: true UseLfLineEndings: true UseCheckedInLocProjectJson: false + SkipLocProjectJsonGeneration: false LanguageSet: VS_Main_Languages LclSource: lclFilesInRepo LclPackageId: '' @@ -22,13 +23,25 @@ parameters: MirrorRepo: '' MirrorBranch: main condition: '' + JobNameSuffix: '' jobs: -- job: OneLocBuild +- job: OneLocBuild${{ parameters.JobNameSuffix }} dependsOn: ${{ parameters.dependsOn }} - displayName: OneLocBuild + displayName: OneLocBuild${{ parameters.JobNameSuffix }} + + variables: + - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat + - name: _GenerateLocProjectArguments + value: -SourcesDirectory ${{ parameters.SourcesDirectory }} + -LanguageSet "${{ parameters.LanguageSet }}" + -CreateNeutralXlfs + - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}: + - name: _GenerateLocProjectArguments + value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson + - template: /eng/common/templates/variables/pool-providers.yml ${{ if ne(parameters.pool, '') }}: pool: ${{ parameters.pool }} @@ -40,27 +53,17 @@ jobs: demands: Cmd # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Svc-Internal + name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 - variables: - - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat - - name: _GenerateLocProjectArguments - value: -SourcesDirectory ${{ parameters.SourcesDirectory }} - -LanguageSet "${{ parameters.LanguageSet }}" - -CreateNeutralXlfs - - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}: - - name: _GenerateLocProjectArguments - value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson - - steps: - - task: Powershell@2 - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1 - arguments: $(_GenerateLocProjectArguments) - displayName: Generate LocProject.json - condition: ${{ parameters.condition }} + - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}: + - task: Powershell@2 + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1 + arguments: $(_GenerateLocProjectArguments) + displayName: Generate LocProject.json + condition: ${{ parameters.condition }} - task: OneLocBuild@2 displayName: OneLocBuild diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml index 1cbb6a0c5600..c5fedd7f70ce 100644 --- a/eng/common/templates/job/publish-build-assets.yml +++ b/eng/common/templates/job/publish-build-assets.yml @@ -34,15 +34,15 @@ jobs: - job: Asset_Registry_Publish dependsOn: ${{ parameters.dependsOn }} + timeoutInMinutes: 150 ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: displayName: Publish Assets ${{ else }}: displayName: Publish to Build Asset Registry - pool: ${{ parameters.pool }} - variables: + - template: /eng/common/templates/variables/pool-providers.yml - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - group: Publish-Build-Assets - group: AzureDevOps-Artifact-Feeds-Pats @@ -51,6 +51,16 @@ jobs: - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: - template: /eng/common/templates/post-build/common-variables.yml + pool: + # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) + ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + name: VSEngSS-MicroBuild2022-1ES + demands: Cmd + # If it's not devdiv, it's dnceng + ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: + name: $(DncEngInternalBuildPool) + demands: ImageOverride -equals windows.vs2019.amd64 + steps: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - task: DownloadBuildArtifacts@0 diff --git a/eng/common/templates/job/source-build.yml b/eng/common/templates/job/source-build.yml index b6137f44ada1..8a3deef2b727 100644 --- a/eng/common/templates/job/source-build.yml +++ b/eng/common/templates/job/source-build.yml @@ -44,13 +44,16 @@ jobs: ${{ if eq(parameters.platform.pool, '') }}: # The default VM host AzDO pool. This should be capable of running Docker containers: almost all # source-build builds run in Docker, including the default managed platform. + # /eng/common/templates/variables/pool-providers.yml can't be used here (some customers declare variables already), so duplicate its logic pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Svc-Public + name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore-Svc-Public' ), False, 'NetCore-Public')] demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open + ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Svc-Internal + name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')] demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 + ${{ if ne(parameters.platform.pool, '') }}: pool: ${{ parameters.platform.pool }} diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml index 59a42c338ab1..09c506d11855 100644 --- a/eng/common/templates/job/source-index-stage1.yml +++ b/eng/common/templates/job/source-index-stage1.yml @@ -22,16 +22,17 @@ jobs: value: ${{ parameters.binlogPath }} - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - group: source-dot-net stage1 variables + - template: /eng/common/templates/variables/pool-providers.yml ${{ if ne(parameters.pool, '') }}: pool: ${{ parameters.pool }} ${{ if eq(parameters.pool, '') }}: pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Svc-Public + name: $(DncEngPublicBuildPool) demands: ImageOverride -equals windows.vs2019.amd64.open ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Svc-Internal + name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 steps: diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml index 297e7946b0be..289bb2396ce8 100644 --- a/eng/common/templates/jobs/jobs.yml +++ b/eng/common/templates/jobs/jobs.yml @@ -88,15 +88,6 @@ jobs: - ${{ job.job }} - ${{ if eq(parameters.enableSourceBuild, true) }}: - Source_Build_Complete - pool: - # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: - name: VSEngSS-MicroBuild2022-1ES - demands: Cmd - # If it's not devdiv, it's dnceng - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Svc-Internal - demands: ImageOverride -equals windows.vs2019.amd64 runAsPublic: ${{ parameters.runAsPublic }} publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 957375c1c1a6..c051f1b65e9c 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -95,6 +95,7 @@ stages: displayName: Validate Build Assets variables: - template: common-variables.yml + - template: /eng/common/templates/variables/pool-providers.yml jobs: - job: displayName: NuGet Validation @@ -106,7 +107,7 @@ stages: demands: Cmd # If it's not devdiv, it's dnceng ${{ else }}: - name: NetCore1ESPool-Svc-Internal + name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 steps: @@ -143,7 +144,7 @@ stages: demands: Cmd # If it's not devdiv, it's dnceng ${{ else }}: - name: NetCore1ESPool-Svc-Internal + name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml @@ -203,7 +204,7 @@ stages: demands: Cmd # If it's not devdiv, it's dnceng ${{ else }}: - name: NetCore1ESPool-Svc-Internal + name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml @@ -251,6 +252,7 @@ stages: displayName: Publish using Darc variables: - template: common-variables.yml + - template: /eng/common/templates/variables/pool-providers.yml jobs: - job: displayName: Publish Using Darc @@ -262,7 +264,7 @@ stages: demands: Cmd # If it's not devdiv, it's dnceng ${{ else }}: - name: NetCore1ESPool-Svc-Internal + name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml @@ -282,4 +284,4 @@ stages: -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' - -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' \ No newline at end of file + -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates/variables/pool-providers.yml b/eng/common/templates/variables/pool-providers.yml new file mode 100644 index 000000000000..99c80212bac1 --- /dev/null +++ b/eng/common/templates/variables/pool-providers.yml @@ -0,0 +1,57 @@ +# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, +# otherwise it should go into the "normal" pools. This separates out the queueing and billing of released branches. + +# Motivation: +# Once a given branch of a repository's output has been officially "shipped" once, it is then considered to be COGS +# (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing +# (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS) +# Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services +# team needs to move resources around and create new and potentially differently-named pools. Using this template +# file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming. + +# How to use: +# This yaml assumes your shipped product branches use the naming convention "release/..." (which many do). +# If we find alternate naming conventions in broad usage these can be added to the condition below. +# +# First, import the template in an arcade-ified repo to pick up the variables, e.g.: +# +# variables: +# - template: /eng/common/templates/variables/pool-providers.yml +# +# ... then anywhere specifying the pool provider use the runtime variables, +# $(DncEngInternalBuildPool) and $ (DncEngPublicBuildPool), e.g.: +# +# pool: +# name: $(DncEngInternalBuildPool) +# demands: ImageOverride -equals windows.vs2019.amd64 + +variables: + # Coalesce the target and source branches so we know when a PR targets a release branch + # If these variables are somehow missing, fall back to main (tends to have more capacity) + + # Any new -Svc alternative pools should have variables added here to allow for splitting work + - name: DncEngPublicBuildPool + value: $[ + replace( + replace( + eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), + True, + 'NetCore-Svc-Public' + ), + False, + 'NetCore-Public' + ) + ] + + - name: DncEngInternalBuildPool + value: $[ + replace( + replace( + eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), + True, + 'NetCore1ESPool-Svc-Internal' + ), + False, + 'NetCore1ESPool-Internal' + ) + ] \ No newline at end of file diff --git a/global.json b/global.json index c4142c60624c..40e2f263cb19 100644 --- a/global.json +++ b/global.json @@ -11,7 +11,7 @@ "cmake": "3.16.4" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.23060.4", - "Microsoft.DotNet.CMake.Sdk": "7.0.0-beta.23060.4" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.23108.1", + "Microsoft.DotNet.CMake.Sdk": "7.0.0-beta.23108.1" } } diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml index 9ae170d1c95c..9e67adb4d98a 100644 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml +++ b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml @@ -101,6 +101,35 @@ jobs: Contents: '*.tar.gz' TargetFolder: $(tarballDir)/packages/archive/ + - script: | + set -euo pipefail + + sourceBuiltSDKUrl="https://dotnetcli.azureedge.net/source-built-artifacts/sdks/" + packageVersionsPath="$(Build.SourcesDirectory)/eng/Versions.props" + notFoundMessage="No source-built SDK found to download..." + + echo "Looking for source-built SDK to download..." + archiveVersionLine=`grep -m 1 "" "$packageVersionsPath" || :` + versionPattern="(.*)" + + if [[ $archiveVersionLine =~ $versionPattern ]]; then + filename="dotnet-sdk-${BASH_REMATCH[1]}-centos.8-x64.tar.gz" + archiveUrl="${sourceBuiltSDKUrl}${filename}" + downloadDir=$(mktemp -d) + (cd $downloadDir && curl --retry 5 -O $archiveUrl) + + mkdir $(tarballDir)/.dotnet + tar -xzf $downloadDir/$filename -C $(tarballDir)/.dotnet + rm -rf $downloadDir + else + echo "$notFoundMessage" + exit 1 + fi + + echo "##vso[task.setvariable variable=additionalBuildArgs]--with-sdk /tarball/.dotnet" + displayName: Setup Previously Source-Built SDK + condition: eq(variables._WithPreviousSDK, 'true') + - script: | set -x 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 06bfd2b15dbd..efa1ff1af8f0 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 @@ -36,36 +36,48 @@ jobs: installerBuildResourceId: ${{ parameters.installerBuildResourceId }} matrix: CentOSStream8-Online: - _BootstrapPrep: false + _BootstrapPrep: true _Container: ${{ parameters.centOSStream8Container }} _EnablePoison: false _ExcludeOmniSharpTests: true _RunOnline: true + _WithPreviousSDK: false CentOSStream8-Offline: - _BootstrapPrep: false + _BootstrapPrep: true _Container: ${{ parameters.centOSStream8Container }} _EnablePoison: false _ExcludeOmniSharpTests: true _RunOnline: false + _WithPreviousSDK: false ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - CentOSStream9-Offline: + CentOSStream8-WithPreviousSDK: _BootstrapPrep: false + _Container: ${{ parameters.centOSStream8Container }} + _EnablePoison: false + _ExcludeOmniSharpTests: true + _RunOnline: false + _WithPreviousSDK: true + CentOSStream9-Offline: + _BootstrapPrep: true _Container: ${{ parameters.centOSStream9Container }} _EnablePoison: false _ExcludeOmniSharpTests: false _RunOnline: false + _WithPreviousSDK: false Fedora36-Offline: - _BootstrapPrep: false + _BootstrapPrep: true _Container: ${{ parameters.fedora36Container }} _EnablePoison: true _ExcludeOmniSharpTests: false _RunOnline: false + _WithPreviousSDK: false Ubuntu2004-Offline: - _BootstrapPrep: false + _BootstrapPrep: true _Container: ${{ parameters.ubuntu2004Container }} _EnablePoison: false _ExcludeOmniSharpTests: false _RunOnline: false + _WithPreviousSDK: false name: Build_Tarball_x64 pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: @@ -89,6 +101,7 @@ jobs: _EnablePoison: false _ExcludeOmniSharpTests: false _RunOnline: false + _WithPreviousSDK: false name: Build_Tarball_arm64 pool: ${{ parameters.poolInternalArm64 }} @@ -109,6 +122,7 @@ jobs: _EnablePoison: false _ExcludeOmniSharpTests: false _RunOnline: false + _WithPreviousSDK: false name: Build_Tarball_x64_Using_Previous pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: diff --git a/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs b/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs index b177b6f01010..0dc26774e450 100644 --- a/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs +++ b/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs @@ -71,7 +71,6 @@ public override bool Execute() ["OfficialBuildId"] = derivedVersion.OfficialBuildId, ["OutputPackageVersion"] = dependency.Version, ["PreReleaseVersionLabel"] = derivedVersion.PreReleaseVersionLabel, - ["IsStable"] = string.IsNullOrWhiteSpace(derivedVersion.PreReleaseVersionLabel) ? "true" : "false", }; if (!string.IsNullOrEmpty(dependency.GitCommitCount)) { diff --git a/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets b/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets index e7a9698c658d..97f4b4ce3b76 100644 --- a/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets +++ b/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets @@ -285,10 +285,6 @@ - - diff --git a/src/SourceBuild/tarball/content/Directory.Build.props b/src/SourceBuild/tarball/content/Directory.Build.props index a0feed9d1e2a..2f4a8ee71cf3 100644 --- a/src/SourceBuild/tarball/content/Directory.Build.props +++ b/src/SourceBuild/tarball/content/Directory.Build.props @@ -23,19 +23,6 @@ x64 false - - false - - true - true - - - false - false - true - false @@ -229,19 +216,15 @@ - + - + - - - - + + + - - - @@ -253,6 +236,10 @@ + + + + diff --git a/src/SourceBuild/tarball/content/eng/bootstrap/OverrideBootstrapVersions.props b/src/SourceBuild/tarball/content/eng/bootstrap/OverrideBootstrapVersions.props index d0a05029f861..ced02e9605b1 100644 --- a/src/SourceBuild/tarball/content/eng/bootstrap/OverrideBootstrapVersions.props +++ b/src/SourceBuild/tarball/content/eng/bootstrap/OverrideBootstrapVersions.props @@ -7,5 +7,9 @@ $(NonshippingRuntimeVersionFor700) $(NonshippingRuntimeVersionFor700) $(NonshippingRuntimeVersionFor700) + + 7.0.0 + 7.0.0 + 7.0.0 diff --git a/src/SourceBuild/tarball/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj b/src/SourceBuild/tarball/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj index a22d70373da7..4f2bbd079174 100644 --- a/src/SourceBuild/tarball/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj +++ b/src/SourceBuild/tarball/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj @@ -13,36 +13,40 @@ - + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -73,6 +77,30 @@ Targets="CopyDownloadedPackage" Properties="SourcePath=$(RestorePackagesPath);DestinationPath=$(UnpackedTarPath);PackageName=%(PackageDownload.Identity);PackageVersion=%(PackageDownload.Version)" /> + + + + + + + + + + + + + + + + + + diff --git a/src/SourceBuild/tarball/content/eng/pipelines/security-partners-dotnet.yml b/src/SourceBuild/tarball/content/eng/pipelines/security-partners-dotnet.yml index 69bef21e9896..02641873b50e 100644 --- a/src/SourceBuild/tarball/content/eng/pipelines/security-partners-dotnet.yml +++ b/src/SourceBuild/tarball/content/eng/pipelines/security-partners-dotnet.yml @@ -1,5 +1,18 @@ trigger: none +variables: +- name: cfsNPMWarnLevel + value: none + +- name: cfsNugetWarnLevel + value: none + +- name: myGetWarnLevel + value: none + +- name: NuGetSecurityAnalysisWarningLevel + value: none + jobs: - template: ../../src/installer/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml parameters: @@ -7,11 +20,12 @@ jobs: excludeSdkContentTests: true matrix: Ubuntu2004-Offline: - _BootstrapPrep: false + _BootstrapPrep: true _Container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-20220813234344-4c008dd _EnablePoison: false _ExcludeOmniSharpTests: false _RunOnline: false + _WithPreviousSDK: false name: Build_Tarball_x64 pool: name: NetCore1ESPool-Svc-Internal diff --git a/src/SourceBuild/tarball/content/global.json b/src/SourceBuild/tarball/content/global.json index 1bf480e4e9ca..01432c8967bf 100644 --- a/src/SourceBuild/tarball/content/global.json +++ b/src/SourceBuild/tarball/content/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "7.0.100" + "dotnet": "7.0.102" }, "msbuild-sdks": { "Microsoft.Build.CentralPackageVersions": "2.0.1", diff --git a/src/SourceBuild/tarball/content/repos/Directory.Build.props b/src/SourceBuild/tarball/content/repos/Directory.Build.props index 04ab89d11dc9..625d3fb5b390 100644 --- a/src/SourceBuild/tarball/content/repos/Directory.Build.props +++ b/src/SourceBuild/tarball/content/repos/Directory.Build.props @@ -15,7 +15,6 @@ true $(LoggingDir)$(RepositoryName).log >> $(RepoConsoleLogFile) 2>&1 - true $(ProjectDirectory)artifacts/packages/$(Configuration)/NonShipping/ @@ -99,6 +98,9 @@ + + + diff --git a/src/SourceBuild/tarball/content/repos/aspnetcore.proj b/src/SourceBuild/tarball/content/repos/aspnetcore.proj index ee6b65aaeae2..ff9d9fda172e 100644 --- a/src/SourceBuild/tarball/content/repos/aspnetcore.proj +++ b/src/SourceBuild/tarball/content/repos/aspnetcore.proj @@ -9,6 +9,7 @@ $(BuildCommandArgs) --no-build-repo-tasks $(BuildCommandArgs) --no-build-nodejs $(BuildCommandArgs) /p:PublishCompressedFilesPathPrefix=$(SourceBuiltAspNetCoreRuntime) + $(BuildCommandArgs) /p:PortableBuild=false /p:TargetRuntimeIdentifier=$(TargetRid) $(BuildCommandArgs) /p:MicrosoftNetFrameworkReferenceAssembliesVersion=1.0.0 diff --git a/src/SourceBuild/tarball/content/repos/fsharp.proj b/src/SourceBuild/tarball/content/repos/fsharp.proj index 3ffd14406048..bc9a10be7077 100644 --- a/src/SourceBuild/tarball/content/repos/fsharp.proj +++ b/src/SourceBuild/tarball/content/repos/fsharp.proj @@ -27,7 +27,6 @@ - $(BuildCommandArgs) /p:Rid=$(TargetRid) $(BuildCommandArgs) /p:DOTNET_INSTALL_DIR=$(DotNetCliToolDir) - $(BuildCommandArgs) /p:AspNetCoreInstallerRid=linux-$(Platform) + $(BuildCommandArgs) /p:AspNetCoreInstallerRid=$(TargetRid) $(BuildCommandArgs) /p:CoreSetupRid=freebsd-x64 /p:PortableBuild=true $(BuildCommandArgs) /p:CoreSetupRid=osx-x64 diff --git a/src/SourceBuild/tarball/content/repos/known-good.proj b/src/SourceBuild/tarball/content/repos/known-good.proj index 7adea7e84b0f..989d6e20df07 100644 --- a/src/SourceBuild/tarball/content/repos/known-good.proj +++ b/src/SourceBuild/tarball/content/repos/known-good.proj @@ -43,7 +43,6 @@ - diff --git a/src/SourceBuild/tarball/content/repos/package-source-build.proj b/src/SourceBuild/tarball/content/repos/package-source-build.proj index 0ada671fbe48..fbc5a0cc1a3a 100644 --- a/src/SourceBuild/tarball/content/repos/package-source-build.proj +++ b/src/SourceBuild/tarball/content/repos/package-source-build.proj @@ -50,7 +50,7 @@ $(OutputPath)$(SourceBuiltArtifactsTarballName).$(installerOutputPackageVersion).tar.gz - diff --git a/src/SourceBuild/tarball/content/repos/runtime-portable.proj b/src/SourceBuild/tarball/content/repos/runtime-portable.proj deleted file mode 100644 index 09b4625e9d29..000000000000 --- a/src/SourceBuild/tarball/content/repos/runtime-portable.proj +++ /dev/null @@ -1,47 +0,0 @@ - - - - - runtime - - - - - - - - - - - - - - - $(ProjectDirectory)artifacts/portableLog - $(ProjectDirectory)artifacts/portableObj - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/runtime.common.props b/src/SourceBuild/tarball/content/repos/runtime.common.props deleted file mode 100644 index cb02932f9982..000000000000 --- a/src/SourceBuild/tarball/content/repos/runtime.common.props +++ /dev/null @@ -1,47 +0,0 @@ - - - runtime - - - - - - - true - - - $(StandardSourceBuildArgs.Replace('-bl', '-nobl')) - - $(StandardSourceBuildCommand) $(BuildCommandArgs) - $(ArmEnvironmentVariables) $(StandardSourceBuildCommand) $(BuildCommandArgs) - - $(ProjectDirectory)/clean$(ShellExtension) - - - - - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config - false - true - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/runtime.common.targets b/src/SourceBuild/tarball/content/repos/runtime.common.targets deleted file mode 100644 index 862b70dc832d..000000000000 --- a/src/SourceBuild/tarball/content/repos/runtime.common.targets +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - $(ProjectDirectory)pkg/Microsoft.NETCore.Platforms/runtime.json - - - - - - - - - <_builtRuntimePackages Include="$(SourceBuiltAssetsDir)*.symbols.nupkg" /> - <_builtRuntimePackages> - $([System.String]::Copy('%(FileName)').Replace('symbols', 'nupkg')) - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/runtime.proj b/src/SourceBuild/tarball/content/repos/runtime.proj index 59ea1d6fc3f0..85d0efa77c24 100644 --- a/src/SourceBuild/tarball/content/repos/runtime.proj +++ b/src/SourceBuild/tarball/content/repos/runtime.proj @@ -1,18 +1,57 @@ - + + + true + + $(ProjectDirectory)/clean$(ShellExtension) + $(TargetRid) osx-x64 freebsd-x64 win-x64 + <_platformIndex>$(NETCoreSdkRuntimeIdentifier.LastIndexOf('-')) + $(NETCoreSdkRuntimeIdentifier.Substring(0, $(_platformIndex))) + + <_platformIndex>$(NETCoreSdkPortableRuntimeIdentifier.LastIndexOf('-')) + $(NETCoreSdkPortableRuntimeIdentifier.Substring(0, $(_platformIndex))) + $(StandardSourceBuildArgs) $(BuildCommandArgs) /p:TargetRid=$(OverrideTargetRid) + $(BuildCommandArgs) /p:RuntimeOS=$(RuntimeOS) + $(BuildCommandArgs) /p:BaseOS=$(BaseOS) $(BuildCommandArgs) /p:SourceBuildNonPortable=true $(StandardSourceBuildCommand) $(BuildCommandArgs) + + + $(ProjectDirectory)global.json + $(ProjectDirectory)NuGet.config + false + true + + + + + + + + + + + + + + + + + + + + @@ -20,8 +59,49 @@ - - + + + + + + + + + + + + + $(ProjectDirectory)pkg/Microsoft.NETCore.Platforms/runtime.json + + + + + + + + + <_builtRuntimePackages Include="$(SourceBuiltAssetsDir)*.symbols.nupkg" /> + <_builtRuntimePackages> + $([System.String]::Copy('%(FileName)').Replace('symbols', 'nupkg')) + + + + + + + + + + + diff --git a/src/SourceBuild/tarball/content/repos/sdk.proj b/src/SourceBuild/tarball/content/repos/sdk.proj index 5d0fe449da45..442c548e667c 100644 --- a/src/SourceBuild/tarball/content/repos/sdk.proj +++ b/src/SourceBuild/tarball/content/repos/sdk.proj @@ -7,6 +7,9 @@ $(BuildCommandArgs) /p:PackageProjectUrl=https://github.com/dotnet/sdk $(BuildCommandArgs) /p:PublishCompressedFilesPathPrefix=$(SourceBuiltToolsetDir) + + $(BuildCommandArgs) /p:NativeAotSupported=false + true $(BuildCommandArgs) -v $(LogVerbosity) diff --git a/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj b/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj index a4fb27340f67..c1321e716c4c 100644 --- a/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj +++ b/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj @@ -4,7 +4,11 @@ $(BaseIntermediatePath)source-build-reference-package-cache - $(StandardSourceBuildCommand) $(StandardSourceBuildArgs) /p:LocalNuGetPackageCacheDirectory=$(LocalNuGetPackageCacheDirectory) + $(StandardSourceBuildArgs) + $(BuildCommandArgs) /p:MicrosoftNetCoreIlasmPackageRuntimeId=$(NETCoreSdkRuntimeIdentifier) + $(BuildCommandArgs) /p:LocalNuGetPackageCacheDirectory=$(LocalNuGetPackageCacheDirectory) + + $(StandardSourceBuildCommand) $(BuildCommandArgs) $(ProjectDirectory)NuGet.config $(ProjectDirectory)global.json diff --git a/src/SourceBuild/tarball/content/repos/xliff-tasks.proj b/src/SourceBuild/tarball/content/repos/xliff-tasks.proj index 7964fabdce9d..a5881adb4538 100644 --- a/src/SourceBuild/tarball/content/repos/xliff-tasks.proj +++ b/src/SourceBuild/tarball/content/repos/xliff-tasks.proj @@ -3,8 +3,6 @@ $(StandardSourceBuildArgs) - - $(BuildCommandArgs) /p:CheckEolTargetFramework=false $(StandardSourceBuildCommand) $(BuildCommandArgs) false diff --git a/src/SourceBuild/tarball/content/tools-local/init-build.proj b/src/SourceBuild/tarball/content/tools-local/init-build.proj index b2c3beed1e4d..0405ad8f1754 100644 --- a/src/SourceBuild/tarball/content/tools-local/init-build.proj +++ b/src/SourceBuild/tarball/content/tools-local/init-build.proj @@ -9,6 +9,7 @@ + @@ -22,6 +23,7 @@ + + + + + + -Date: Tue, 15 Nov 2022 17:34:00 +0000 -Subject: [PATCH] Address Microsoft.Build.Locator prebuilt - -Backport: https://github.com/dotnet/format/issues/1759 ---- - Directory.Packages.props | 2 +- - eng/Versions.props | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/Directory.Packages.props b/Directory.Packages.props -index c4bf3cf..f7e85b2 100644 ---- a/Directory.Packages.props -+++ b/Directory.Packages.props -@@ -10,7 +10,7 @@ - - - -- -+ - - - -diff --git a/eng/Versions.props b/eng/Versions.props -index fcd583b..2933963 100644 ---- a/eng/Versions.props -+++ b/eng/Versions.props -@@ -14,6 +14,7 @@ - - - 17.3.0-preview-22302-02 -+ 1.5.5 - 3.3.3 - 7.0.0-rc.1.22426.10 - diff --git a/src/SourceBuild/tarball/patches/razor/0001-Exclude-Analyzers-from-source-build.patch b/src/SourceBuild/tarball/patches/razor/0001-Exclude-Analyzers-from-source-build.patch deleted file mode 100644 index 071ca05da493..000000000000 --- a/src/SourceBuild/tarball/patches/razor/0001-Exclude-Analyzers-from-source-build.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: MichaelSimons -Date: Fri, 16 Dec 2022 03:31:02 +0000 -Subject: [PATCH] Exclude Analyzers from source-build - -Backport: https://github.com/dotnet/razor/issues/8035 ---- - src/Compiler/Directory.Build.props | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Compiler/Directory.Build.props b/src/Compiler/Directory.Build.props -index e69a99bf3..f70902a08 100644 ---- a/src/Compiler/Directory.Build.props -+++ b/src/Compiler/Directory.Build.props -@@ -37,7 +37,7 @@ - $(WarningsNotAsErrors);xUnit1004 - - -- -+ - - - diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index d9b868eccb2c..554b1b1ee807 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -47,5 +47,4 @@ - diff --git a/src/redist/targets/Crossgen.targets b/src/redist/targets/Crossgen.targets index 399529689fce..753b86c67639 100644 --- a/src/redist/targets/Crossgen.targets +++ b/src/redist/targets/Crossgen.targets @@ -6,7 +6,7 @@ microsoft.netcore.app.runtime.$(SharedFrameworkRid) - microsoft.netcore.app.crossgen2.$(HostOSName)-$(BuildArchitecture) + microsoft.netcore.app.crossgen2.$(Crossgen2Rid) $(NuGetPackageRoot)/$(RuntimeNETCrossgenPackageName)/$(MicrosoftNETCoreAppRuntimePackageVersion)/tools/crossgen2$(ExeExtension) diff --git a/src/redist/targets/GenerateLayout.targets b/src/redist/targets/GenerateLayout.targets index ae911ab1c090..308fdfb2b6a9 100644 --- a/src/redist/targets/GenerateLayout.targets +++ b/src/redist/targets/GenerateLayout.targets @@ -84,6 +84,9 @@ dotnet-runtime$(PgoTerm)-$(VSRedistCommonNetCoreSharedFrameworkx6470PackageVersion)-$(SharedFrameworkRid)$(ArchiveExtension) windowsdesktop-runtime-$(MicrosoftWindowsDesktopAppRuntimePackageVersion)-$(SharedFrameworkRid)$(ArchiveExtension) + $(HostOSName)-$(BuildArchitecture) + $(SharedFrameworkRid) + $(SharedFrameworkRid) linux-x64 $(AspNetCoreInstallerRid) diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index b99346824a1f..9fb5965a41b6 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -225,6 +225,11 @@ $(TestArgs) -testConfigFile "$(MSBuildThisFileDirectory)TestsToSkipPortableLinux.xml" + + + $(TestArgs) -testConfigFile "$(MSBuildThisFileDirectory)TestsToSkipOSX.xml" + + diff --git a/test/SdkTests/TestsToSkipOSX.xml b/test/SdkTests/TestsToSkipOSX.xml new file mode 100644 index 000000000000..09330bb1f805 --- /dev/null +++ b/test/SdkTests/TestsToSkipOSX.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + +