Merge branch 'release/6.0.1xx' into main

This commit is contained in:
Jason Zhai 2021-10-11 23:30:57 -07:00
commit 1fb1cf6af5
20 changed files with 380 additions and 706 deletions

View file

@ -36,6 +36,26 @@ The repository contains native code project required for the Windows installer.
- To build in VS, run a command line build first, then run `artifacts\core-sdk-build-env.bat` from a VS command prompt and then `devenv Microsoft.DotNet.Cli.sln`
- To test different languages of the installer, run `artifacts\packages\Debug\Shipping>dotnet-sdk-3.1.412-win-x64.exe /lang 1046` using the LCID of the language you want to test
# Building (source-build)
This repo also contains code to help you build the entire .NET product end-to-end from sources (often referred to as source-build), even in disconnected/offline mode. This is currently only tested on Linux.
1. `./build.sh /p:ArcadeBuildTarball=true /p:TarballDir=/path/to/place/complete/dotnet/sources`
This fetches the complete set of source code used to build the .NET SDK. It creates a tarball of the complete .NET source code at `artifacts/packages/<Release|Debug>/Shipping/`. It also places the extracted sources at `/path/to/place/complete/dotnet/sources`. Due to a few known issues, that source directory should be outside (and not somewhere under) this repository.
2. `cd /path/to/complete/dotnet/sources`
3. `./prep.sh --bootstrap`
This downloads a .NET SDK and a number of .NET packages and other prebuilts needed to build .NET from source.
Eventually, we want to make it possible to bootstrap .NET 6 in which case this step can be skipped.
4. `./build.sh`
This builds the entire .NET SDK. The resulting SDK is placed at `artifacts/$ARCH/Release/dotnet-sdk-$VERSION-$ARCH.tar.gz`.
# Build status
|All legs|

View file

@ -13,5 +13,6 @@
<MicrosoftWindowsSDKNETRef10_0_18362PackageVersion>10.0.18362.21</MicrosoftWindowsSDKNETRef10_0_18362PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_19041PackageVersion>10.0.19041.21</MicrosoftWindowsSDKNETRef10_0_19041PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_20348PackageVersion>10.0.20348.21</MicrosoftWindowsSDKNETRef10_0_20348PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>10.0.22000.21</MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>
</PropertyGroup>
</Project>

View file

@ -23,6 +23,6 @@
<PropertyGroup>
<PrivateSourceBuiltArtifactsPackageVersion>0.1.0-6.0.100-bootstrap.19</PrivateSourceBuiltArtifactsPackageVersion>
<PrivateSourceBuiltPrebuiltsPackageVersionPrefix>0.1.0-6.0.100-</PrivateSourceBuiltPrebuiltsPackageVersionPrefix>
<PrivateSourceBuiltPrebuiltsPackageVersionSuffix>23</PrivateSourceBuiltPrebuiltsPackageVersionSuffix>
<PrivateSourceBuiltPrebuiltsPackageVersionSuffix>25</PrivateSourceBuiltPrebuiltsPackageVersionSuffix>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,61 @@
From 93de82c03ff71f897599db2824b959d020b877bd Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Thu, 30 Sep 2021 16:08:28 -0500
Subject: [PATCH 1/2] Fix Omnisharp: Add needed extra TFMs.
Omnisharp requires the net46 TFMs of this files explictly and we don't build them by default. This patch adds net46 to the relevant projects. The original issue for this was https://github.com/OmniSharp/omnisharp-vscode/issues/4610 and the long-term fix of switching to net>4 TFM is tracked in https://github.com/OmniSharp/omnisharp-vscode/issues/4360.
---
src/libraries/Directory.Build.props | 2 +-
.../ref/System.Resources.Extensions.csproj | 4 ++--
.../src/System.Resources.Extensions.csproj | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props
index 4d39fad397e..649c669517e 100644
--- a/src/libraries/Directory.Build.props
+++ b/src/libraries/Directory.Build.props
@@ -27,7 +27,7 @@
<PropertyGroup>
<!-- Build all .NET Framework configurations when net48 is passed in. This is for convenience. -->
- <AdditionalBuildTargetFrameworks Condition="'$(BuildTargetFramework)' == 'net48'">net461;net462;net47;net471;net472</AdditionalBuildTargetFrameworks>
+ <AdditionalBuildTargetFrameworks Condition="'$(BuildTargetFramework)' == 'net48'">net46;net461;net462;net47;net471;net472</AdditionalBuildTargetFrameworks>
</PropertyGroup>
<!-- Define test projects and companions -->
diff --git a/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj b/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj
index 99037ae459c..848be41690c 100644
--- a/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj
+++ b/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net461</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net46;net461</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
@@ -11,4 +11,4 @@
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Resources.Writer\ref\System.Resources.Writer.csproj" />
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj b/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj
index adacc9b977e..38d4c145352 100644
--- a/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj
+++ b/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net461</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net46;net461</TargetFrameworks>
<DefineConstants>$(DefineConstants);RESOURCES_EXTENSIONS</DefineConstants>
<Nullable>enable</Nullable>
</PropertyGroup>
--
2.17.1

View file

