diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 6439fde9c..166e26ec0 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -240,7 +240,7 @@ stages: _TestArg: '' Build_Linux_musl_Debug_x64: _BuildConfig: Debug - _DockerParameter: '--docker alpine.3.13' + _DockerParameter: '--docker alpine.3.15' _LinuxPortable: '' _RuntimeIdentifier: '--runtime-id linux-musl-x64' _BuildArchitecture: 'x64' @@ -285,7 +285,7 @@ stages: _TestArg: '' Build_Linux_musl_Release_x64: _BuildConfig: Release - _DockerParameter: '--docker alpine.3.13' + _DockerParameter: '--docker alpine.3.15' _LinuxPortable: '' _RuntimeIdentifier: '--runtime-id linux-musl-x64' _BuildArchitecture: 'x64' diff --git a/NuGet.config b/NuGet.config index 8b5c5c827..03d3587a6 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,20 +7,16 @@ - - - - @@ -41,17 +37,13 @@ - - + - - - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 35f36b8ec..890a79137 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -90,27 +90,27 @@ 9388790ba9ed8fef11584b2c74fe6789782a1592 - + https://dev.azure.com/dnceng/internal/_git/dotnet-templating - 84fa0403a62bd95b9e1f29c00f4b4f8e605bfc7c + 3d823d128e0aafaa65c57b9bfa53d208db2f9d9b - + https://dev.azure.com/dnceng/internal/_git/dotnet-templating - 84fa0403a62bd95b9e1f29c00f4b4f8e605bfc7c + 3d823d128e0aafaa65c57b9bfa53d208db2f9d9b - + https://dev.azure.com/dnceng/internal/_git/dotnet-templating - 84fa0403a62bd95b9e1f29c00f4b4f8e605bfc7c + 3d823d128e0aafaa65c57b9bfa53d208db2f9d9b - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - 46b48e7a82d138728be2d24594b5ce98d6af92dc + 6b1e4bc5f9ae0c720255a6accb3fd6654ebe9385 - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - 46b48e7a82d138728be2d24594b5ce98d6af92dc + 6b1e4bc5f9ae0c720255a6accb3fd6654ebe9385 @@ -121,44 +121,44 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-wpf 96c5254e5ca5040021caf779216b1b3641875b1e - + https://github.com/dotnet/fsharp - 702b8e77f5fbfe21e6743324c1750503e02f182d + 5d69143fbe992d8fa33d5b83d5fdd5f4ed7bb4fc - + https://github.com/dotnet/fsharp - 702b8e77f5fbfe21e6743324c1750503e02f182d + 5d69143fbe992d8fa33d5b83d5fdd5f4ed7bb4fc - + https://github.com/microsoft/vstest - 717d0cf94925e9cf67466dbee46c1019930eb212 + 83d2f8162d29a66a8ff323c4bba93c8250013511 - + https://github.com/dotnet/linker - 28db36b95cf83c8e2ad11e67a2ad0de301b4cad6 + 50c2ec00b794ebd130402d51b960c69cfc9ee622 linker - + https://github.com/dotnet/roslyn - 432d17a83aa5623e4581756f4d642997048056bd + 954930214e5a116e3aa1f81cab887b294ae95739 - + https://dev.azure.com/devdiv/DevDiv/_git/DotNet-msbuild-Trusted - 038f9bae9b34d1cca653360a46c5ce1eba4c2ac8 + 561848881bab01749e6d8b03be2869a18ca944f7 - + https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 027ca8b8ef4b4dc94995f87b9c441d2bcf742c1d + 01bc4df1ef99c9c213f892ec8b25e46b23c7cfb1 - + https://github.com/Microsoft/ApplicationInsights-dotnet - 93f745cfef8541f09862aae9bc8c04554bca38c7 + 53b80940842204f78708a538628288ff5d741a1d @@ -197,23 +197,23 @@ - + https://github.com/dotnet/arcade - 2fbe602d12256bf82de53791ddcbb964c1541b4e + 0967701e5527a1be21d9473821077c3f4be7f9dc - + https://github.com/dotnet/arcade - 2fbe602d12256bf82de53791ddcbb964c1541b4e + 0967701e5527a1be21d9473821077c3f4be7f9dc - + https://github.com/dotnet/arcade - 2fbe602d12256bf82de53791ddcbb964c1541b4e + 0967701e5527a1be21d9473821077c3f4be7f9dc - + https://github.com/dotnet/source-build-reference-packages - 2477d388d8663fe6a3f1c82376600dbb19bd217d + 38385bc8b19cebe7ae7d20771646158785ee5bdc diff --git a/eng/Versions.props b/eng/Versions.props index e52d1d9fb..0c81327de 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -7,8 +7,8 @@ 6 0 - 3 - 08 + 4 + 05 $(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature) servicing $(VersionMajor).$(VersionMinor) @@ -19,7 +19,7 @@ - 6.0.0-beta.22463.7 + 6.0.0-beta.22561.1 @@ -31,7 +31,7 @@ - 6.0.306 + 6.0.403 @@ -56,8 +56,8 @@ - 6.0.306-servicing.22523.22 - 6.0.306-servicing.22523.22 + 6.0.403-servicing.22523.23 + 6.0.403-servicing.22523.23 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) @@ -115,7 +115,7 @@ $(MicrosoftDotNetWpfProjectTemplatesPackageVersion) $(NUnit3DotNetNewTemplatePackageVersion) $(MicrosoftDotNetCommonItemTemplatesPackageVersion) - 6.0.306 + 6.0.403 $(MicrosoftAspNetCoreAppRuntimePackageVersion) $(MicrosoftWinFormsProjectTemplates50PackageVersion) @@ -152,7 +152,7 @@ 2.2.0-beta.19072.10 2.0.0 - 17.2.0-release-20220408-11 + 17.3.1 @@ -178,13 +178,13 @@ - 6.0.300-rc.1.5355 - 32.0.300-rc.1.4 - 15.4.100-rc.1.125 - 15.4.100-rc.1.125 - 12.3.100-rc.1.125 - 15.4.100-rc.1.125 - 6.0.4 + 6.0.312 + 32.0.301 + 15.4.303 + 15.4.303 + 12.3.303 + 15.4.303 + 6.0.5 6.0.4 $(MicrosoftNETWorkloadEmscriptenManifest60200Version) diff --git a/eng/common/build.ps1 b/eng/common/build.ps1 index 8943da242..33a6f2d0e 100644 --- a/eng/common/build.ps1 +++ b/eng/common/build.ps1 @@ -26,6 +26,7 @@ Param( [string] $runtimeSourceFeed = '', [string] $runtimeSourceFeedKey = '', [switch] $excludePrereleaseVS, + [switch] $nativeToolsOnMachine, [switch] $help, [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties ) @@ -67,6 +68,7 @@ function Print-Usage() { Write-Host " -warnAsError Sets warnaserror msbuild parameter ('true' or 'false')" Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)." Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio" + Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)" Write-Host "" Write-Host "Command line arguments not listed above are passed thru to msbuild." @@ -146,6 +148,9 @@ try { $nodeReuse = $false } + if ($nativeToolsOnMachine) { + $env:NativeToolsOnMachine = $true + } if ($restore) { InitializeNativeTools } diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1 index 7428ef880..6c7a851a8 100644 --- a/eng/common/init-tools-native.ps1 +++ b/eng/common/init-tools-native.ps1 @@ -112,6 +112,7 @@ try { $ToolPath = Convert-Path -Path $BinPath Write-Host "Adding $ToolName to the path ($ToolPath)..." Write-Host "##vso[task.prependpath]$ToolPath" + $env:PATH = "$ToolPath;$env:PATH" $InstalledTools += @{ $ToolName = $ToolDirectory.FullName } } } diff --git a/eng/docker/alpine.3.13/Dockerfile b/eng/docker/alpine.3.15/Dockerfile similarity index 93% rename from eng/docker/alpine.3.13/Dockerfile rename to eng/docker/alpine.3.15/Dockerfile index 272f9596a..2d7e65698 100644 --- a/eng/docker/alpine.3.13/Dockerfile +++ b/eng/docker/alpine.3.15/Dockerfile @@ -4,7 +4,7 @@ # # Dockerfile that creates a container suitable to build dotnet-cli -FROM mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-20210714125444-ae5be29 +FROM mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-20220610131707-f0ea7ba RUN apk update && apk upgrade && apk add --no-cache curl ncurses diff --git a/global.json b/global.json index 9d1e2d901..30864f9a7 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "6.0.109", + "dotnet": "6.0.111", "runtimes": { "dotnet": [ "$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion)" @@ -11,7 +11,7 @@ "cmake": "3.16.4" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22463.7", - "Microsoft.DotNet.CMake.Sdk": "6.0.0-beta.22463.7" + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22561.1", + "Microsoft.DotNet.CMake.Sdk": "6.0.0-beta.22561.1" } } diff --git a/src/SourceBuild/tarball/patches/fsharp/0002-Enable-work-tree-and-unsafe-paths-to-be-able-to-appl.patch b/src/SourceBuild/tarball/patches/fsharp/0002-Enable-work-tree-and-unsafe-paths-to-be-able-to-appl.patch deleted file mode 100644 index cff9bda21..000000000 --- a/src/SourceBuild/tarball/patches/fsharp/0002-Enable-work-tree-and-unsafe-paths-to-be-able-to-appl.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Chris Rummel -Date: Wed, 22 Jun 2022 05:53:06 -0500 -Subject: [PATCH] Enable work-tree and unsafe-paths to be able to apply in the - checked-in tarball. - ---- - eng/SourceBuild.props | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props -index 903ee00..4c85819 100644 ---- a/eng/SourceBuild.props -+++ b/eng/SourceBuild.props -@@ -15,7 +15,7 @@ - - - - diff --git a/src/SourceBuild/tarball/patches/nuget-client/0001-Pin-Microsoft.Build-and-Microsoft.Extensions.Command.patch b/src/SourceBuild/tarball/patches/nuget-client/0001-Pin-Microsoft.Build-and-Microsoft.Extensions.Command.patch deleted file mode 100644 index 1d284c47e..000000000 --- a/src/SourceBuild/tarball/patches/nuget-client/0001-Pin-Microsoft.Build-and-Microsoft.Extensions.Command.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: MichaelSimons -Date: Wed, 11 May 2022 21:16:46 +0000 -Subject: [PATCH] Pin Microsoft.Build and - Microsoft.Extensions.CommandLineUtils.Sources versions in source-build - -Update package version reference to not pick up the source-build PVP versions and instead utilize SBRP versions -so that source-build builds closer to the normal repo build. ---- - build/packages.targets | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/build/packages.targets b/build/packages.targets -index 0ca4b1309..dc3db5b8e 100644 ---- a/build/packages.targets -+++ b/build/packages.targets -@@ -1,6 +1,6 @@ - - -- 16.8.0 -+ 16.8.0 - 13.0.1 - 3.0.0 - 4.5.0 -@@ -10,7 +10,7 @@ - 5.0.0 - 2.14.0-rtm-832 - 17.0.0-beta1-10402-05 -- 3.0.0-preview6.19253.5 -+ 3.0.0-preview6.19253.5 - - - diff --git a/src/finalizer/CMakeLists.txt b/src/finalizer/CMakeLists.txt index bdb26d893..fe1b531ea 100644 --- a/src/finalizer/CMakeLists.txt +++ b/src/finalizer/CMakeLists.txt @@ -31,7 +31,6 @@ 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/finalizer.cpp b/src/finalizer/finalizer.cpp index 0d1df6193..58bf9e1bd 100644 --- a/src/finalizer/finalizer.cpp +++ b/src/finalizer/finalizer.cpp @@ -38,6 +38,39 @@ LExit: return hr; } +extern "C" HRESULT StrTrimBackslash(LPWSTR* ppwz, LPCWSTR wzSource) +{ + HRESULT hr = S_OK; + LPWSTR sczResult = NULL; + + int i = lstrlenW(wzSource); + + if (0 < i) + { + for (i = i - 1; i > 0; --i) + { + if (L'\\' != wzSource[i]) + { + break; + } + } + + ++i; + } + + hr = StrAllocString(&sczResult, wzSource, i); + ExitOnFailure(hr, "Failed to copy result string"); + + // Output result + *ppwz = sczResult; + sczResult = NULL; + +LExit: + ReleaseStr(sczResult); + + return hr; +} + extern "C" HRESULT DeleteWorkloadRecords(LPWSTR sczSdkFeatureBandVersion, LPWSTR sczArchitecture) { HRESULT hr = S_OK; @@ -112,7 +145,7 @@ extern "C" HRESULT DeleteWorkloadRecords(LPWSTR sczSdkFeatureBandVersion, LPWSTR ExitOnFailure(hr, "Failed to get size of key name."); // Need to remove trailing backslash otherwise PathFile returns an empty string. - hr = PathCchRemoveBackslash(sczKeyName, cbKeyName); + hr = StrTrimBackslash(&sczKeyName, sczKeyName); ExitOnFailure(hr, "Failed to remove backslash."); hr = StrAllocString(&sczSubKey, PathFile(sczKeyName), 0); @@ -363,7 +396,17 @@ extern "C" HRESULT DetectSdk(LPWSTR sczSdkFeatureBandVersion, LPWSTR sczArchitec LogStringLine(REPORT_STANDARD, "Scanning %ls", sczInstalledSdkVersionsKeyName); hr = RegOpen(HKEY_LOCAL_MACHINE, sczInstalledSdkVersionsKeyName, KEY_READ, &hkInstalledSdkVersionsKey); - ExitOnFailure(hr, "Failed to read installed versions key."); + + // When the last SDK is removed the registry key should no longer exist so we can just exit + if (E_FILENOTFOUND == hr) + { + LogStringLine(REPORT_STANDARD, "Registry key not found: %ls.", sczInstalledSdkVersionsKeyName); + hr = S_OK; + *pbInstalled = FALSE; + goto LExit; + } + + ExitOnFailure(hr, "Failed to open registry key: %ls.", sczInstalledSdkVersionsKeyName); for (DWORD dwSdkVersionsValueIndex = 0;; ++dwSdkVersionsValueIndex) { @@ -427,9 +470,10 @@ int wmain(int argc, wchar_t* argv[]) hr = ::DetectSdk(sczFeatureBandVersion, argv[3], &bSdkFeatureBandInstalled); ExitOnFailure(hr, "Failed to detect installed SDKs."); - if (!bSdkFeatureBandInstalled) + // If the feature band is still present, do not remove workloads. + if (bSdkFeatureBandInstalled) { - LogStringLine(REPORT_STANDARD, "SDK with feature band %ls could not be found.", sczFeatureBandVersion); + LogStringLine(REPORT_STANDARD, "Detected SDK with feature band %ls.", sczFeatureBandVersion); goto LExit; } diff --git a/src/redist/targets/BundledManifests.targets b/src/redist/targets/BundledManifests.targets index 7b8536e48..63bfd724e 100644 --- a/src/redist/targets/BundledManifests.targets +++ b/src/redist/targets/BundledManifests.targets @@ -82,19 +82,19 @@ + DestinationPath="%(BundledManifests.FeatureBand)/$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())/localize"/> + DestinationFolder="$(RedistLayoutPath)sdk-manifests/%(DestinationPath)"/> diff --git a/src/redist/targets/Crossgen.targets b/src/redist/targets/Crossgen.targets index 8949af132..f440ca5f3 100644 --- a/src/redist/targets/Crossgen.targets +++ b/src/redist/targets/Crossgen.targets @@ -41,8 +41,10 @@ - + + + diff --git a/src/redist/targets/GenerateBundledVersions.targets b/src/redist/targets/GenerateBundledVersions.targets index eb57d27c1..db2c5feb2 100644 --- a/src/redist/targets/GenerateBundledVersions.targets +++ b/src/redist/targets/GenerateBundledVersions.targets @@ -305,6 +305,7 @@ Copyright (c) .NET Foundation. All rights reserved. AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**" AppHostPackVersion="$(_NETCoreAppPackageVersion)" AppHostRuntimeIdentifiers="@(NetCoreAppHostRids, '%3B')" + ExcludedRuntimeIdentifiers="android" /> win-arm64 + + win-x86 + win-x64 + win-arm + + $(CoreSetupRootUrl)$(CoreSetupBlobVersion) @@ -177,6 +183,13 @@ packs/%(PackageName)/%(PackageVersion) + + Microsoft.NETCore.App.Host.$(x64AppHostRid) + $(MicrosoftNETCoreAppHostPackageVersion) + $(TargetFramework) + packs/%(PackageName)/%(PackageVersion) + + $(CoreSetupRootUrl)$(CoreSetupBlobVersion) @@ -456,7 +469,7 @@ diff --git a/src/redist/targets/packaging/deb/postinst b/src/redist/targets/packaging/deb/postinst index 142daff4e..ff22bcbc1 100644 --- a/src/redist/targets/packaging/deb/postinst +++ b/src/redist/targets/packaging/deb/postinst @@ -22,6 +22,5 @@ first_run() { /usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "debianpackage" > /dev/null 2>&1 || true } -INSTALL_TEMP_HOME=/tmp/dotnet-installer -[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME +INSTALL_TEMP_HOME=$(mktemp -d) # mktemp should set 700 perm automatically HOME=$INSTALL_TEMP_HOME first_run diff --git a/src/redist/targets/packaging/osx/clisdk/scripts/postinstall b/src/redist/targets/packaging/osx/clisdk/scripts/postinstall index 28339be99..86710223d 100644 --- a/src/redist/targets/packaging/osx/clisdk/scripts/postinstall +++ b/src/redist/targets/packaging/osx/clisdk/scripts/postinstall @@ -12,7 +12,7 @@ first_run() { $INSTALL_DESTINATION/dotnet exec $INSTALL_DESTINATION/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "$1" > /dev/null 2>&1 || true } -[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME +INSTALL_TEMP_HOME=$(mktemp -d) # mktemp should set 700 perm automatically HOME=$INSTALL_TEMP_HOME first_run exit 0 diff --git a/src/redist/targets/packaging/windows/clisdk/bundle.wxs b/src/redist/targets/packaging/windows/clisdk/bundle.wxs index c58c6a194..148487bde 100644 --- a/src/redist/targets/packaging/windows/clisdk/bundle.wxs +++ b/src/redist/targets/packaging/windows/clisdk/bundle.wxs @@ -151,7 +151,31 @@ - + + + + + @@ -208,20 +232,7 @@ - - +