@ -5,13 +5,18 @@ IFS=$'\n\t'
SCRIPT_ROOT="$(cd -P "$( dirname "$0" )" && pwd)"
usage() {
echo "usage: $0"
echo "usage: $0 [options]"
echo ""
echo " Prepares a tarball to be built by downloading Private.SourceBuilt.Artifacts.*.tar.gz and"
echo " installing the version of dotnet referenced in global.json"
echo "options:"
echo " --bootstrap Build a bootstrap version of previously source-built packages archive."
echo " This modifies the downloaded version, replacing portable packages"
echo " with official ms-built packages restored from package feeds."
echo ""
}
buildBootstrap=false
positional_args=()
while :; do
if [ $# -le 0 ]; then
@ -23,6 +28,9 @@ while :; do
usage
exit 0
;;
--bootstrap)
buildBootstrap=true
;;
*)
positional_args+=("$1")
;;
@ -87,3 +95,31 @@ if [ "$installDotnet" == "true" ]; then
echo " Installing dotnet..."
(source ./eng/common/tools.sh && InitializeDotNetCli true)
fi
# Build bootstrap, if specified
if [ "$buildBootstrap" == "true" ]; then
DOTNET_SDK_PATH="$SCRIPT_ROOT/.dotnet"
# Create working directory for running bootstrap project
workingDir=$(mktemp -d)
echo " Building bootstrap previously source-built in $workingDir"
# Copy bootstrap project to working dir
cp $SCRIPT_ROOT/scripts/bootstrap/buildBootstrapPreviouslySB.csproj $workingDir
# Copy NuGet.config from the installer repo to have the right feeds
cp $SCRIPT_ROOT/src/installer.*/NuGet.config $workingDir
# Get PackageVersions.props from existing prev-sb archive
echo " Retrieving PackageVersions.props from existing archive"
sourceBuiltArchive=`find $SCRIPT_ROOT/packages/archive -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz'`
if [ -f "$sourceBuiltArchive" ]; then
tar -xzf "$sourceBuiltArchive" -C $workingDir PackageVersions.props
fi
# Run restore on project to initiate download of bootstrap packages
$DOTNET_SDK_PATH/dotnet restore $workingDir/buildBootstrapPreviouslySB.csproj /bl /p:ArchiveDir="$SCRIPT_ROOT/packages/archive/"
# Remove working directory
rm -rf $workingDir
fi

View file

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildProjectDirectory)/PackageVersions.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<BaseOutputPath>$(MSBuildProjectDirectory)/artifacts/</BaseOutputPath>
<RestorePackagesPath>$(MSBuildProjectDirectory)/artifacts/restoredPkgs/</RestorePackagesPath>
<UnpackedTarPath>$(MSBuildProjectDirectory)/artifacts/unpacked/</UnpackedTarPath>
<NewTarballName>$(ArchiveDir)Private.SourceBuilt.Artifacts.Bootstrap.tar.gz</NewTarballName>
</PropertyGroup>
<ItemGroup>
<!-- These packages will be replaced with ms-built packages downloaded from official package feeds-->
<PackageReference Include="Microsoft.NET.HostModel" Version="$(MicrosoftNETHostModelVersion)" />
<PackageReference Include="Microsoft.ILVerification" Version="$(MicrosoftILVerificationVersion)" />
<PackageReference Include="Microsoft.NET.Sdk.IL" Version="$(MicrosoftNETSdkILVersion)" />
<PackageReference Include="Microsoft.NETCore.ILAsm" Version="$(MicrosoftNETCoreILAsmVersion)" />
<PackageReference Include="Microsoft.NETCore.ILDAsm" Version="$(MicrosoftNETCoreILDAsmVersion)" />
<PackageReference Include="Microsoft.NETCore.TestHost" Version="$(MicrosoftNETCoreTestHostVersion)" />
<PackageReference Include="runtime.linux-x64.Microsoft.NETCore.ILAsm" Version="$(RuntimeLinuxX64MicrosoftNETCoreILAsmVersion)" />
<PackageReference Include="runtime.linux-x64.Microsoft.NETCore.ILDAsm" Version="$(RuntimeLinuxX64MicrosoftNETCoreILDAsmVersion)" />
<PackageReference Include="runtime.linux-x64.Microsoft.NETCore.TestHost" Version="$(RuntimeLinuxX64MicrosoftNETCoreTestHostVersion)" />
<PackageReference Include="runtime.linux-x64.runtime.native.System.IO.Ports" Version="$(RuntimeLinuxX64RuntimeNativeSystemIOPortsVersion)" />
</ItemGroup>
<Target Name="BuildBoostrapPreviouslySourceBuilt" AfterTargets="Restore">
<ItemGroup>
<RestoredNupkgs Include="$(RestorePackagesPath)**/*.nupkg" />
<PrevSBArchive Include="$(ArchiveDir)Private.SourceBuilt.Artifacts.*.tar.gz" />
</ItemGroup>
<!-- Copy restored nupkg files to root of restored packages dir so they're all in one place-->
<Copy SourceFiles="@(RestoredNupkgs)" DestinationFolder="$(RestorePackagesPath)" />
<!-- Check to ensure there is only one previously source-built archive -->
<Error Text="Multiple Private.SourceBuilt.Artifacts.*.tar.gz tarballs exists at $(ArchiveDir). Expecting only one."
Condition="'@(PrevSBArchive->Count())' != '1'" />
<!-- Unpack existing archive -->
<Message Text=" Unpacking existing tarball from %(PrevSBArchive.Identity)" Importance="High" />
<MakeDir Directories="$(UnpackedTarPath)" />
<Exec Command="tar -xzf %(PrevSBArchive.Identity) -C $(UnpackedTarPath)" />
<!-- Delete existing archive -->
<Message Text=" Deleting existing tarball: %(PrevSBArchive.Identity)" Importance="High" />
<Delete Files="%(PrevSBArchive.Identity)" />
<!-- Copy files specified in package references above from restored package dir to unpacked archive dir -->
<Message Text=" Replacing restored files in $(UnpackedTarPath)" Importance="High" />
<Copy
SourceFiles="$(RestorePackagesPath)$([System.String]::copy('%(PackageReference.Identity)').ToLower()).%(PackageReference.Version).nupkg"
DestinationFiles="$(UnpackedTarPath)%(PackageReference.Identity).%(PackageReference.Version).nupkg" />
<!-- Repack tarball with new bootstrap name -->
<Message Text=" Repacking tarball to $(NewTarballName)" Importance="High" />
<Exec Command="tar --numeric-owner -czf $(NewTarballName) *.nupkg *.props SourceBuildReferencePackages/" WorkingDirectory="$(UnpackedTarPath)" />
</Target>
</Project>

View file

@ -1,411 +0,0 @@
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
usage()
{
echo "Builds a bootstrap CLI from sources"
echo "Usage: $0 [BuildType] -rid <Rid> -seedcli <SeedCli> [-os <OS>] [-clang <Major.Minor>] [-corelib <CoreLib>]"
echo ""
echo "Options:"
echo " BuildType Type of build (-debug, -release), default: -release"
echo " -clang <Major.Minor> Override of the version of clang compiler to use"
echo " -corelib <CoreLib> Path to System.Private.CoreLib.dll, default: use the System.Private.CoreLib.dll from the seed CLI"
echo " -os <OS> Operating system (used for corefx build), default: Linux"
echo " -rid <Rid> Runtime identifier including the architecture part (e.g. rhel.6-x64)"
echo " -seedcli <SeedCli> Seed CLI used to generate the target CLI"
echo " -outputpath <path> Optional output directory to contain the generated cli and cloned repos, default: <Rid>"
}
disable_pax_mprotect()
{
if [[ $(command -v paxctl) ]]; then
paxctl -c -m $1
fi
}
get_max_version()
{
local maxversionhi=0
local maxversionmid=0
local maxversionlo=0
local maxversiontag
local versionrest
local versionhi
local versionmid
local versionlo
local versiontag
local foundmax
for d in $1/*; do
if [[ -d $d ]]; then
versionrest=$(basename $d)
versionhi=${versionrest%%.*}
versionrest=${versionrest#*.}
versionmid=${versionrest%%.*}
versionrest=${versionrest#*.}
versionlo=${versionrest%%-*}
versiontag=${versionrest#*-}
if [[ $versiontag == $versionrest ]]; then
versiontag=""
fi
foundmax=0
if [[ $versionhi -gt $maxversionhi ]]; then
foundmax=1
elif [[ $versionhi -eq $maxversionhi ]]; then
if [[ $versionmid -gt $maxversionmid ]]; then
foundmax=1
elif [[ $versionmid -eq $maxversionmid ]]; then
if [[ $versionlo -gt $maxversionlo ]]; then
foundmax=1
elif [[ $versionlo -eq $maxversionlo ]]; then
# tags are used to mark pre-release versions, so a version without a tag
# is newer than a version with one.
if [[ "$versiontag" == "" || $versiontag > $maxversiontag ]]; then
foundmax=1
fi
fi
fi
fi
if [[ $foundmax != 0 ]]; then
maxversionhi=$versionhi
maxversionmid=$versionmid
maxversionlo=$versionlo
maxversiontag=$versiontag
fi
fi
done
echo $maxversionhi.$maxversionmid.$maxversionlo${maxversiontag:+-$maxversiontag}
}
getrealpath()
{
if command -v realpath > /dev/null; then
realpath $1
else
readlink -e $1
fi
}
__build_os=Linux
__runtime_id=
__corelib=
__configuration=release
__clangversion=
__outputpath=
while [[ "${1:-}" != "" ]]; do
lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
-h|--help)
usage
exit 1
;;
-rid)
shift
__runtime_id=$1
;;
-os)
shift
__build_os=$1
;;
-debug)
__configuration=debug
;;
-release)
__configuration=release
;;
-corelib)
shift
__corelib=`getrealpath $1`
;;
-seedcli)
shift
__seedclipath=`getrealpath $1`
;;
-clang)
shift
__clangversion=clang$1
;;
-outputpath)
shift
__outputpath=$1
;;
*)
echo "Unknown argument to build.sh $1"; exit 1
esac
shift
done
if [[ -z "$__runtime_id" ]]; then
echo "Missing the required -rid argument"
exit 2
fi
if [[ -z "$__seedclipath" ]]; then
echo "Missing the required -seedcli argument"
exit 3
fi
__build_arch=${__runtime_id#*-}
if [[ -z "$__outputpath" ]]; then
__outputpath=$__runtime_id/dotnetcli
fi
if [[ -d "$__outputpath" ]]; then
/bin/rm -r $__outputpath
fi
mkdir -p $__runtime_id
mkdir -p $__outputpath
__outputpath=`getrealpath $__outputpath`
cd $__runtime_id
cp -r $__seedclipath/* $__outputpath
__frameworkversion="2.0.0"
__sdkversion="2.0.0"
__fxrversion="2.0.0"
echo "**** DETECTING VERSIONS IN SEED CLI ****"
__frameworkversion=`get_max_version $__seedclipath/shared/Microsoft.NETCore.App`
__sdkversion=`get_max_version $__seedclipath/sdk`
__fxrversion=`get_max_version $__seedclipath/host/fxr`
echo "Framework version: $__frameworkversion"
echo "SDK version: $__sdkversion"
echo "FXR version: $__fxrversion"
__frameworkpath=$__outputpath/shared/Microsoft.NETCore.App/$__frameworkversion
echo "**** DETECTING GIT COMMIT HASHES ****"
# Extract the git commit hashes representig the state of the three repos that
# the seed cli package was built from
__coreclrhash=`strings $__seedclipath/shared/Microsoft.NETCore.App/$__frameworkversion/libcoreclr.so | grep "@(#)" | grep -o "[a-f0-9]\{40\}"`
__corefxhash=`strings $__seedclipath/shared/Microsoft.NETCore.App/$__frameworkversion/System.Native.so | grep "@(#)" | grep -o "[a-f0-9]\{40\}"`
__coresetuphash=`strings $__seedclipath/dotnet | grep "@(#)" | grep -o "[a-f0-9]\{40\}"`
if [[ "$__coresetuphash" == "" ]]; then
__coresetuphash=`strings $__seedclipath/dotnet | grep -o "[a-f0-9]\{40\}"`
fi
echo "coreclr hash: $__coreclrhash"
echo "corefx hash: $__corefxhash"
echo "core-setup hash: $__coresetuphash"
# Clone the three repos if they were not cloned yet. If the folders already
# exist, leave them alone. This allows patching the cloned sources as needed
if [[ ! -d coreclr ]]; then
echo "**** CLONING CORECLR REPOSITORY ****"
git clone https://github.com/dotnet/coreclr.git
cd coreclr
git checkout $__coreclrhash
cd ..
fi
if [[ ! -d corefx ]]; then
echo "**** CLONING COREFX REPOSITORY ****"
git clone https://github.com/dotnet/corefx.git
cd corefx
git checkout $__corefxhash
cd ..
fi
if [[ ! -d core-setup ]]; then
echo "**** CLONING CORE-SETUP REPOSITORY ****"
git clone https://github.com/dotnet/core-setup.git
cd core-setup
git checkout $__coresetuphash
cd ..
fi
echo "**** BUILDING CORE-SETUP NATIVE COMPONENTS ****"
cd core-setup
src/corehost/build.sh --configuration $__configuration --arch "$__build_arch" --hostver "2.0.0" --apphostver "2.0.0" --fxrver "2.0.0" --policyver "2.0.0" --commithash `git rev-parse HEAD`
cd ..
echo "**** BUILDING CORECLR NATIVE COMPONENTS ****"
cd coreclr
./build.sh $__configuration $__build_arch $__clangversion -skipgenerateversion -skipmanaged -skipmscorlib -skiprestore -skiprestoreoptdata -skipnuget -nopgooptimize 2>&1 | tee coreclr.log
export __coreclrbin=$(cat coreclr.log | sed -n -e 's/^.*Product binaries are available at //p')
cd ..
echo "CoreCLR binaries will be copied from $__coreclrbin"
echo "**** BUILDING COREFX NATIVE COMPONENTS ****"
corefx/src/Native/build-native.sh $__build_arch $__configuration $__clangversion $__build_os 2>&1 | tee corefx.log
export __corefxbin=$(cat corefx.log | sed -n -e 's/^.*Build files have been written to: //p')
echo "CoreFX binaries will be copied from $__corefxbin"
echo "**** Copying new binaries to dotnetcli/ ****"
# First copy the coreclr repo binaries
cp $__coreclrbin/*so $__frameworkpath
cp $__coreclrbin/corerun $__frameworkpath
cp $__coreclrbin/crossgen $__frameworkpath
# Mark the coreclr executables as allowed to create executable memory mappings
disable_pax_mprotect $__frameworkpath/corerun
disable_pax_mprotect $__frameworkpath/crossgen
# Now copy the core-setup repo binaries
if [[ $__fxrversion == 2* ]]; then
cp core-setup/cli/exe/dotnet/dotnet $__outputpath
cp core-setup/cli/exe/dotnet/dotnet $__frameworkpath/corehost
cp core-setup/cli/dll/libhostpolicy.so $__frameworkpath
cp core-setup/cli/dll/libhostpolicy.so $__outputpath/sdk/$__sdkversion
cp core-setup/cli/fxr/libhostfxr.so $__frameworkpath
cp core-setup/cli/fxr/libhostfxr.so $__outputpath/host/fxr/$__fxrversion
cp core-setup/cli/fxr/libhostfxr.so $__outputpath/sdk/$__sdkversion
else
cp core-setup/bin/$__runtime_id.$__configuration/corehost/dotnet $__outputpath
cp core-setup/bin/$__runtime_id.$__configuration/corehost/dotnet $__frameworkpath/corehost
cp core-setup/bin/$__runtime_id.$__configuration/corehost/libhostpolicy.so $__frameworkpath
cp core-setup/bin/$__runtime_id.$__configuration/corehost/libhostpolicy.so $__outputpath/sdk/$__sdkversion
cp core-setup/bin/$__runtime_id.$__configuration/corehost/libhostfxr.so $__frameworkpath
cp core-setup/bin/$__runtime_id.$__configuration/corehost/libhostfxr.so $__outputpath/host/fxr/$__fxrversion
cp core-setup/bin/$__runtime_id.$__configuration/corehost/libhostfxr.so $__outputpath/sdk/$__sdkversion
fi
# Mark the core-setup executables as allowed to create executable memory mappings
disable_pax_mprotect $__outputpath/dotnet
disable_pax_mprotect $__frameworkpath/corehost
# Finally copy the corefx repo binaries
cp $__corefxbin/**/System.* $__frameworkpath
# Copy System.Private.CoreLib.dll override from somewhere if requested
if [[ "$__corelib" != "" ]]; then
cp "$__corelib" $__frameworkpath
fi
# Add the new RID to Microsoft.NETCore.App.deps.json
# Replace the linux-x64 RID in the target, runtimeTarget and runtimes by the new RID
# and add the new RID to the list of runtimes.
echo "**** Adding new rid to Microsoft.NETCore.App.deps.json ****"
#TODO: add parameter with the parent RID sequence
sed \
-e 's/runtime\.linux-x64/runtime.'$__runtime_id'/g' \
-e 's/runtimes\/linux-x64/runtimes\/'$__runtime_id'/g' \
-e 's/Version=v\([0-9].[0-9]\)\/linux-x64/Version=v\1\/'$__runtime_id'/g' \
$__seedclipath/shared/Microsoft.NETCore.App/$__frameworkversion/Microsoft.NETCore.App.deps.json \
>$__frameworkpath/Microsoft.NETCore.App.deps.json
# add the new RID to the list of runtimes iff it does not already exist (sed inplace)
__os_dependencies=
if [[ $__build_os == "Linux" ]]; then
__os_dependencies='"linux", "linux-'$__build_arch'", '
fi
grep -q "\"$__runtime_id\":" $__frameworkpath/Microsoft.NETCore.App.deps.json || \
sed -i \
-e 's/"runtimes": {/&\n "'$__runtime_id'": [\n '"$__os_dependencies"'"unix", "unix-'$__build_arch'", "any", "base"\n ],/g' \
$__frameworkpath/Microsoft.NETCore.App.deps.json
__crossgentimeout=120
function crossgenone(){
echo $2/crossgen /MissingDependenciesOK /Platform_Assemblies_Paths $2:$3 /in $1 /out $1.ni >$1.log 2>&1
timeout $__crossgentimeout $2/crossgen /MissingDependenciesOK /Platform_Assemblies_Paths $2:$3 /in $1 /out $1.ni >>$1.log 2>&1
exitCode=$?
if [ "$exitCode" == "0" ]
then
rm $1.log
mv $1.ni $1
elif grep -q -e 'The module was expected to contain an assembly manifest' \
-e 'An attempt was made to load a program with an incorrect format.' \
-e 'File is PE32' $1.log
then
rm $1.log
echo "$1" >> crossgenskipped
else
echo "$1" >> crossgenretry
fi
}
# Run an assembly through ildasm ilasm roundtrip to remove x64 crossgen
function uncrossgenone(){
echo >> $1.log 2>&1
echo mv $1 $1.x64 >> $1.log 2>&1
echo $2/ildasm -raweh -out=$1.il $1.x64 "&& \\" >> $1.log 2>&1
echo $2/ilasm -output=$1 -QUIET -NOLOGO -DEBUG -OPTIMIZE $1.il >> $1.log 2>&1
mv $1 $1.x64
$2/ildasm -raweh -out=$1.il $1.x64 && \
$2/ilasm -output=$1 -DLL -QUIET -NOLOGO -DEBUG -OPTIMIZE $1.il
exitCode=$?
if [ "$exitCode" == "0" ]
then
rm $1.x64
rm $1.il
else
echo "$1" >> uncrossgenfails
fi
}
# if $__build_arch is not x64 then any dll which was crossgened for x64 must be recrossgened for $__build_arch
if [[ "$__build_arch" != "x64" ]]
then
echo "**** Beginning crossgen for $__build_arch target ****"
export -f crossgenone
export __crossgentimeout
rm -f crossgenretry crossgendlls crossgenskipped uncrossgenfails
# Assumes System.Private.CoreLib was already crossgened
find $__outputpath -type f -name \*.dll -or -name \*.exe | grep -v System.Private.CoreLib > crossgendlls
cat crossgendlls | xargs -P 0 -n 1 -I {} bash -c 'crossgenone "$@"' _ {} "$__frameworkpath" "$__outputpath/sdk/$__sdkversion"
echo
echo "**** Crossgen skipped for non-managed assembly files:"
echo
touch crossgenskipped
cat crossgenskipped
echo
echo "**** Crossgen failed for the following dlls:"
echo
touch crossgenretry
cat crossgenretry
echo
echo "**** Beginning uncrossgen for failed dlls ****"
echo
export -f uncrossgenone
rm -f $__coreclrbin/System.Private.CoreLib.dll
ln -s $__corelib $__coreclrbin/System.Private.CoreLib.dll
cat crossgenretry | xargs -P 0 -n 1 -I {} bash -c 'uncrossgenone "$@"' _ {} "$__coreclrbin"
rm -f $__coreclrbin/System.Private.CoreLib.dll
echo
echo "**** Uncrossgen failed for the following dlls:"
echo
touch uncrossgenfails
cat uncrossgenfails
fi
echo "**** Bootstrap CLI was successfully built ****"

View file

@ -296,18 +296,18 @@ function runAllTests() {
if [ "$excludeNonWebTests" == "false" ]; then
doCommand C# console new restore build run multi-rid-publish
doCommand C# classlib new restore build multi-rid-publish
doCommand C# xunit new restore test
doCommand C# mstest new restore test
# doCommand C# xunit new restore test
# doCommand C# mstest new restore test
doCommand VB console new restore build run multi-rid-publish
doCommand VB classlib new restore build multi-rid-publish
doCommand VB xunit new restore test
doCommand VB mstest new restore test
# doCommand VB xunit new restore test
# doCommand VB mstest new restore test
doCommand F# console new restore build run multi-rid-publish
doCommand F# classlib new restore build multi-rid-publish
doCommand F# xunit new restore test
doCommand F# mstest new restore test
# doCommand F# console new restore build run multi-rid-publish
# doCommand F# classlib new restore build multi-rid-publish
# doCommand F# xunit new restore test
# doCommand F# mstest new restore test
fi
if [ "$excludeWebTests" == "false" ]; then
@ -329,12 +329,12 @@ function runWebTests() {
doCommand C# mvc "$@" new restore build run multi-rid-publish
doCommand C# webapi "$@" new restore build multi-rid-publish
doCommand C# razor "$@" new restore build run multi-rid-publish
doCommand C# blazorwasm "$@" new restore build run publish
# doCommand C# blazorwasm "$@" new restore build run publish
doCommand C# blazorserver "$@" new restore build run publish
doCommand F# web "$@" new restore build run multi-rid-publish
doCommand F# mvc "$@" new restore build run multi-rid-publish
doCommand F# webapi "$@" new restore build run multi-rid-publish
# doCommand F# web "$@" new restore build run multi-rid-publish
# doCommand F# mvc "$@" new restore build run multi-rid-publish
# doCommand F# webapi "$@" new restore build run multi-rid-publish
}
function runXmlDocTests() {
@ -465,8 +465,8 @@ function runXmlDocTests() {
)
netcoreappIgnoreList=(
mscorlib.xml
Microsoft.VisualBasic.xml
netstandard.xml
System.AppContext.xml
System.Buffers.xml
System.ComponentModel.DataAnnotations.xml
@ -481,12 +481,15 @@ function runXmlDocTests() {
System.Globalization.Calendars.xml
System.Globalization.Extensions.xml
System.Globalization.xml
System.IO.Compression.Brotli.xml
System.IO.Compression.FileSystem.xml
System.IO.FileSystem.xml
System.IO.FileSystem.Primitives.xml
System.IO.UnmanagedMemoryStream.xml
System.IO.xml
System.Net.xml
System.Numerics.xml
System.Numerics.Vectors.xml
System.Reflection.Extensions.xml
System.Reflection.xml
System.Resources.Reader.xml
@ -500,6 +503,8 @@ function runXmlDocTests() {
System.ServiceModel.Web.xml
System.ServiceProcess.xml
System.Text.Encoding.xml
System.Text.Json.SourceGeneration.resources.xml
System.Text.Json.SourceGeneration.xml
System.Threading.Tasks.Extensions.xml
System.Threading.Tasks.xml
System.Threading.Timer.xml
@ -512,127 +517,10 @@ 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
)
@ -659,7 +547,6 @@ 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
@ -673,10 +560,16 @@ function runXmlDocTests() {
error=1
echo "error: missing $xmlDocFile"
fi
if [[ $skip == 1 ]] && [[ -f "$xmlDocFile" ]]; then
error=1
echo "error: Ignored xml doc was found: $xmlDocFile"
fi
done < <(find "$targetingPacksDir" -name '*.dll' -print0)
if [[ $error != 0 ]]; then
echo "error: Missing xml documents"
echo "error: Missing or unexpected xml documents"
exit 1
else
echo "All expected xml docs are present"

View file

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

View file

@ -0,0 +1,124 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Davis Goodin <dagood@microsoft.com>
Date: Fri, 8 Oct 2021 16:15:42 -0700
Subject: [PATCH] Disable Workloads WiX dependency in source-build
This removes the prebuilt WiX dependency: https://github.com/dotnet/arcade/issues/8014
The patch is temporary, pending upstream fix and dependency flow.
---
.../src/{FileRow.cs => FileRow.wix.cs} | 0
...ifestMsi.cs => GenerateManifestMsi.wix.cs} | 0
.../{GenerateMsi.cs => GenerateMsi.wix.cs} | 0
...erateMsiBase.cs => GenerateMsiBase.wix.cs} | 0
...erateVisualStudioMsiPackageProject.wix.cs} | 0
...cs => GenerateVisualStudioWorkload.wix.cs} | 0
...oadMsis.cs => GenerateWorkloadMsis.wix.cs} | 0
...rosoft.DotNet.Build.Tasks.Workloads.csproj | 23 ++++++++++++++++---
...{MsiProperties.cs => MsiProperties.wix.cs} | 0
.../src/{MsiUtils.cs => MsiUtils.wix.cs} | 0
...elatedProduct.cs => RelatedProduct.wix.cs} | 0
11 files changed, 20 insertions(+), 3 deletions(-)
rename src/Microsoft.DotNet.Build.Tasks.Workloads/src/{FileRow.cs => FileRow.wix.cs} (100%)
rename src/Microsoft.DotNet.Build.Tasks.Workloads/src/{GenerateManifestMsi.cs => GenerateManifestMsi.wix.cs} (100%)
rename src/Microsoft.DotNet.Build.Tasks.Workloads/src/{GenerateMsi.cs => GenerateMsi.wix.cs} (100%)
rename src/Microsoft.DotNet.Build.Tasks.Workloads/src/{GenerateMsiBase.cs => GenerateMsiBase.wix.cs} (100%)
rename src/Microsoft.DotNet.Build.Tasks.Workloads/src/{GenerateVisualStudioMsiPackageProject.cs => GenerateVisualStudioMsiPackageProject.wix.cs} (100%)
rename src/Microsoft.DotNet.Build.Tasks.Workloads/src/{GenerateVisualStudioWorkload.cs => GenerateVisualStudioWorkload.wix.cs} (100%)
rename src/Microsoft.DotNet.Build.Tasks.Workloads/src/{GenerateWorkloadMsis.cs => GenerateWorkloadMsis.wix.cs} (100%)
rename src/Microsoft.DotNet.Build.Tasks.Workloads/src/{MsiProperties.cs => MsiProperties.wix.cs} (100%)
rename src/Microsoft.DotNet.Build.Tasks.Workloads/src/{MsiUtils.cs => MsiUtils.wix.cs} (100%)
rename src/Microsoft.DotNet.Build.Tasks.Workloads/src/{RelatedProduct.cs => RelatedProduct.wix.cs} (100%)
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/FileRow.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/FileRow.wix.cs
similarity index 100%
rename from src/Microsoft.DotNet.Build.Tasks.Workloads/src/FileRow.cs
rename to src/Microsoft.DotNet.Build.Tasks.Workloads/src/FileRow.wix.cs
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateManifestMsi.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateManifestMsi.wix.cs
similarity index 100%
rename from src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateManifestMsi.cs
rename to src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateManifestMsi.wix.cs
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateMsi.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateMsi.wix.cs
similarity index 100%
rename from src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateMsi.cs
rename to src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateMsi.wix.cs
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateMsiBase.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateMsiBase.wix.cs
similarity index 100%
rename from src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateMsiBase.cs
rename to src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateMsiBase.wix.cs
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateVisualStudioMsiPackageProject.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateVisualStudioMsiPackageProject.wix.cs
similarity index 100%
rename from src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateVisualStudioMsiPackageProject.cs
rename to src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateVisualStudioMsiPackageProject.wix.cs
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateVisualStudioWorkload.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateVisualStudioWorkload.wix.cs
similarity index 100%
rename from src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateVisualStudioWorkload.cs
rename to src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateVisualStudioWorkload.wix.cs
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateWorkloadMsis.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateWorkloadMsis.wix.cs
similarity index 100%
rename from src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateWorkloadMsis.cs
rename to src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateWorkloadMsis.wix.cs
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 19cf67b5..2d02b7f4 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
@@ -11,6 +11,16 @@
<NoWarn>$(NoWarn);NU5127</NoWarn>
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
<RootNamespace>Microsoft.DotNet.Build.Tasks.Workloads</RootNamespace>
+
+ <!--
+ Only include WiX-powered features when running a non-from-source build. (For example, the
+ Microsoft build used to build .NET for Windows.)
+
+ This removes a dependency on prebuilt WiX binaries. The purpose of WiX is to produce Windows
+ installers, and source-build doesn't run on Windows, so excluding WiX while building in
+ source-build mode to remove the prebuilt dependency has no impact to available .NET features.
+ -->
+ <IncludeWiX Condition="'$(DotNetBuildFromSource)' != 'true'">true</IncludeWiX>
</PropertyGroup>
<ItemGroup>
@@ -19,13 +29,16 @@
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCoreVersion)" />
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkVersion)" />
<PackageReference Include="NuGet.Packaging" Version="$(NuGetVersion)" />
- <PackageReference Include="Wix" Version="3.11.2" />
<PackageReference Include="Microsoft.NET.Sdk.WorkloadManifestReader" Version="$(MicrosoftNetSdkWorkloadManifestReaderVersion)" />
- <PackageReference Include="System.Text.Json" Version="$(SystemTextJsonVersion)" Condition="'$(TargetFramework)' == 'net472'"/>
+ <PackageReference Include="System.Text.Json" Version="$(SystemTextJsonVersion)" Condition="'$(TargetFramework)' == 'net472'" />
<PackageReference Include="Microsoft.Deployment.DotNet.Releases" Version="$(MicrosoftDeploymentDotNetReleasesVersion)" />
</ItemGroup>
- <ItemGroup>
+ <ItemGroup Condition="'$(IncludeWiX)' == 'true'">
+ <PackageReference Include="Wix" Version="3.11.2" />
+ </ItemGroup>
+
+ <ItemGroup Condition="'$(IncludeWiX)' == 'true'">
<Reference Include="$(WixInstallPath)\Microsoft.Deployment.Resources.dll" />
<Reference Include="$(WixInstallPath)\Microsoft.Deployment.Compression.dll" />
<Reference Include="$(WixInstallPath)\Microsoft.Deployment.Compression.Cab.dll" />
@@ -48,6 +61,10 @@
<EmbeddedResource Remove="obj\**" />
</ItemGroup>
+ <ItemGroup Condition="'$(IncludeWiX)' != 'true'">
+ <Compile Remove="**\*.wix.cs" />
+ </ItemGroup>
+
<ItemGroup>
<EmbeddedResource Include="Misc\*.*" />
<EmbeddedResource Include="MsiTemplate\*.wxs" />
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/MsiProperties.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/MsiProperties.wix.cs
similarity index 100%
rename from src/Microsoft.DotNet.Build.Tasks.Workloads/src/MsiProperties.cs
rename to src/Microsoft.DotNet.Build.Tasks.Workloads/src/MsiProperties.wix.cs
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/MsiUtils.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/MsiUtils.wix.cs
similarity index 100%
rename from src/Microsoft.DotNet.Build.Tasks.Workloads/src/MsiUtils.cs
rename to src/Microsoft.DotNet.Build.Tasks.Workloads/src/MsiUtils.wix.cs
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/RelatedProduct.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/RelatedProduct.wix.cs
similarity index 100%
rename from src/Microsoft.DotNet.Build.Tasks.Workloads/src/RelatedProduct.cs
rename to src/Microsoft.DotNet.Build.Tasks.Workloads/src/RelatedProduct.wix.cs

View file

@ -1,34 +0,0 @@
From 6fce3b3afda68cd041cb3b38c8c21fa0513ab5e3 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Mon, 2 Aug 2021 19:56:17 +0000
Subject: [PATCH] Exclude warnings as errors from source build
NU1604: These hopefully go away once runtime-portable is added to the tarball.
Microsoft.AspNetCore.App.Runtime.csproj : error NU1604: Project dependency Microsoft.NETCore.App.Crossgen2.linux-x64 does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
Microsoft.AspNetCore.App.Runtime.csproj : error NU1604: Project dependency Microsoft.NETCore.App.Runtime.linux-x64 does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
CS8601:
CascadingAuthenticationState.razor(4,108): error CS8601: Possible null reference assignment.
---
Directory.Build.props | 4 ++++++++++++++
1 file changed, 4 insertions(+)
diff --git a/Directory.Build.props b/Directory.Build.props
index ba1c1675a0..ce6bc50c66 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -225,6 +225,10 @@
<ArchiveExtension Condition="'$(TargetOsName)' == 'win'">.zip</ArchiveExtension>
</PropertyGroup>
+ <PropertyGroup>
+ <NoWarn>$(NoWarn);NU1604;CS8601</NoWarn>
+ </PropertyGroup>
+
<Import Project="eng\Workarounds.props" />
<Import Project="artifacts\bin\GenerateFiles\Directory.Build.props" Condition=" '$(MSBuildProjectName)' != 'GenerateFiles' " />
<Import Project="eng\Dependencies.props" />
--
2.29.2

View file

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

View file

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

View file

@ -1,27 +0,0 @@
From 4d2c2370dc85e658508fd0943e47b0d6559f42d5 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Mon, 9 Aug 2021 14:03:33 +0000
Subject: [PATCH] NoWarn NU1605 until DeploymentTools is in SourceBuild
src/Cli/dotnet/dotnet.csproj : error NU1605: Detected package downgrade: Newtonsoft.Json from 12.0.3 to 12.0.2. Reference the package directly from the project to select a different version.
Error stems from Microsoft.Deployment.DotNet.Releases not being source built and referencing a newer version. Temporary fix until the DeploymentTools repo is added to source-build (https://github.com/dotnet/source-build/issues/2365).
---
src/Cli/dotnet/dotnet.csproj | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/Cli/dotnet/dotnet.csproj b/src/Cli/dotnet/dotnet.csproj
index 4ff965a4d..f9609824b 100644
--- a/src/Cli/dotnet/dotnet.csproj
+++ b/src/Cli/dotnet/dotnet.csproj
@@ -12,6 +12,7 @@
<PackageId>Microsoft.DotNet.Cli</PackageId>
<UseAppHost>false</UseAppHost>
<IsPackable>true</IsPackable>
+ <NoWarn>$(NoWarn);NU1605</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Remove="commands\dotnet-new\**" />
--
2.29.2

View file

@ -0,0 +1,40 @@
From 071dfef93e5431a415bd9298f2ed8aaf9a22524f Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Mon, 11 Oct 2021 19:35:15 +0000
Subject: [PATCH] Don't publish for win runtime identifier in source-build
See https://github.com/microsoft/vstest/pull/3096
---
src/testhost.x86/testhost.x86.csproj | 2 +-
src/testhost/testhost.csproj | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/testhost.x86/testhost.x86.csproj b/src/testhost.x86/testhost.x86.csproj
index 7eb5cd15..09856522 100644
--- a/src/testhost.x86/testhost.x86.csproj
+++ b/src/testhost.x86/testhost.x86.csproj
@@ -19,7 +19,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' != 'netcoreapp2.1' AND '$(TargetFramework)' != 'netcoreapp1.0' AND '$(TargetFramework)' != 'net6.0' ">
- <RuntimeIdentifier>win7-x86</RuntimeIdentifier>
+ <RuntimeIdentifier Condition="'$(DotNetBuildFromSource)' != 'true'">win7-x86</RuntimeIdentifier>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<TargetName Condition="'$(TargetFramework)' != 'net451'">$(AssemblyName.Replace('.x86', '')).$(TargetFramework).x86</TargetName>
</PropertyGroup>
diff --git a/src/testhost/testhost.csproj b/src/testhost/testhost.csproj
index a780e4e9..ba0fd259 100644
--- a/src/testhost/testhost.csproj
+++ b/src/testhost/testhost.csproj
@@ -16,7 +16,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' != 'netcoreapp2.1' AND '$(TargetFramework)' != 'netcoreapp1.0' AND '$(TargetFramework)' != 'net6.0' ">
- <RuntimeIdentifier>win7-x64</RuntimeIdentifier>
+ <RuntimeIdentifier Condition="'$(DotNetBuildFromSource)' != 'true'">win7-x64</RuntimeIdentifier>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<TargetName Condition="'$(TargetFramework)' != 'net451'">$(AssemblyName).$(TargetFramework)</TargetName>
</PropertyGroup>
--
2.31.1

View file

@ -11,7 +11,7 @@
</ItemGroup>
<!-- Restore workload manifests via PackageReference -->
<ItemGroup>
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<BundledManifestsForPackageDownload Include="@(BundledManifests)" >
<Version>[%(Version)]</Version>
</BundledManifestsForPackageDownload>
@ -26,7 +26,8 @@
</ItemGroup>
<Target Name="LayoutManifests"
DependsOnTargets="LayoutManifestsForSDK;LayoutManifestsForMSI" />
DependsOnTargets="LayoutManifestsForSDK;LayoutManifestsForMSI"
Condition="'$(DotNetBuildFromSource)' != 'true'"/>
<Target Name="LayoutManifestsForSDK"
DependsOnTargets="SetupBundledComponents;GenerateManifestVersions">

View file

@ -803,6 +803,7 @@ Copyright (c) .NET Foundation. All rights reserved.
/>
<!-- Supported Windows versions -->
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.22000.0" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_22000PackageVersion)" MinimumNETVersion="5.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.20348.0" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_20348PackageVersion)" MinimumNETVersion="5.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.19041.0" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_19041PackageVersion)" MinimumNETVersion="5.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.18362.0" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_18362PackageVersion)" MinimumNETVersion="5.0" />

View file

@ -316,7 +316,7 @@
</BundledLayoutPackage>
<BundledLayoutComponent Include="WinFormsAndWpfSharedFxArchiveFile">
<BaseUrl>$(WinFormsAndWpfSharedFxRootUrl)$(WindowsDesktopTargetingPackBlobVersion)</BaseUrl>
<BaseUrl>$(WinFormsAndWpfSharedFxRootUrl)$(WindowsDesktopBlobVersion)</BaseUrl>
<DownloadFileName>$(WinFormsAndWpfSharedFxArchiveFileName)</DownloadFileName>
</BundledLayoutComponent>

View file

@ -44,8 +44,8 @@
Impersonate="no"/>
<InstallExecuteSequence>
<Custom Action="PropertyAssignPrimeCacheAndTelemetry" Before="QtExecPrimeCacheAndTelemetryTarget" />
<Custom Action="QtExecPrimeCacheAndTelemetryTarget" Before="InstallFinalize" />
<Custom Action="PropertyAssignPrimeCacheAndTelemetry" Before="QtExecPrimeCacheAndTelemetryTarget">NOT Installed</Custom>
<Custom Action="QtExecPrimeCacheAndTelemetryTarget" Before="InstallFinalize">NOT Installed</Custom>
</InstallExecuteSequence>
</Product>
<Fragment>

View file

@ -16,7 +16,8 @@ namespace EndToEnd
[InlineData("10.0.17763.0")]
[InlineData("10.0.18362.0")]
[InlineData("10.0.19041.0")]
[InlineData("10.0.20348.0", Skip = "Package not published yet")]
[InlineData("10.0.20348.0")]
[InlineData("10.0.22000.0", Skip = "Package not published yet")]
public void ItCanBuildAndRun(string targetPlatformVersion)
{
var testInstance = TestAssets.Get(TestAssetKinds.TestProjects, "UseCswinrt")