Merge remote-tracking branch 'origin/main' into marcpopMSFT-addlcifile

This commit is contained in:
Marc Paine 2023-04-13 12:58:14 -07:00
commit f6e04c22f6
106 changed files with 2103 additions and 3583 deletions

View file

@ -0,0 +1,52 @@
<!--
######## ######## ### ######## ######## ## ## #### ######
## ## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ##
######## ###### ## ## ## ## ## ######### ## ######
## ## ## ######### ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ## ##
## ## ######## ## ## ######## ## ## ## #### ######
-->
This Codespace can help you debug the source build of .NET. This build takes about
45 minutes and, after completion, produces an archived .NET SDK located in
`/workspaces/dotnet/artifacts/x64/Release`. In case you selected the `prebuilt-sdk`
Codespace, the SDK will already be there.
## Build the SDK
To build the VMR, run following:
```bash
./prep.sh && ./build.sh --online
```
> Please note that, at this time, the build modifies some of the checked-in sources so it might
be preferential to rebuild the Codespace between attempts (or reset the working tree changes).
For more details, see the instructions at https://github.com/dotnet/dotnet.
## Synchronize your changes in locally
When debugging the build, you have two options how to test your changes in this environment.
### Making changes to the VMR directly
You can make the changes directly to the local checkout of the VMR at `/workspaces/dotnet`. You
can then try to build the VMR and see if the change works for you.
### Pull changes into the Codespace from your fork
You can also make a fix in the individual source repository (e.g. `dotnet/runtime`) and push the
fix into a branch; can be in your fork too. Once you have the commit pushed, you can pull this
version of the repository into the Codespace by running:
```
/workspaces/synchronize-vmr.sh \
--repository <repo>:<commit, tag or branch> \
--remote <repo>:<fork URI>
```
You can now proceed building the VMR in the Codespace using instructions above. You can repeat
this process and sync a new commit from your fork. Only note that, at this time, Source-Build
modifies some of the checked-in sources so you'll need to revert the working tree changes
between attempts.

View file

@ -11,6 +11,12 @@
"extensions": [
"ms-dotnettools.csharp"
]
},
"codespaces": {
"openFiles": [
".devcontainer/README.md"
]
}
}
},
"onCreateCommand": ".devcontainer/init.sh"
}

View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -eux
source="${BASH_SOURCE[0]}"
script_root="$( cd -P "$( dirname "$source" )" && pwd )"
workspace_dir=$(realpath "$script_root/../../")
tmp_dir=$(realpath "$workspace_dir/tmp")
vmr_dir=$(realpath "$workspace_dir/dotnet")
cp "$vmr_dir/.devcontainer/synchronize-vmr.sh" "$workspace_dir"
mkdir -p "$tmp_dir"

View file

@ -1,11 +0,0 @@
#!/usr/bin/env bash
source="${BASH_SOURCE[0]}"
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
"$scriptroot"/../../prep.sh
# GitHub Codespaces sets this and it conflicts with source-build scripts.
unset RepositoryName
"$scriptroot"/../../build.sh --online --clean-while-building || exit 0

View file

@ -11,7 +11,12 @@
"extensions": [
"ms-dotnettools.csharp"
]
},
"codespaces": {
"openFiles": [
".devcontainer/README.md"
]
}
},
"onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/prebuilt-sdk/build.sh"
"onCreateCommand": ".devcontainer/prebuilt-sdk/init.sh"
}

View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
source="${BASH_SOURCE[0]}"
script_root="$( cd -P "$( dirname "$source" )" && pwd )"
"$script_root"/../../prep.sh
cp "$script_root/../synchronize-vmr.sh" "/workspaces/"
"$script_root"/../../build.sh --online --clean-while-building || exit 0

View file

@ -0,0 +1,4 @@
#!/bin/bash
(cd /workspaces/dotnet/src/installer \
&& ./eng/vmr-sync.sh --vmr /workspaces/dotnet --tmp /workspaces/tmp --no-vmr-prepare $*)

View file

@ -173,12 +173,7 @@
</PropertyGroup>
<PropertyGroup>
<!-- known-good (repos/known-good.proj) conditionally includes submodules based on the platform,
so this will not always correspond to the same repos - see that file for details.
We need an "empty" project after the last real project in order for prebuilt detection
to work, so we always build known-good. -->
<RootRepo>known-good</RootRepo>
<RootRepoTests>known-good-tests</RootRepoTests>
<RootRepo>dotnet</RootRepo>
</PropertyGroup>
<!--
@ -204,7 +199,7 @@
<Import Project="$(GitInfoAllRepoPropsFile)" />
<!-- Additional psuedo-versions that some repos depend on -->
<!-- Additional pseudo-versions that some repos depend on -->
<ItemGroup>
<!-- we don't produce the Windows version of this package but that's the one core-sdk keys off of for the ASP.NET version -->
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftAspNetCoreAppRuntimewinx64PackageVersion" Version="$(aspnetcoreOutputPackageVersion)" />

View file

@ -13,13 +13,6 @@
<MSBuild Projects="$(RepoProjectsDir)$(RootRepo).proj" Targets="Build" BuildInParallel="$(BuildInParallel)" StopOnFirstFailure="true" />
</Target>
<Target Name="RunRepoTests" DependsOnTargets="PrepareOutput;InitBuild">
<Message Text="Build Environment: $(Platform) $(Configuration) $(TargetOS) $(TargetRid)" />
<MSBuild Projects="$(RepoProjectsDir)$(RootRepoTests).proj" Targets="Build" Properties="PrepForTests=true;SkipEnsurePackagesCreated=true" BuildInParallel="$(BuildInParallel)" StopOnFirstFailure="true" />
<MSBuild Projects="$(RepoProjectsDir)$(RootRepoTests).proj" Targets="Build" Properties="RunTests=true;SkipEnsurePackagesCreated=true" BuildInParallel="$(BuildInParallel)" StopOnFirstFailure="true" />
</Target>
<Target Name="PrepareOutput">
<MakeDir Directories="$(OutputPath)" />
<MakeDir Directories="$(LoggingDir)" />

View file

@ -19,7 +19,6 @@ usage() {
SCRIPT_ROOT="$(cd -P "$( dirname "$0" )" && pwd)"
MSBUILD_ARGUMENTS=("-flp:v=detailed")
CUSTOM_REF_PACKAGES_DIR=''
CUSTOM_PACKAGES_DIR=''
alternateTarget=false
runningSmokeTests=false
@ -34,7 +33,7 @@ while :; do
break
fi
lowerI="$(echo $1 | awk '{print tolower($0)}')"
lowerI="$(echo "$1" | awk '{print tolower($0)}')"
case $lowerI in
--clean-while-building)
MSBUILD_ARGUMENTS+=( "-p:CleanWhileBuilding=true")
@ -78,7 +77,7 @@ while :; do
echo "Detected '--': passing remaining parameters '$@' as build.sh arguments."
break
;;
-?|-h|--help)
'-?'|-h|--help)
usage
exit 0
;;
@ -114,14 +113,19 @@ if [ -f "${packagesArchiveDir}archiveArtifacts.txt" ]; then
fi
fi
if [ ! -d "$SCRIPT_ROOT/.git" ]; then
echo "ERROR: $SCRIPT_ROOT is not a git repository. Please run prep.sh add initialize Source Link metadata."
exit 1
fi
if [ -d "$CUSTOM_SDK_DIR" ]; then
export SDK_VERSION=`"$CUSTOM_SDK_DIR/dotnet" --version`
export SDK_VERSION=$("$CUSTOM_SDK_DIR/dotnet" --version)
export CLI_ROOT="$CUSTOM_SDK_DIR"
export _InitializeDotNetCli="$CLI_ROOT/dotnet"
export CustomDotNetSdkDir="$CLI_ROOT"
echo "Using custom bootstrap SDK from '$CLI_ROOT', version '$SDK_VERSION'"
else
sdkLine=`grep -m 1 'dotnet' "$SCRIPT_ROOT/global.json"`
sdkLine=$(grep -m 1 'dotnet' "$SCRIPT_ROOT/global.json")
sdkPattern="\"dotnet\" *: *\"(.*)\""
if [[ $sdkLine =~ $sdkPattern ]]; then
export SDK_VERSION=${BASH_REMATCH[1]}
@ -134,7 +138,7 @@ packageVersionsPath=''
if [[ "$CUSTOM_PACKAGES_DIR" != "" && -f "$CUSTOM_PACKAGES_DIR/PackageVersions.props" ]]; then
packageVersionsPath="$CUSTOM_PACKAGES_DIR/PackageVersions.props"
elif [ -d "$packagesArchiveDir" ]; then
sourceBuiltArchive=`find $packagesArchiveDir -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz'`
sourceBuiltArchive=$(find "$packagesArchiveDir" -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz')
if [ -f "${packagesPreviouslySourceBuiltDir}}PackageVersions.props" ]; then
packageVersionsPath=${packagesPreviouslySourceBuiltDir}PackageVersions.props
elif [ -f "$sourceBuiltArchive" ]; then
@ -150,7 +154,7 @@ if [ ! -f "$packageVersionsPath" ]; then
exit 1
fi
arcadeSdkLine=`grep -m 1 'MicrosoftDotNetArcadeSdkVersion' "$packageVersionsPath"`
arcadeSdkLine=$(grep -m 1 'MicrosoftDotNetArcadeSdkVersion' "$packageVersionsPath")
versionPattern="<MicrosoftDotNetArcadeSdkVersion>(.*)</MicrosoftDotNetArcadeSdkVersion>"
if [[ $arcadeSdkLine =~ $versionPattern ]]; then
export ARCADE_BOOTSTRAP_VERSION=${BASH_REMATCH[1]}
@ -163,7 +167,7 @@ if [[ $arcadeSdkLine =~ $versionPattern ]]; then
export SOURCE_BUILT_SDK_DIR_ARCADE=$packagesRestoredDir/ArcadeBootstrapPackage/microsoft.dotnet.arcade.sdk/$ARCADE_BOOTSTRAP_VERSION
fi
sourceLinkLine=`grep -m 1 'MicrosoftSourceLinkCommonVersion' "$packageVersionsPath"`
sourceLinkLine=$(grep -m 1 'MicrosoftSourceLinkCommonVersion' "$packageVersionsPath")
versionPattern="<MicrosoftSourceLinkCommonVersion>(.*)</MicrosoftSourceLinkCommonVersion>"
if [[ $sourceLinkLine =~ $versionPattern ]]; then
export SOURCE_LINK_BOOTSTRAP_VERSION=${BASH_REMATCH[1]}
@ -179,11 +183,11 @@ LogDateStamp=$(date +"%m%d%H%M%S")
"$CLI_ROOT/dotnet" build-server shutdown
if [ "$alternateTarget" == "true" ]; then
"$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/build.proj" -bl:$SCRIPT_ROOT/artifacts/log/Debug/BuildTests_$LogDateStamp.binlog -flp:LogFile=$SCRIPT_ROOT/artifacts/logs/BuildTests_$LogDateStamp.log -clp:v=m ${MSBUILD_ARGUMENTS[@]} "$@"
"$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/build.proj" -bl:"$SCRIPT_ROOT/artifacts/log/Debug/BuildTests_$LogDateStamp.binlog" -flp:"LogFile=$SCRIPT_ROOT/artifacts/logs/BuildTests_$LogDateStamp.log" -clp:v=m ${MSBUILD_ARGUMENTS[@]} "$@"
else
"$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/eng/tools/init-build.proj" -bl:$SCRIPT_ROOT/artifacts/log/Debug/BuildXPlatTasks_$LogDateStamp.binlog -flp:LogFile=$SCRIPT_ROOT/artifacts/logs/BuildXPlatTasks_$LogDateStamp.log -t:PrepareOfflineLocalTools ${MSBUILD_ARGUMENTS[@]} "$@"
"$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/eng/tools/init-build.proj" -bl:"$SCRIPT_ROOT/artifacts/log/Debug/BuildXPlatTasks_$LogDateStamp.binlog" -flp:LogFile="$SCRIPT_ROOT/artifacts/logs/BuildXPlatTasks_$LogDateStamp.log" -t:PrepareOfflineLocalTools ${MSBUILD_ARGUMENTS[@]} "$@"
# kill off the MSBuild server so that on future invocations we pick up our custom SDK Resolver
"$CLI_ROOT/dotnet" build-server shutdown
"$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/build.proj" -bl:$SCRIPT_ROOT/artifacts/log/Debug/Build_$LogDateStamp.binlog -flp:LogFile=$SCRIPT_ROOT/artifacts/logs/Build_$LogDateStamp.log ${MSBUILD_ARGUMENTS[@]} "$@"
"$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/build.proj" -bl:"$SCRIPT_ROOT/artifacts/log/Debug/Build_$LogDateStamp.binlog" -flp:"LogFile=$SCRIPT_ROOT/artifacts/logs/Build_$LogDateStamp.log" ${MSBUILD_ARGUMENTS[@]} "$@"
fi

View file

@ -12,19 +12,14 @@
<PropertyGroup>
<!--
Building .NET from source depends on one or two tar.gz files depending on the branch's current
Building .NET from source depends on several archives, depending on the branch's current
source-buildability status.
PrivateSourceBuiltArtifactsPackageVersion is a tar.gz of .NET build outputs from a previous
build needed to build the current version of .NET. This is always defined, because .NET needs
to be bootstrappable at any point in time.
PrivateSourceBuiltPrebuiltsPackageVersion is a tar.gz of assets downloaded from the internet
that are needed to build the current version of .NET. Early in the lifecycle of a .NET major
or minor release, prebuilts may be needed. When the release is mature, prebuilts are not
necessary, and this property is removed from the file.
These URLs can't be composed from their base URL and version as we read them from the
prep.sh and pipeline scripts, outside of MSBuild.
-->
<PrivateSourceBuiltArtifactsPackageVersion>0.1.0-8.0.100-5.centos.8-x64</PrivateSourceBuiltArtifactsPackageVersion>
<PrivateSourceBuiltPrebuiltsPackageVersion>0.1.0-8.0.100-3.centos.8-x64</PrivateSourceBuiltPrebuiltsPackageVersion>
<PrivateSourceBuiltArtifactsUrl>https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.8.0.100-preview.3.23178.7.centos.8-x64.tar.gz</PrivateSourceBuiltArtifactsUrl>
<PrivateSourceBuiltPrebuiltsUrl>https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Prebuilts.0.1.0-8.0.100-19.centos.8-x64.tar.gz</PrivateSourceBuiltPrebuiltsUrl>
<PrivateSourceBuiltSdkUrl_CentOS8Stream>https://dotnetcli.azureedge.net/source-built-artifacts/sdks/dotnet-sdk-8.0.100-preview.3.23210.1-centos.8-x64.tar.gz</PrivateSourceBuiltSdkUrl_CentOS8Stream>
</PropertyGroup>
</Project>

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<!-- 7.0.0 produced improperly versioned runtime assets because the OfficialBuildId
was not set correctly. This is the actual shipping version that it should have been -->
<NonshippingRuntimeVersionFor700>7.0.0-rtm.22518.5</NonshippingRuntimeVersionFor700>
<NonshippingRuntimeVersionFor700>7.0.4-servicing.23107.6</NonshippingRuntimeVersionFor700>
<MicrosoftNETHostModelVersion>$(NonshippingRuntimeVersionFor700)</MicrosoftNETHostModelVersion>
<MicrosoftNETCoreTestHostVersion>$(NonshippingRuntimeVersionFor700)</MicrosoftNETCoreTestHostVersion>

View file

@ -12,44 +12,95 @@
<NewTarballName>$(ArchiveDir)Private.SourceBuilt.Artifacts.Bootstrap.tar.gz</NewTarballName>
</PropertyGroup>
<ItemDefinitionGroup>
<PortablePackage>
<IsNative>false</IsNative>
</PortablePackage>
</ItemDefinitionGroup>
<ItemGroup>
<!-- These packages will be replaced with ms-built packages downloaded from official package feeds-->
<PackageDownload Include="Microsoft.Aspnetcore.App.Runtime.linux-x64" Version="[$(MicrosoftAspNetCoreAppRuntimeVersion)]" />
<PackageDownload Include="Microsoft.NETCore.App.Crossgen2.linux-x64" Version="[$(MicrosoftNETCoreAppCrossgen2Version)]" />
<PackageDownload Include="Microsoft.NETCore.App.Host.linux-x64" Version="[$(MicrosoftNETCoreAppHostPackageVersion)]" />
<PackageDownload Include="Microsoft.NETCore.App.Runtime.linux-x64" Version="[$(MicrosoftNETCoreAppRuntimeVersion)]" />
<PackageDownload Include="Microsoft.NET.HostModel" Version="[$(MicrosoftNETHostModelVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.IL" Version="[$(MicrosoftNETSdkILVersion)]" />
<PackageDownload Include="Microsoft.NETCore.ILAsm" Version="[$(MicrosoftNETCoreILAsmVersion)]" />
<PackageDownload Include="Microsoft.NETCore.ILDAsm" Version="[$(MicrosoftNETCoreILDAsmVersion)]" />
<PackageDownload Include="Microsoft.NETCore.TestHost" Version="[$(MicrosoftNETCoreTestHostVersion)]" />
<PackageDownload Include="runtime.linux-x64.Microsoft.NETCore.ILAsm" Version="[$(MicrosoftNETCoreILAsmVersion)]" />
<PackageDownload Include="runtime.linux-x64.Microsoft.NETCore.ILDAsm" Version="[$(MicrosoftNETCoreILDAsmVersion)]" />
<PackageDownload Include="runtime.linux-x64.Microsoft.NETCore.TestHost" Version="[$(MicrosoftNETCoreTestHostVersion)]" />
<PackageDownload Include="runtime.linux-x64.runtime.native.System.IO.Ports" Version="[$(SystemIOPortsVersion)]" />
<PackageDownload Include="runtime.linux-musl-x64.Microsoft.NETCore.ILAsm" Version="[$(MicrosoftNETCoreILAsmVersion)]" />
<PackageDownload Include="runtime.linux-musl-x64.Microsoft.NETCore.ILDAsm" Version="[$(MicrosoftNETCoreILDAsmVersion)]" />
<PackageDownload Include="runtime.linux-musl-x64.Microsoft.NETCore.TestHost" Version="[$(MicrosoftNETCoreTestHostVersion)]" />
<!-- There's no nuget package for runtime.linux-musl-x64.runtime.native.System.IO.Ports
<PackageReference Include="runtime.linux-musl-x64.runtime.native.System.IO.Ports" Version="$(RuntimeLinuxX64RuntimeNativeSystemIOPortsVersion)" />
-->
<!-- Packages needed to bootstrap arm64 -->
<PackageDownload Include="Microsoft.Aspnetcore.App.Runtime.linux-arm64" Version="[$(MicrosoftAspNetCoreAppRuntimeVersion)]" />
<PackageDownload Include="Microsoft.NETCore.App.Crossgen2.linux-arm64" Version="[$(MicrosoftNETCoreAppCrossgen2Version)]" />
<PackageDownload Include="Microsoft.NETCore.App.Host.linux-arm64" Version="[$(MicrosoftNETCoreAppHostPackageVersion)]" />
<PackageDownload Include="Microsoft.NETCore.App.Runtime.linux-arm64" Version="[$(MicrosoftNETCoreAppRuntimeVersion)]" />
<PackageDownload Include="runtime.linux-arm64.Microsoft.DotNet.IlCompiler" Version="[$(MicrosoftDotNetIlCompilerVersion)]" />
<PackageDownload Include="runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost" Version="[$(MicrosoftNETCoreDotNetAppHostVersion)]" />
<PackageDownload Include="runtime.linux-arm64.Microsoft.NETCore.DotNetHost" Version="[$(MicrosoftNETCoreDotNetHostVersion)]" />
<PackageDownload Include="runtime.linux-arm64.Microsoft.NETCore.DotNetHostPolicy" Version="[$(MicrosoftNETCoreDotNetHostPolicyVersion)]" />
<PackageDownload Include="runtime.linux-arm64.Microsoft.NETCore.DotNetHostResolver" Version="[$(MicrosoftNETCoreDotNetHostResolverVersion)]" />
<PackageDownload Include="runtime.linux-arm64.Microsoft.NETCore.ILAsm" Version="[$(MicrosoftNETCoreILAsmVersion)]" />
<PackageDownload Include="runtime.linux-arm64.Microsoft.NETCore.ILDAsm" Version="[$(MicrosoftNETCoreILDAsmVersion)]" />
<PackageDownload Include="runtime.linux-arm64.Microsoft.NETCore.TestHost" Version="[$(MicrosoftNETCoreTestHostVersion)]" />
<PackageDownload Include="runtime.linux-arm64.runtime.native.System.IO.Ports" Version="[$(RuntimeNativeSystemIOPortsVersion)]" />
<LinuxRid Include="linux-x64" />
<LinuxRid Include="linux-musl-x64" />
<LinuxRid Include="linux-arm64" />
<LinuxRid Include="linux-musl-arm64" />
</ItemGroup>
<Target Name="BuildBoostrapPreviouslySourceBuilt" AfterTargets="Restore">
<!-- These packages will be replaced with ms-built packages downloaded from official package feeds-->
<ItemGroup>
<RuntimePack Include="Microsoft.Aspnetcore.App.Runtime" Version="[$(MicrosoftAspNetCoreAppRuntimeVersion)]" />
<RuntimePack Include="Microsoft.NETCore.App.Crossgen2" Version="[$(MicrosoftNETCoreAppCrossgen2Version)]" />
<RuntimePack Include="Microsoft.NETCore.App.Host" Version="[$(MicrosoftNETCoreAppHostPackageVersion)]" />
<RuntimePack Include="Microsoft.NETCore.App.Runtime" Version="[$(MicrosoftNETCoreAppRuntimeVersion)]" />
<PortablePackage Include="Microsoft.DotNet.IlCompiler" Version="[$(MicrosoftDotNetIlCompilerVersion)]" />
<PortablePackage Include="Microsoft.NETCore.DotNetAppHost" Version="[$(MicrosoftNETCoreDotNetAppHostVersion)]" />
<PortablePackage Include="Microsoft.NETCore.DotNetHost" Version="[$(MicrosoftNETCoreDotNetHostVersion)]" />
<PortablePackage Include="Microsoft.NETCore.DotNetHostPolicy" Version="[$(MicrosoftNETCoreDotNetHostPolicyVersion)]" />
<PortablePackage Include="Microsoft.NETCore.DotNetHostResolver" Version="[$(MicrosoftNETCoreDotNetHostResolverVersion)]" />
<PortablePackage Include="Microsoft.NETCore.ILAsm" Version="[$(MicrosoftNETCoreILAsmVersion)]" />
<PortablePackage Include="Microsoft.NETCore.ILDAsm" Version="[$(MicrosoftNETCoreILDAsmVersion)]" />
<PortablePackage Include="Microsoft.NETCore.TestHost" Version="[$(MicrosoftNETCoreTestHostVersion)]" />
<PortablePackage Include="System.IO.Ports" Version="[$(RuntimeNativeSystemIOPortsVersion)]" IsNative="true" />
<!-- These packages don't actually exist -->
<ExcludedPackage Include="runtime.linux-musl-x64.runtime.native.System.IO.Ports" />
<ExcludedPackage Include="runtime.linux-musl-arm64.runtime.native.System.IO.Ports" />
</ItemGroup>
<Target Name="GetPackagesToDownload"
AfterTargets="CollectPackageDownloads"
Returns="@(PackageDownload)">
<ItemGroup>
<!-- Generate a cross-product between runtime packs and Linux RIDs -->
<RuntimePackWithLinuxRid Include="@(RuntimePack)">
<LinuxRid>%(LinuxRid.Identity)</LinuxRid>
</RuntimePackWithLinuxRid>
<!-- Generate a cross-product between portable packages and Linux RIDs -->
<PortablePackageWithLinuxRid Include="@(PortablePackage)">
<LinuxRid>%(LinuxRid.Identity)</LinuxRid>
</PortablePackageWithLinuxRid>
</ItemGroup>
<ItemGroup>
<!--
Generate package names for runtime packs by concatenating the base name with the Linux RID
(e.g. Microsoft.Aspnetcore.App.Runtime.linux-x64)
-->
<PackageWithName Include="@(RuntimePackWithLinuxRid)">
<PackageName>%(RuntimePackWithLinuxRid.Identity).%(RuntimePackWithLinuxRid.LinuxRid)</PackageName>
</PackageWithName>
<!--
Include the base name of each portable package (e.g. Microsoft.NETCore.ILAsm)
Exclude any that are native packages.
-->
<PackageWithName Include="@(PortablePackageWithLinuxRid)" Condition=" '%(PortablePackageWithLinuxRid.IsNative)' != 'true' ">
<PackageName>%(PortablePackageWithLinuxRid.Identity)</PackageName>
</PackageWithName>
<!--
Generate Linux RID package names for portable packages by concatenating the base name with the Linux RID
(e.g. runtime.linux-x64.Microsoft.NETCore.ILAsm)
Do this for two groups: native and non-native packages. They have different naming conventions.
-->
<PackageWithName Include="@(PortablePackageWithLinuxRid)" Condition=" '%(PortablePackageWithLinuxRid.IsNative)' != 'true' ">
<PackageName>runtime.%(PortablePackageWithLinuxRid.LinuxRid).%(PortablePackageWithLinuxRid.Identity)</PackageName>
</PackageWithName>
<PackageWithName Include="@(PortablePackageWithLinuxRid)" Condition=" '%(PortablePackageWithLinuxRid.IsNative)' == 'true' ">
<PackageName>runtime.%(PortablePackageWithLinuxRid.LinuxRid).runtime.native.%(PortablePackageWithLinuxRid.Identity)</PackageName>
</PackageWithName>
</ItemGroup>
<ItemGroup>
<PackageDownload Include="@(PackageWithName -> '%(PackageName)')" />
<PackageDownload Remove="@(ExcludedPackage)" />
</ItemGroup>
</Target>
<Target Name="BuildBoostrapPreviouslySourceBuilt"
AfterTargets="Restore"
DependsOnTargets="GetPackagesToDownload">
<ItemGroup>
<RestoredNupkgs Include="$(RestorePackagesPath)**/*.nupkg" />
<PrevSBArchive Include="$(ArchiveDir)Private.SourceBuilt.Artifacts.*.tar.gz" />
@ -78,7 +129,7 @@
Properties="SourcePath=$(RestorePackagesPath);DestinationPath=$(UnpackedTarPath);PackageName=%(PackageDownload.Identity);PackageVersion=%(PackageDownload.Version)" />
<!-- override PVP with bootstrap-override package versions -->
<Message Text=" Overriding previously-source-built package versions with $(BootstrapOverrideVersionsProps)" Importance="High" />
<Message Text=" Overriding previously-source-built package versions with $(BootstrapOverrideVersionsProps)" Importance="High" Condition="Exists('$(BootstrapOverrideVersionsProps)')" />
<ReadLinesFromFile File="$(UnpackedTarPath)/PackageVersions.props">
<Output TaskParameter="Lines" ItemName="OriginalPackageVersionLines" />
</ReadLinesFromFile>
@ -94,10 +145,12 @@
<WriteLinesToFile File="$(UnpackedTarPath)/PackageVersions.props"
Lines="@(OriginalPackageVersionLines)"
Overwrite="true"
Condition="Exists('$(BootstrapOverrideVersionsProps)')"
/>
<WriteLinesToFile File="$(UnpackedTarPath)/PackageVersions.props"
Lines="@(BootstrapPackageVersionLines)"
Overwrite="false"
Condition="Exists('$(BootstrapOverrideVersionsProps)')"
/>
<!-- Repack tarball with new bootstrap name -->

View file

@ -1,96 +0,0 @@
#!/usr/bin/env bash
### This script exports the sources of VMR (dotnet/dotnet) as an archive that can be used
### to build the .NET SDK.
### It expects you clone the dotnet/dotnet repo locally and check out the desired revision.
###
### USAGE:
### ./pack-sources.sh -o dotnet.tar.gz
### Options:
### -o, --output PATH
### Optional. Path or dir where the archive is created.
### Defaults to artifacts/packages/dotnet-[SHA].tar.gz
source="${BASH_SOURCE[0]}"
# resolve $source until the file is no longer a symlink
while [[ -h "$source" ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"
# if $source was a relative symlink, we need to resolve it relative to the path where the
# symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
function print_help () {
sed -n '/^### /,/^$/p' "$source" | cut -b 5-
}
GIT_ROOT=$(realpath "$scriptroot/../")
output=''
while [[ $# -gt 0 ]]; do
opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
-o|--output)
output=$2
shift
;;
-h|--help)
print_help
exit 0
;;
*)
fail "Invalid argument: $1"
usage
exit 1
;;
esac
shift
done
revision=$(git -C "$GIT_ROOT" rev-parse HEAD)
filename="dotnet-$revision"
if [[ -z "$output" ]]; then
output="$GIT_ROOT/artifacts/packages/$filename.tar.gz"
fi
# If output is directory, use the default filename
if [[ -d "$output" ]]; then
output="$output/$filename.tar.gz"
fi
set -e
echo "Packing sources of $revision to $output.."
mkdir -p "$(dirname "$output")"
rm -f "$output"
tmp="$GIT_ROOT/artifacts/tmp"
mkdir -p "$tmp"
config_file="$tmp/config"
HEAD_file="$tmp/HEAD"
start_time=$(date +%s)
# We need to had `.git/HEAD` and `.git/config` to the archive as the build expects those
echo $'[remote "origin"]\nurl="http://github.com/dotnet/dotnet"' > "$config_file"
echo "$revision" > "$HEAD_file"
git -C "$GIT_ROOT" archive \
-o "$output" \
--prefix "$filename/.git/" \
--add-file "$config_file" \
--add-file "$HEAD_file" \
--prefix "$filename/" \
"$revision" "$GIT_ROOT"
end_time=$(date +%s)
elapsed=$(( end_time - start_time ))
duration=$(date -u +%H:%M:%S "-d@$elapsed")
echo "Archive created in $duration"

View file

@ -1,55 +1,24 @@
# This is the main build definition (PR+CI) for dotnet/dotnet
trigger:
batch: true
branches:
include:
- main
- release/*
- internal/release/*
pr:
branches:
include:
- main
- release/*
- internal/release/*
stages:
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: templates/stages/vmr-scan.yml
# For rolling builds we want to build the MSFT SDK first so that we can
# compare the contents with the source-built one later.
# This only works because we don't run this test in PRs. If we decided
# to run this test in PRs, we would need to build the MSFT SDK there too.
- stage: Build_MSFT_SDK
displayName: Build MSFT SDK
dependsOn: []
jobs:
- template: /src/installer/eng/build.yml
parameters:
agentOs: Linux
jobName: Build_LinuxPortable_Release_x64
buildConfiguration: Release
buildArchitecture: x64
linuxPortable: true
runTests: false
isBuiltFromVmr: true
- template: /src/installer/eng/build.yml
parameters:
agentOs: Linux
jobName: Build_Arm64_Release
buildConfiguration: Release
buildArchitecture: arm64
runtimeIdentifier: 'linux-arm64'
linuxPortable: true
runTests: false
isBuiltFromVmr: true
- template: /src/installer/eng/pipelines/templates/stages/vmr-build.yml
parameters:
isBuiltFromVmr: true
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
dependsOn: Build_MSFT_SDK
condition: always()
# This is the main build definition (PR+CI) for dotnet/dotnet
trigger:
batch: true
branches:
include:
- main
- release/*
- internal/release/*
pr:
branches:
include:
- main
- release/*
- internal/release/*
stages:
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: templates/stages/vmr-scan.yml
- template: /src/installer/eng/pipelines/templates/stages/vmr-build.yml
parameters:
isBuiltFromVmr: true

View file

@ -5,9 +5,7 @@
<ItemGroup>
<AllRepoProjects
Include="$(ProjectDir)repo-projects\*.proj"
Exclude="
$(ProjectDir)repo-projects\known-good.proj;
$(ProjectDir)repo-projects\known-good-tests.proj" />
Exclude="$(ProjectDir)repo-projects\dotnet.proj" />
</ItemGroup>
<MSBuild

View file

@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "8.0.100-alpha.1.23080.2"
"dotnet": "8.0.100-preview.3.23178.7"
},
"msbuild-sdks": {
"Microsoft.Build.CentralPackageVersions": "2.0.1",

View file

@ -9,10 +9,27 @@ usage() {
echo ""
echo " Prepares the environment to be built by downloading Private.SourceBuilt.Artifacts.*.tar.gz and"
echo " installing the version of dotnet referenced in global.json"
echo "options:"
echo " --no-artifacts Exclude the download of the previously source-built artifacts archive"
echo " --no-bootstrap Don't replace portable packages in the download source-built artifacts"
echo " --no-prebuilts Exclude the download of the prebuilts archive"
echo " --no-sdk Exclude the download of the .NET SDK"
echo " --source-repository <url> Source Link repository URL, required when building from tarball"
echo " --source-version <sha> Source Link revision, required when building from tarball"
echo " --runtime-source-feed URL of a remote server or a local directory, from which SDKs and"
echo " runtimes can be downloaded"
echo " --runtime-source-feed-key Key for accessing the above server, if necessary"
echo ""
}
buildBootstrap=false
buildBootstrap=true
downloadArtifacts=true
downloadPrebuilts=true
installDotnet=true
sourceUrl=''
sourceVersion=''
runtime_source_feed='' # IBM requested these to support s390x scenarios
runtime_source_feed_key='' # IBM requested these to support s390x scenarios
positional_args=()
while :; do
if [ $# -le 0 ]; then
@ -24,6 +41,34 @@ while :; do
usage
exit 0
;;
--no-bootstrap)
buildBootstrap=false
;;
--no-artifacts)
downloadArtifacts=false
;;
--no-prebuilts)
downloadPrebuilts=false
;;
--no-sdk)
installDotnet=false
;;
--source-repository)
sourceUrl="$2"
shift
;;
--source-version)
sourceVersion="$2"
shift
;;
--runtime-source-feed)
runtime_source_feed=$2
shift
;;
--runtime-source-feed-key)
runtime_source_feed_key=$2
shift
;;
*)
positional_args+=("$1")
;;
@ -32,57 +77,77 @@ while :; do
shift
done
downloadArtifacts=true
downloadPrebuilts=true
installDotnet=true
# Attempting to bootstrap without an SDK will fail. So either the --no-sdk flag must be passed
# or a pre-existing .dotnet SDK directory must exist.
if [ "$buildBootstrap" == true ] && [ "$installDotnet" == false ] && [ ! -d "$SCRIPT_ROOT/.dotnet" ]; then
echo " ERROR: --no-sdk requires --no-bootstrap or a pre-existing .dotnet SDK directory. Exiting..."
exit 1
fi
# Check to make sure curl exists to download the archive files
if ! command -v curl &> /dev/null
then
echo " ERROR: curl not found. Exiting..."
exit -1
exit 1
fi
GIT_DIR="$SCRIPT_ROOT/.git"
if [ -f "$GIT_DIR/index" ]; then # We check for index because if outside of git, we create config and HEAD manually
if [ -n "$sourceUrl" ] || [ -n "$sourceVersion" ]; then
echo "ERROR: $SCRIPT_ROOT is a git repository, --source-repository and --source-version cannot be used."
exit 1
fi
else
if [ -z "$sourceUrl" ] || [ -z "$sourceVersion" ]; then
echo "ERROR: $SCRIPT_ROOT is not a git repository, --source-repository and --source-version must be specified."
exit 1
fi
# We need to add "fake" .git/ files when not building from a git repository
mkdir -p "$GIT_DIR"
echo '[remote "origin"]' > "$GIT_DIR/config"
echo "url=\"$sourceUrl\"" >> "$GIT_DIR/config"
echo "$sourceVersion" > "$GIT_DIR/HEAD"
fi
# Check if Private.SourceBuilt artifacts archive exists
artifactsBaseFileName="Private.SourceBuilt.Artifacts"
packagesArchiveDir="$SCRIPT_ROOT/prereqs/packages/archive/"
if [ -f ${packagesArchiveDir}${artifactsBaseFileName}.*.tar.gz ]; then
if [ "$downloadArtifacts" == true ] && [ -f ${packagesArchiveDir}${artifactsBaseFileName}.*.tar.gz ]; then
echo " Private.SourceBuilt.Artifacts.*.tar.gz exists...it will not be downloaded"
downloadArtifacts=false
fi
# Check if Private.SourceBuilt prebuilts archive exists
prebuiltsBaseFileName="Private.SourceBuilt.Prebuilts"
if [ -f ${packagesArchiveDir}${prebuiltsBaseFileName}.*.tar.gz ]; then
if [ "$downloadPrebuilts" == true ] && [ -f ${packagesArchiveDir}${prebuiltsBaseFileName}.*.tar.gz ]; then
echo " Private.SourceBuilt.Prebuilts.*.tar.gz exists...it will not be downloaded"
downloadPrebuilts=false
fi
# Check if dotnet is installed
if [ -d $SCRIPT_ROOT/.dotnet ]; then
if [ "$installDotnet" == true ] && [ -d "$SCRIPT_ROOT/.dotnet" ]; then
echo " ./.dotnet SDK directory exists...it will not be installed"
installDotnet=false;
fi
function DownloadArchive {
archiveType="$1"
baseFileName="$2"
isRequired="$3"
isRequired="$2"
sourceBuiltArtifactsTarballUrl="https://dotnetcli.azureedge.net/source-built-artifacts/assets/"
packageVersionsPath="$SCRIPT_ROOT/eng/Versions.props"
notFoundMessage="No source-built $archiveType found to download..."
echo " Looking for source-built $archiveType to download..."
archiveVersionLine=`grep -m 1 "<PrivateSourceBuilt${archiveType}PackageVersion>" "$packageVersionsPath" || :`
versionPattern="<PrivateSourceBuilt${archiveType}PackageVersion>(.*)</PrivateSourceBuilt${archiveType}PackageVersion>"
archiveVersionLine=$(grep -m 1 "<PrivateSourceBuilt${archiveType}Url>" "$packageVersionsPath" || :)
versionPattern="<PrivateSourceBuilt${archiveType}Url>(.*)</PrivateSourceBuilt${archiveType}Url>"
if [[ $archiveVersionLine =~ $versionPattern ]]; then
archiveUrl="${sourceBuiltArtifactsTarballUrl}${baseFileName}.${BASH_REMATCH[1]}.tar.gz"
archiveUrl="${BASH_REMATCH[1]}"
echo " Downloading source-built $archiveType from $archiveUrl..."
(cd $packagesArchiveDir && curl --retry 5 -O $archiveUrl)
elif [ "$isRequired" == "true" ]; then
(cd "$packagesArchiveDir" && curl --retry 5 -O "$archiveUrl")
elif [ "$isRequired" == true ]; then
echo " ERROR: $notFoundMessage"
exit -1
exit 1
else
echo " $notFoundMessage"
fi
@ -96,37 +161,39 @@ function BootstrapArtifacts {
echo " Building bootstrap previously source-built in $workingDir"
# Copy bootstrap project to working dir
cp $SCRIPT_ROOT/eng/bootstrap/buildBootstrapPreviouslySB.csproj $workingDir
cp "$SCRIPT_ROOT/eng/bootstrap/buildBootstrapPreviouslySB.csproj" "$workingDir"
# Copy NuGet.config from the installer repo to have the right feeds
cp $SCRIPT_ROOT/src/installer/NuGet.config $workingDir
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 $packagesArchiveDir -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz'`
sourceBuiltArchive=$(find "$packagesArchiveDir" -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz')
if [ -f "$sourceBuiltArchive" ]; then
tar -xzf "$sourceBuiltArchive" -C $workingDir PackageVersions.props
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:artifacts/prep/bootstrap.binlog /fileLoggerParameters:LogFile=artifacts/prep/bootstrap.log /p:ArchiveDir="$packagesArchiveDir" /p:BootstrapOverrideVersionsProps="$SCRIPT_ROOT/eng/bootstrap/OverrideBootstrapVersions.props"
"$DOTNET_SDK_PATH/dotnet" restore "$workingDir/buildBootstrapPreviouslySB.csproj" /bl:artifacts/prep/bootstrap.binlog /fileLoggerParameters:LogFile=artifacts/prep/bootstrap.log /p:ArchiveDir="$packagesArchiveDir" /p:BootstrapOverrideVersionsProps="$SCRIPT_ROOT/eng/bootstrap/OverrideBootstrapVersions.props"
# Remove working directory
rm -rf $workingDir
rm -rf "$workingDir"
}
# Check for the version of dotnet to install
if [ "$installDotnet" == "true" ]; then
if [ "$installDotnet" == true ]; then
echo " Installing dotnet..."
(source ./eng/common/tools.sh && InitializeDotNetCli true)
fi
# Read the eng/Versions.props to get the archives to download and download them
if [ "$downloadArtifacts" == "true" ]; then
DownloadArchive "Artifacts" $artifactsBaseFileName "true"
BootstrapArtifacts
if [ "$downloadArtifacts" == true ]; then
DownloadArchive Artifacts true
if [ "$buildBootstrap" == true ]; then
BootstrapArtifacts
fi
fi
if [ "$downloadPrebuilts" == "true" ]; then
DownloadArchive "Prebuilts" $prebuiltsBaseFileName "false"
if [ "$downloadPrebuilts" == true ]; then
DownloadArchive Prebuilts false
fi

View file

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<RepositoryName Condition="'$(RepositoryName)' == ''">$(MSBuildProjectName)</RepositoryName>
<RepositoryName>$(MSBuildProjectName)</RepositoryName>
</PropertyGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" />
@ -29,6 +29,12 @@
<SnapshotPackageVersionPropsPath>$(IntermediatePath)PackageVersions.$(RepositoryName).Snapshot.props</SnapshotPackageVersionPropsPath>
<PackageVersionPropsPath>$(IntermediatePath)PackageVersions.$(RepositoryName).props</PackageVersionPropsPath>
<PackageVersionPropsFlowType>AllPackages</PackageVersionPropsFlowType>
<EngCommonToolsShFile Condition="Exists('$(ProjectDirectory)eng/common/tools.sh')">$(ProjectDirectory)eng/common/tools.sh</EngCommonToolsShFile>
<EngCommonBuildShFile Condition="Exists('$(ProjectDirectory)eng/common/build.sh')">$(ProjectDirectory)eng/common/build.sh</EngCommonBuildShFile>
<GlobalJsonFile Condition="'$(GlobalJsonFile)' == '' and Exists('$(ProjectDirectory)global.json')">$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile Condition="'$(NuGetConfigFile)' == '' and Exists('$(ProjectDirectory)NuGet.config')">$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<NuGetConfigFile Condition="'$(NuGetConfigFile)' == '' and Exists('$(ProjectDirectory)NuGet.Config')">$(ProjectDirectory)NuGet.Config</NuGetConfigFile>
</PropertyGroup>
<PropertyGroup Condition="'$(OS)' == 'Windows_NT'">
@ -167,4 +173,9 @@
<MsBuildTraversalSdkOverride Include="Microsoft.Build.Traversal" Group="MSBUILD_TRAVERSAL" Version="2.0.2"/>
<WindowsDesktopSdkOverride Include="Microsoft.Net.Sdk.WindowsDesktop" Group="WINDOWS_DESKTOP" Location="$(ToolsDir)EmptySdk"/>
</ItemGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Condition="'$(UseBootstrapArcade)' != 'true'" Include="@(ArcadeSdkOverride)" />
<UseSourceBuiltSdkOverride Condition="'$(UseBootstrapArcade)' == 'true'" Include="@(ArcadeBootstrapSdkOverride)" />
</ItemGroup>
</Project>

View file

@ -17,45 +17,6 @@
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ZipFileExtractToDirectory" />
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ReplaceTextInFile" />
<!--
Central property to define that a repo doesn't implement any of the Repo API. If a repo adds an
implementation of a specific part of the Repo API, replace RepoApiImplemented in the repo's
props file with the properties below. When more API surface area is added, remove the
corresponding lines from the repo's props file. Once the entire API is implemented, the props
file is clean.
-->
<PropertyGroup>
<RepoApiImplemented Condition="'$(RepoApiImplemented)' == ''">true</RepoApiImplemented>
<EngCommonToolsShFile Condition="Exists('$(ProjectDirectory)/eng/common/tools.sh')">$(ProjectDirectory)/eng/common/tools.sh</EngCommonToolsShFile>
<EngCommonBuildShFile Condition="Exists('$(ProjectDirectory)/eng/common/build.sh')">$(ProjectDirectory)/eng/common/build.sh</EngCommonBuildShFile>
</PropertyGroup>
<PropertyGroup>
<DependencyVersionInputRepoApiImplemented Condition="'$(DependencyVersionInputRepoApiImplemented)' == ''">$(RepoApiImplemented)</DependencyVersionInputRepoApiImplemented>
<SourceOverrideRepoApiImplemented Condition="'$(SourceOverrideRepoApiImplemented)' == ''">$(RepoApiImplemented)</SourceOverrideRepoApiImplemented>
<OutputPlacementRepoApiImplemented Condition="'$(OutputPlacementRepoApiImplemented)' == ''">$(RepoApiImplemented)</OutputPlacementRepoApiImplemented>
</PropertyGroup>
<PropertyGroup Condition="'$(SourceOverrideRepoApiImplemented)' != 'true'">
<NuGetConfigFile Condition="'$(NuGetConfigFile)' == '' and Exists('$(ProjectDirectory)NuGet.config')">$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<NuGetConfigFile Condition="'$(NuGetConfigFile)' == '' and Exists('$(ProjectDirectory)NuGet.Config')">$(ProjectDirectory)NuGet.Config</NuGetConfigFile>
<NuGetConfigFile Condition="'$(NuGetConfigFile)' == '' and Exists('$(ProjectDirectory)src\NuGet.config')">$(ProjectDirectory)src\NuGet.config</NuGetConfigFile>
<NuGetConfigFile Condition="'$(NuGetConfigFile)' == '' and Exists('$(ProjectDirectory)src\NuGet.Config')">$(ProjectDirectory)src\NuGet.Config</NuGetConfigFile>
</PropertyGroup>
<!-- Dependency version input arguments -->
<PropertyGroup Condition="'$(DependencyVersionInputRepoApiImplemented)' == 'true'">
<RepoApiArgs>$(RepoApiArgs) /p:DotNetPackageVersionPropsPath=$(PackageVersionPropsPath)</RepoApiArgs>
</PropertyGroup>
<!-- Source override arguments -->
<PropertyGroup Condition="'$(SourceOverrideRepoApiImplemented)' == 'true'">
<RepoApiArgs>$(RepoApiArgs) /p:DotNetBuildOffline=true</RepoApiArgs>
</PropertyGroup>
<!-- Output placement arguments -->
<PropertyGroup Condition="'$(OutputPlacementRepoApiImplemented)' == 'true'">
<RepoApiArgs>$(RepoApiArgs) /p:DotNetOutputBlobFeedDir=$(SourceBuiltBlobFeedDir)</RepoApiArgs>
</PropertyGroup>
<Target Name="BuildRepoReferences" Condition="'@(RepositoryReference)' != '' and '$(SkipRepoReferences)' != 'true'">
<Message Importance="High" Text="Building dependencies [@(RepositoryReference)] needed by '$(RepositoryName)'." />
<ItemGroup>
@ -97,7 +58,6 @@
NewText="$(NewText)" />
</Target>
<Target Name="UpdateBuildToolFramework"
BeforeTargets="Build"
Condition="'$(EngCommonToolsShFile)' != ''"
@ -207,7 +167,13 @@
<ItemGroup>
<_CurrentSourceBuiltPackages Include="$(SourceBuiltPackagesPath)*.nupkg"
Exclude="$(SourceBuiltPackagesPath)*.symbols.nupkg" />
<_PreviouslyBuiltSourceBuiltPackages Include="$(PrebuiltSourceBuiltPackagesPath)*.nupkg" />
<!-- TODO: Remove Remove System.Drawing.Common exclusion once previous source-build artifacts have been updated to no longer include it.
System.Drawing.Common is excluded in response to https://github.com/dotnet/runtime/pull/83356 in order to avoid rebuilts and
bootstrap issues as a result. This wouldn't be an in the future once Runtime onboards to the per repo pvp feature
(https://github.com/dotnet/source-build/issues/3043). -->
<_PreviouslyBuiltSourceBuiltPackages Include="$(PrebuiltSourceBuiltPackagesPath)*.nupkg"
Exclude="$(PrebuiltSourceBuiltPackagesPath)System.Drawing.Common*.nupkg" />
<_CurrentAdditionalAssetDirs Include="$(SourceBuiltToolsetDir)" Condition="Exists('$(SourceBuiltToolsetDir)')" />
</ItemGroup>
@ -272,11 +238,11 @@
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(RepoCompletedSemaphorePath)Build.complete">
<Exec Command="$(DOTNET_HOST_PATH) build-server shutdown" />
<Exec Command="$(DotnetToolCommand) build-server shutdown" />
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Building $(ProjectBuildReason)" />
<Message Importance="High" Text="Running command:" />
<Message Importance="High" Text=" $(BuildCommand) $(RepoApiArgs)" Condition="'$(BuildCommand)' != ''" />
<Message Importance="High" Text=" $(BuildCommand)" Condition="'$(BuildCommand)' != ''" />
<Message Importance="High" Text=" Using custom build target" Condition="'$(BuildCommand)' == ''" />
<Message Importance="High" Text=" Log: $(RepoConsoleLogFile)" />
<Message Importance="High" Text=" With Environment Variables:" />
@ -293,8 +259,8 @@
<EnvironmentVariables Condition="'$(NUGET_PACKAGES)'!=''" Include="NUGET_PACKAGES=$(NUGET_PACKAGES)" />
</ItemGroup>
<PropertyGroup>
<FullCommand Condition="'$(LogVerbosityOptOut)' != 'true'">$(BuildCommand) /v:$(LogVerbosity) $(RepoApiArgs) $(RedirectRepoOutputToLog)</FullCommand>
<FullCommand Condition="'$(LogVerbosityOptOut)' == 'true'">$(BuildCommand) $(RepoApiArgs) $(RedirectRepoOutputToLog)</FullCommand>
<FullCommand Condition="'$(LogVerbosityOptOut)' != 'true'">$(BuildCommand) /v:$(LogVerbosity) $(RedirectRepoOutputToLog)</FullCommand>
<FullCommand Condition="'$(LogVerbosityOptOut)' == 'true'">$(BuildCommand) $(RedirectRepoOutputToLog)</FullCommand>
</PropertyGroup>
<Exec Command="$(FullCommand)"
WorkingDirectory="$(ProjectDirectory)"
@ -366,6 +332,12 @@
<!-- Copy lists of NonShipping packages to prebuilt-report dir -->
<Copy SourceFiles="@(NonShippingPackageLists)" DestinationFolder="$(PackageReportDir)packagelists/" />
<!-- Building SBRP: At this point the References directory contains the previously-source-built SBRPs,
clear it before moving the current SBRPs. This ensures n-1 SBRPs aren't required to build the product repos. -->
<RemoveDir
Condition="'$(_NupkgDestinationPath)' == '$(ReferencePackagesDir)'"
Directories="$(ReferencePackagesDir)" />
<Move
Condition="'@(SourceBuiltNupkgFiles)' != ''"
SourceFiles="@(SourceBuiltNupkgFiles)"
@ -402,7 +374,7 @@
<Target Name="CopyPackage"
AfterTargets="Package"
Condition="'$(OutputPlacementRepoApiImplemented)' != 'true' AND ('$(PackagesOutput)' != '' OR '@(PackagesOutputList)' != '')"
Condition="'$(PackagesOutput)' != '' OR '@(PackagesOutputList)' != ''"
DependsOnTargets="GatherBuiltPackages"
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(RepoCompletedSemaphorePath)CopyPackage.complete">

View file

@ -6,21 +6,12 @@
<BuildCommandArgs>$(BuildCommandArgs) $(FlagParameterPrefix)warnAsError $(ArcadeFalseBoolBuildArg)</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<!-- NuGet SDK resolver only checks nuget.config files. https://github.com/Microsoft/msbuild/issues/2914 -->
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<DependencyVersionInputRepoApiImplemented>true</DependencyVersionInputRepoApiImplemented>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<!-- we need to use a prebuilt Arcade to build Arcade -->
<UseBootstrapArcade>true</UseBootstrapArcade>
<IsToolingProject>true</IsToolingProject>
</PropertyGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeBootstrapSdkOverride)" />
<BuiltSdkPackageOverride Include="@(ArcadeSdkOverride)" />
<BuiltSdkPackageOverride Include="@(ArcadeCoreFxTestingOverride)" />
<BuiltSdkPackageOverride Include="@(ArcadePackagingOverride)" />

View file

@ -24,22 +24,9 @@
<LogVerbosityOptOut>true</LogVerbosityOptOut>
<RepoApiImplemented>false</RepoApiImplemented>
<DependencyVersionInputRepoApiImplemented>true</DependencyVersionInputRepoApiImplemented>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<!-- CS0618 - Caused from deprecated IOperation.Children in
Microsoft.CodeAnalysis 4.3.0, but aspnetcore references version 4.2.0.
Requires https://github.com/dotnet/source-build/issues/2482
CA1825 - Avoid unnecessary zero-length array allocations.
Requires aspnet to upgrade roslyn version.
CS8600 - Converting null literal or possible null value to non-nullable type.
Requires https://github.com/dotnet/aspnetcore/issues/45882.
CS8604 - Possible null reference argument for parameter.
Requires https://github.com/dotnet/aspnetcore/issues/45882. -->
<RepoNoWarns>CS0618;CA1825;CS8600;CS8604</RepoNoWarns>
<!-- CA1512 - Use 'ArgumentOutOfRangeException.ThrowIfEqual'
Requires https://github.com/dotnet/aspnetcore/issues/47673 -->
<RepoNoWarns>CA1512</RepoNoWarns>
</PropertyGroup>
<ItemGroup>
@ -63,9 +50,5 @@
<RepositoryReference Include="roslyn-analyzers" />
</ItemGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -0,0 +1,14 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<BuildCommand>$(StandardSourceBuildCommand) $(StandardSourceBuildArgs)</BuildCommand>
<PackageVersionPropsFlowType>DependenciesOnly</PackageVersionPropsFlowType>
</PropertyGroup>
<ItemGroup>
<RepositoryReference Include="arcade" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -8,19 +8,13 @@
<BuildCommandArgs>$(BuildCommandArgs) $(FlagParameterPrefix)nodereuse $(ArcadeFalseBoolBuildArg)</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<LogVerbosityOptOut>true</LogVerbosityOptOut>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<PackageVersionPropsFlowType>DependenciesOnly</PackageVersionPropsFlowType>
</PropertyGroup>
<ItemGroup>
<RepositoryReference Include="arcade" />
</ItemGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

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

View file

@ -4,15 +4,8 @@
<PropertyGroup>
<BuildCommandArgs>$(StandardSourceBuildArgs)</BuildCommandArgs>
<BuildCommand>$(ProjectDirectory)eng\common\build$(ShellExtension) $(BuildCommandArgs)</BuildCommand>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<PackageVersionPropsFlowType>DependenciesOnly</PackageVersionPropsFlowType>
</PropertyGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -0,0 +1,52 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<SkipEnsurePackagesCreated>true</SkipEnsurePackagesCreated>
</PropertyGroup>
<!-- This project file serves a couple of purpose.
- We conditionally include repos based on what works on different platforms/configurations.
- We need an "empty" build after the last real repo for prebuilt detection to work - this is that file.
- If we have a repo that is not in sdk's dependency tree, we can still build it by including it here. -->
<ItemGroup>
<!-- Toolsets -->
<RepositoryReference Include="source-build-reference-packages" />
<RepositoryReference Include="sourcelink" />
<RepositoryReference Include="arcade" />
<!-- Product Repos -->
<RepositoryReference Include="command-line-api" />
<RepositoryReference Include="diagnostics" />
<RepositoryReference Include="emsdk" />
<RepositoryReference Include="razor" />
<RepositoryReference Include="xliff-tasks" />
<RepositoryReference Include="cecil" />
<RepositoryReference Include="runtime" />
<RepositoryReference Include="roslyn" />
<RepositoryReference Include="source-build-externals" />
<RepositoryReference Include="symreader" />
<RepositoryReference Include="xdt" />
<RepositoryReference Include="msbuild" />
<RepositoryReference Include="roslyn-analyzers" />
<RepositoryReference Include="aspnetcore" />
<RepositoryReference Include="deployment-tools" />
<RepositoryReference Include="format" />
<RepositoryReference Include="templating" />
<RepositoryReference Include="nuget-client" />
<RepositoryReference Include="test-templates" />
<RepositoryReference Include="fsharp" />
<RepositoryReference Include="sdk" />
<RepositoryReference Include="vstest" />
<RepositoryReference Include="installer" />
<!-- Package source-build artifacts -->
<RepositoryReference Include="package-source-build" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<Target Name="RepoBuild" />
</Project>

View file

@ -18,14 +18,8 @@
<BuildCommandArgs>$(BuildCommandArgs) /p:ForceBuildManifestOnly=true</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<PackageVersionPropsFlowType>DependenciesOnly</PackageVersionPropsFlowType>
</PropertyGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -4,10 +4,6 @@
<PropertyGroup>
<BuildCommand>$(ProjectDirectory)eng\common\build$(ShellExtension) $(StandardSourceBuildArgs)</BuildCommand>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<!-- CS9057 - Caused by incoherency of analyzer assemblies during pre-release builds. -->
<RepoNoWarns>CS9057</RepoNoWarns>
</PropertyGroup>
@ -18,9 +14,5 @@
<RepositoryReference Include="source-build-externals" />
</ItemGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -12,9 +12,6 @@
<BuildCommandArgs>$(BuildCommandArgs) --sourcebuild</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<LogVerbosityOptOut>true</LogVerbosityOptOut>
</PropertyGroup>
@ -25,10 +22,6 @@
<RepositoryReference Include="xliff-tasks" />
</ItemGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Target Name="SetArcadeSdkDir"
BeforeTargets="Build">
<ItemGroup>

View file

@ -43,20 +43,10 @@
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<RepoApiImplemented>false</RepoApiImplemented>
<SourceOverrideRepoApiImplemented>true</SourceOverrideRepoApiImplemented>
<DependencyVersionInputRepoApiImplemented>true</DependencyVersionInputRepoApiImplemented>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<!-- CS9057 - Caused by incoherency of analyzer assemblies during pre-release builds. -->
<RepoNoWarns>CS9057</RepoNoWarns>
</PropertyGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<ItemGroup>
<RepositoryReference Include="arcade" />
<RepositoryReference Include="aspnetcore" />

View file

@ -1,37 +0,0 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<RepoApiImplemented>false</RepoApiImplemented>
<SkipEnsurePackagesCreated>true</SkipEnsurePackagesCreated>
</PropertyGroup>
<!-- This project file includes only repos that are enabled for building and running tests in source-build. -->
<!-- Windows and ARM builds don't support all repos, keep them separate for future conditioning. -->
<Choose>
<When Condition="'$(OS)' == 'Windows_NT'">
<ItemGroup>
<RepositoryReference Include="runtime" />
</ItemGroup>
</When>
<When Condition="$(Platform.Contains('arm'))">
<ItemGroup>
<RepositoryReference Include="runtime" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<!-- List of repos currently enabled. -->
<RepositoryReference Include="runtime" />
</ItemGroup>
</Otherwise>
</Choose>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<Target Name="RepoBuild">
</Target>
</Project>

View file

@ -1,79 +0,0 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<RepoApiImplemented>false</RepoApiImplemented>
<SkipEnsurePackagesCreated>true</SkipEnsurePackagesCreated>
</PropertyGroup>
<!-- This project file serves a couple of purpose.
- We conditionally include repos based on what works on different platforms/configurations.
- We need an "empty" build after the last real repo for prebuilt detection to work - this is that file.
- If we have a repo that is not in core-sdk's dependency tree, we can still build it by including it here. -->
<!-- Windows and ARM builds currently only work through core-setup -->
<Choose>
<When Condition="'$(OS)' == 'Windows_NT'">
<ItemGroup>
<RepositoryReference Include="runtime" />
</ItemGroup>
</When>
<!-- Originally used to capture arm platforms. Now with support, left as an extension point for bringing up new architectures in the future. -->
<When Condition="'true' == 'false'">
<ItemGroup>
<RepositoryReference Include="runtime" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<!-- Toolsets -->
<RepositoryReference Include="source-build-reference-packages" />
<RepositoryReference Include="sourcelink" />
<RepositoryReference Include="arcade" />
<!-- Tier 1 -->
<RepositoryReference Include="command-line-api" />
<RepositoryReference Include="diagnostics" />
<RepositoryReference Include="emsdk" />
<RepositoryReference Include="razor" />
<RepositoryReference Include="xliff-tasks" />
<RepositoryReference Include="runtime" />
<RepositoryReference Include="roslyn" />
<RepositoryReference Include="source-build-externals" />
<RepositoryReference Include="symreader" />
<RepositoryReference Include="xdt" />
<!-- Tier 2 -->
<RepositoryReference Include="msbuild" />
<!-- Tier 3 -->
<RepositoryReference Include="roslyn-analyzers" />
<!-- Tier 4 -->
<RepositoryReference Include="aspnetcore" />
<RepositoryReference Include="deployment-tools" />
<RepositoryReference Include="format" />
<RepositoryReference Include="templating" />
<RepositoryReference Include="nuget-client" />
<RepositoryReference Include="test-templates" />
<!-- Tier 5 -->
<RepositoryReference Include="fsharp" />
<RepositoryReference Include="sdk" />
<RepositoryReference Include="vstest" />
<!-- Tier 6 -->
<RepositoryReference Include="installer" />
<!-- Package source-build artifacts -->
<RepositoryReference Include="package-source-build" />
</ItemGroup>
</Otherwise>
</Choose>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<Target Name="RepoBuild">
</Target>
</Project>

View file

@ -13,14 +13,6 @@
<BuildCommandArgs>$(BuildCommandArgs) $(OutputVersionArgs)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:DotNetCoreSdkDir=$(DotNetCliToolDir)</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<!-- NuGet SDK resolver only checks nuget.config files. https://github.com/Microsoft/msbuild/issues/2914 -->
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<SourceOverrideRepoApiImplemented>true</SourceOverrideRepoApiImplemented>
<RepoApiImplemented>false</RepoApiImplemented>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
</PropertyGroup>
<ItemGroup>
@ -43,7 +35,6 @@
-->
<ItemGroup>
<CentralPackageVersionsSdkOverride Include="Microsoft.Build.CentralPackageVersions" Group="CENTRAL_PACKAGE_VERSIONS" />
<UseSourceBuiltSdkOverride Include="@(CentralPackageVersionsSdkOverride)" />
</ItemGroup>
<Target Name="ExtractCentralPackageVersionsSdkPackage"

View file

@ -3,8 +3,6 @@
<PropertyGroup>
<NuGetKeyFilePath>$(KeysDir)NuGet.Client.snk</NuGetKeyFilePath>
<RepoApiImplemented>false</RepoApiImplemented>
<DependencyVersionInputRepoApiImplemented>true</DependencyVersionInputRepoApiImplemented>
<DeterministicBuildOptOut>true</DeterministicBuildOptOut>
<RepoNoWarns>CS9057</RepoNoWarns>
</PropertyGroup>
@ -12,6 +10,7 @@
<ItemGroup>
<EnvironmentVariables Include="MS_PFX_PATH=$(NuGetKeyFilePath)" />
<EnvironmentVariables Include="NUGET_PFX_PATH=$(NuGetKeyFilePath)" />
<RepositoryReference Include="source-build-externals" />
<RepositoryReference Include="msbuild" />
<RepositoryReference Include="xdt" />
@ -24,5 +23,4 @@
</PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -2,7 +2,6 @@
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<RepoApiImplemented>false</RepoApiImplemented>
<ProjectDirectory>$(SubmoduleDirectory)$(RepositoryName)/</ProjectDirectory>
<SkipEnsurePackagesCreated>true</SkipEnsurePackagesCreated>
<IncludedPackageVersionPropsFile>$(CurrentSourceBuiltPackageVersionPropsPath)</IncludedPackageVersionPropsFile>

View file

@ -4,10 +4,6 @@
<PropertyGroup>
<BuildCommand>$(StandardSourceBuildCommand) $(StandardSourceBuildArgs)</BuildCommand>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<!-- NU1507 - https://github.com/dotnet/razor-compiler/issues/242
Occurs when using NuGet central package management without defining any Package Source Mappings. -->
<RepoNoWarns>NU1507</RepoNoWarns>
@ -17,9 +13,5 @@
<RepositoryReference Include="arcade" />
</ItemGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -6,10 +6,7 @@
<BuildCommandArgs>$(BuildCommandArgs) $(FlagParameterPrefix)warnAsError $(ArcadeFalseBoolBuildArg)</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<RepoApiImplemented>false</RepoApiImplemented>
<DependencyVersionInputRepoApiImplemented>false</DependencyVersionInputRepoApiImplemented>
<LogVerbosityOptOut>true</LogVerbosityOptOut>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<PackageVersionPropsFlowType>DependenciesOnly</PackageVersionPropsFlowType>
</PropertyGroup>
@ -22,9 +19,5 @@
<RepositoryReference Include="roslyn" />
</ItemGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -16,9 +16,7 @@
<BuildCommand>$(ProjectDirectory)build$(ShellExtension) $(BuildCommandArgs)</BuildCommand>
<RepoApiImplemented>false</RepoApiImplemented>
<LogVerbosityOptOut>true</LogVerbosityOptOut>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
</PropertyGroup>
<ItemGroup>
@ -30,7 +28,6 @@
</ItemGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
<UseSourceBuiltSdkOverride Include="@(WindowsDesktopSdkOverride)" />
</ItemGroup>

View file

@ -27,17 +27,8 @@
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
</PropertyGroup>
<!-- Output / source-build flags -->
<PropertyGroup>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<DependencyVersionInputRepoApiImplemented>true</DependencyVersionInputRepoApiImplemented>
</PropertyGroup>
<!-- SDK Overrides -->
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
<UseSourceBuiltSdkOverride Include="@(ArcadeCoreFxTestingOverride)" />
<UseSourceBuiltSdkOverride Include="@(ArcadePackagingOverride)" />
<UseSourceBuiltSdkOverride Include="@(ArcadeTargetFrameworkOverride)" />
@ -58,6 +49,7 @@
<!-- Repository References -->
<ItemGroup>
<RepositoryReference Include="arcade" />
<RepositoryReference Include="cecil" />
<RepositoryReference Include="symreader" />
<RepositoryReference Include="source-build-externals" />
</ItemGroup>

View file

@ -14,19 +14,8 @@
<BuildCommandArgs>$(BuildCommandArgs) -v $(LogVerbosity)</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<!-- NuGet SDK resolver only checks nuget.config files. https://github.com/Microsoft/msbuild/issues/2914 -->
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<DependencyVersionInputRepoApiImplemented>true</DependencyVersionInputRepoApiImplemented>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
</PropertyGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<ItemGroup>
<RepositoryReference Include="arcade" />
<RepositoryReference Include="xliff-tasks" />

View file

@ -3,14 +3,8 @@
<PropertyGroup>
<BuildCommand>$(StandardSourceBuildCommand) $(StandardSourceBuildArgs)</BuildCommand>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<PackageVersionPropsFlowType>DependenciesOnly</PackageVersionPropsFlowType>
</PropertyGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -10,17 +10,11 @@
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<!-- SBRP builds before Arcade so it also needs the bootstrap Arcade version -->
<UseBootstrapArcade>true</UseBootstrapArcade>
</PropertyGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeBootstrapSdkOverride)" />
</ItemGroup>
<PackageVersionPropsFlowType>DependenciesOnly</PackageVersionPropsFlowType>
</PropertyGroup>
<Target Name="AddLocalNuGetPackageCacheDirectory" BeforeTargets="Build">
<MakeDir Condition="'$(LocalNuGetPackageCacheDirectory)' != ''"

View file

@ -4,19 +4,12 @@
<PropertyGroup>
<BuildCommand>$(StandardSourceBuildCommand) $(StandardSourceBuildArgs)</BuildCommand>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<LogVerbosityOptOut>true</LogVerbosityOptOut>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<!-- SourceLink builds before Arcade so it also needs the bootstrap Arcade version -->
<UseBootstrapArcade>true</UseBootstrapArcade>
</PropertyGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeBootstrapSdkOverride)" />
</ItemGroup>
<ItemGroup>
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftSourceLinkVersion" Version="$(SOURCE_LINK_BOOTSTRAP_VERSION)" />
</ItemGroup>

View file

@ -3,15 +3,8 @@
<PropertyGroup>
<BuildCommand>$(StandardSourceBuildCommand) $(StandardSourceBuildArgs)</BuildCommand>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<PackageVersionPropsFlowType>DependenciesOnly</PackageVersionPropsFlowType>
</PropertyGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -7,10 +7,6 @@
<BuildCommandArgs>$(BuildCommandArgs) $(FlagParameterPrefix)v $(LogVerbosity)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) $(FlagParameterPrefix)warnAsError $(ArcadeFalseBoolBuildArg)</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
</PropertyGroup>
<ItemGroup>
@ -18,9 +14,5 @@
<RepositoryReference Include="source-build-externals" />
</ItemGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -6,10 +6,7 @@
<BuildCommandArgs>$(BuildCommandArgs) $(FlagParameterPrefix)nodereuse $(ArcadeFalseBoolBuildArg)</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<LogVerbosityOptOut>true</LogVerbosityOptOut>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
</PropertyGroup>
<ItemGroup>
@ -17,9 +14,5 @@
<RepositoryReference Include="templating" />
</ItemGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -6,9 +6,7 @@
<BuildCommandArgs>$(BuildCommandArgs) /p:SemanticVersioningV1=true</BuildCommandArgs>
<BuildCommand>$(ProjectDirectory)\eng\common\build$(ShellExtension) $(BuildCommandArgs)</BuildCommand>
<RepoApiImplemented>false</RepoApiImplemented>
<DeterministicBuildOptOut>true</DeterministicBuildOptOut>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
</PropertyGroup>
<ItemGroup>

View file

@ -6,19 +6,13 @@
<BuildCommandArgs>$(BuildCommandArgs) $(FlagParameterPrefix)nodereuse $(ArcadeFalseBoolBuildArg)</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<LogVerbosityOptOut>true</LogVerbosityOptOut>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<PackageVersionPropsFlowType>DependenciesOnly</PackageVersionPropsFlowType>
</PropertyGroup>
<ItemGroup>
<RepositoryReference Include="arcade" />
</ItemGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -5,18 +5,11 @@
<BuildCommandArgs>$(StandardSourceBuildArgs)</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<RepoApiImplemented>false</RepoApiImplemented>
<DependencyVersionInputRepoApiImplemented>true</DependencyVersionInputRepoApiImplemented>
<DeterministicBuildOptOut>true</DeterministicBuildOptOut>
<IsToolingProject>true</IsToolingProject>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<PackageVersionPropsFlowType>DependenciesOnly</PackageVersionPropsFlowType>
</PropertyGroup>
<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View file

@ -20,6 +20,7 @@ internal class DotNetHelper
public static string ProjectsDirectory { get; } = Path.Combine(Directory.GetCurrentDirectory(), $"projects-{DateTime.Now:yyyyMMddHHmmssffff}");
private ITestOutputHelper OutputHelper { get; }
private bool IsMonoRuntime { get; }
public DotNetHelper(ITestOutputHelper outputHelper)
{
@ -37,6 +38,7 @@ internal class DotNetHelper
Directory.CreateDirectory(Config.DotNetDirectory);
ExecuteHelper.ExecuteProcessValidateExitCode("tar", $"xzf {Config.SdkTarballPath} -C {Config.DotNetDirectory}", outputHelper);
}
IsMonoRuntime = DetermineIsMonoRuntime(Config.DotNetDirectory);
if (!Directory.Exists(ProjectsDirectory))
{
@ -198,10 +200,13 @@ internal class DotNetHelper
public void ExecuteRunWeb(string projectName)
{
// 'dotnet run' exit code differs between CoreCLR and Mono (https://github.com/dotnet/sdk/issues/30095).
int expectedExitCode = IsMonoRuntime ? 143 : 0;
ExecuteCmd(
$"run {GetBinLogOption(projectName, "run")}",
GetProjectDirectory(projectName),
additionalProcessConfigCallback: processConfigCallback,
expectedExitCode,
millisecondTimeout: 30000);
void processConfigCallback(Process process)
@ -230,5 +235,25 @@ internal class DotNetHelper
return $"/bl:{Path.Combine(LogsDirectory, $"{fileName}.binlog")}";
}
private static bool DetermineIsMonoRuntime(string dotnetRoot)
{
string sharedFrameworkRoot = Path.Combine(dotnetRoot, "shared", "Microsoft.NETCore.App");
if (!Directory.Exists(sharedFrameworkRoot))
{
return false;
}
string? version = Directory.GetDirectories(sharedFrameworkRoot).FirstOrDefault();
if (version is null)
{
return false;
}
string sharedFramework = Path.Combine(sharedFrameworkRoot, version);
// Check the presence of one of the mono header files.
return File.Exists(Path.Combine(sharedFramework, "mono-gc.h"));
}
private static string GetProjectDirectory(string projectName) => Path.Combine(ProjectsDirectory, projectName);
}

View file

@ -5,6 +5,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Enumeration;
using System.Linq;
using System.Text.RegularExpressions;
using Xunit.Abstractions;
@ -27,15 +28,15 @@ public class SdkContentTests : SmokeTests
{
const string msftFileListingFileName = "msftSdkFiles.txt";
const string sbFileListingFileName = "sbSdkFiles.txt";
WriteTarballFileList(Config.MsftSdkTarballPath, msftFileListingFileName, isPortable: true);
WriteTarballFileList(Config.SdkTarballPath, sbFileListingFileName, isPortable: false);
WriteTarballFileList(Config.MsftSdkTarballPath, msftFileListingFileName, isPortable: true, "msft");
WriteTarballFileList(Config.SdkTarballPath, sbFileListingFileName, isPortable: false, "sb");
string diff = BaselineHelper.DiffFiles(msftFileListingFileName, sbFileListingFileName, OutputHelper);
diff = RemoveDiffMarkers(diff);
BaselineHelper.CompareContents("MsftToSbSdk.diff", diff, OutputHelper, Config.WarnOnSdkContentDiffs);
}
private void WriteTarballFileList(string? tarballPath, string outputFileName, bool isPortable)
private void WriteTarballFileList(string? tarballPath, string outputFileName, bool isPortable, string sdkType)
{
if (!File.Exists(tarballPath))
{
@ -46,10 +47,32 @@ public class SdkContentTests : SmokeTests
fileListing = BaselineHelper.RemoveRids(fileListing, isPortable);
fileListing = BaselineHelper.RemoveVersions(fileListing);
IEnumerable<string> files = fileListing.Split(Environment.NewLine).OrderBy(path => path);
files = RemoveExclusions(
files,
GetExclusionFilters(
Path.Combine(BaselineHelper.GetAssetsDirectory(), "SdkDiffExclusions.txt"),
sdkType));
File.WriteAllLines(outputFileName, files);
}
private static IEnumerable<string> RemoveExclusions(IEnumerable<string> files, IEnumerable<string> exclusions) =>
files.Where(item => !exclusions.Any(p => FileSystemName.MatchesSimpleExpression(p, item)));
private static IEnumerable<string> GetExclusionFilters(string exclusionsFilePath, string sdkType)
{
int prefixSkip = sdkType.Length + 1;
return File.ReadAllLines(exclusionsFilePath)
.Where(line => line.StartsWith(sdkType + ",")) // process only specific sdk exclusions
.Select(line =>
{
// Ignore comments
var index = line.IndexOf('#');
return index >= 0 ? line[prefixSkip..index].TrimEnd() : line[prefixSkip..];
})
.ToList();
}
private static string RemoveDiffMarkers(string source)
{
Regex indexRegex = new("^index .*", RegexOptions.Multiline);

View file

@ -63,6 +63,6 @@ public class SourceBuiltArtifactsTests : SmokeTests
private void ExtractFileFromTarball(string tarballPath, string filePath, string outputDir)
{
ExecuteHelper.ExecuteProcessValidateExitCode("tar", $"xzf {tarballPath} -C {outputDir} {filePath}", OutputHelper);
ExecuteHelper.ExecuteProcessValidateExitCode("tar", $"--wildcards -xzf {tarballPath} -C {outputDir} {filePath}", OutputHelper);
}
}

View file

@ -0,0 +1,42 @@
# This list is processed using FileSystemName.MatchesSimpleExpression
#
# Format
# {msft|sb},<path> [# comment]
# msft = Microsoft built SDK
# sb = source-built SDK
#
# Examples
# 'folder/*' matches 'folder/' and 'folder/abc'
# 'folder/?*' matches 'folder/abc' but not 'folder/'
#
# We do not want to filter-out folder entries, therefore, we should use: '?*' and not just '*'
msft,./sdk/x.y.z/TestHostNetFramework/?* # Intentional - MSFT build includes test-host that targets netcoreapp3.1
msft,./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/net472/?* # Intentional - source-build includes SDK Publishing package that target latest .NET TFM
msft,./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WindowsDesktop/?* # Intentional - explicitly excluded from source-build
sb,./sdk/x.y.z/TestHost/?* # Intentional - source-build includes test-host that targets latest .NET TFM
# vstest localization is disabled in Linux builds - https://github.com/microsoft/vstest/issues/4305
msft,./sdk/x.y.z/*?/Microsoft.CodeCoverage.IO.resources.dll
msft,./sdk/x.y.z/*?/Microsoft.TestPlatform.*?.resources.dll
msft,./sdk/x.y.z/*?/Microsoft.VisualStudio.TestPlatform.*?.resources.dll
msft,./sdk/x.y.z/*?/Test.Utility.resources.dll
msft,./sdk/x.y.z/*?/vstest.console.resources.dll
msft,./sdk/x.y.z/Extensions/*?/Microsoft.TestPlatform.*?.resources.dll
msft,./sdk/x.y.z/Extensions/*?/Microsoft.VisualStudio.TestPlatform.*?.resources.dll
# nuget localization is not available for Linux builds - https://github.com/NuGet/Home/issues/12440
msft,./sdk/x.y.z/*?/NuGet.*?.resources.dll
msft,./sdk/x.y.z/*?/Microsoft.Build.NuGetSdkResolver.resources.dll
# ILMerge is not supported in Linux builds - excluding the whole NuGet.Build.Tasks.Pack directory, to avoid a noisy diff
msft,./sdk/x.y.z/Sdks/NuGet.Build.Tasks.Pack/*?
sb,./sdk/x.y.z/Sdks/NuGet.Build.Tasks.Pack/*?
# missing workload manifests - https://github.com/dotnet/source-build/issues/3242
msft,./sdk-manifests/x.y.z/microsoft.net.sdk.android/*
msft,./sdk-manifests/x.y.z/microsoft.net.sdk.ios/*
msft,./sdk-manifests/x.y.z/microsoft.net.sdk.maccatalyst/*
msft,./sdk-manifests/x.y.z/microsoft.net.sdk.macos/*
msft,./sdk-manifests/x.y.z/microsoft.net.sdk.maui/*
msft,./sdk-manifests/x.y.z/microsoft.net.sdk.tvos/*

View file

@ -0,0 +1,68 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Matt Thalman <mthalman@microsoft.com>
Date: Thu, 6 Apr 2023 09:16:13 -0500
Subject: [PATCH] Use net8.0 TFM when building with source-build
Backport: https://github.com/dotnet/command-line-api/pull/2150
---
Directory.Build.props | 6 +++---
.../System.CommandLine.Benchmarks.csproj | 4 ++--
src/System.CommandLine/System.CommandLine.csproj | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index 4c1f04a2..0444426a 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -11,11 +11,11 @@
<LangVersion>10.0</LangVersion>
</PropertyGroup>
- <PropertyGroup Condition="'$(DisableArcade)' == '1'">
- <TargetFrameworkForNETSDK>net7.0</TargetFrameworkForNETSDK>
+ <PropertyGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
+ <TargetFrameworkForNETSDK>$(NetCurrent)</TargetFrameworkForNETSDK>
</PropertyGroup>
- <PropertyGroup Condition="'$(DisableArcade)' != '1'">
+ <PropertyGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<TargetFrameworkForNETSDK>net7.0</TargetFrameworkForNETSDK>
</PropertyGroup>
diff --git a/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj b/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj
index b63e109c..3ef1afa1 100644
--- a/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj
+++ b/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj
@@ -9,8 +9,8 @@
<UseSharedCompilation>false</UseSharedCompilation>
<!-- Supported target frameworks -->
- <TargetFrameworks Condition="'$(TargetFrameworks)' == '' AND '$(OS)' == 'Windows_NT'">net7.0</TargetFrameworks>
- <TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net7.0</TargetFrameworks>
+ <TargetFrameworks Condition="'$(TargetFrameworks)' == '' AND '$(OS)' == 'Windows_NT'">$(TargetFrameworkForNETSDK)</TargetFrameworks>
+ <TargetFrameworks Condition="'$(TargetFrameworks)' == ''">$(TargetFrameworkForNETSDK)</TargetFrameworks>
<!-- This repo does not produce any libraries, therefore generating docs is disabled -->
<GenerateDocumentationFile>False</GenerateDocumentationFile>
diff --git a/src/System.CommandLine/System.CommandLine.csproj b/src/System.CommandLine/System.CommandLine.csproj
index 05d28476..37115d70 100644
--- a/src/System.CommandLine/System.CommandLine.csproj
+++ b/src/System.CommandLine/System.CommandLine.csproj
@@ -3,7 +3,7 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>System.CommandLine</PackageId>
- <TargetFrameworks>net7.0;netstandard2.0</TargetFrameworks>
+ <TargetFrameworks>$(TargetFrameworkForNETSDK);netstandard2.0</TargetFrameworks>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>10</LangVersion>
@@ -18,7 +18,7 @@
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
</PropertyGroup>
- <PropertyGroup Condition="'$(TargetFramework)' == 'net7.0'">
+ <PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkForNETSDK)'">
<IsTrimmable>true</IsTrimmable>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
</PropertyGroup>

View file

@ -0,0 +1,25 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Mon, 20 Mar 2023 13:42:30 +0000
Subject: [PATCH] Revert "Trim away netframework targets in source-build
(#312)"
This reverts commit 400fd9a71c568f3c7aa025c6224e082aa819a4c0.
Backport: https://github.com/dotnet/source-build/issues/3336
---
eng/SourceBuild.props | 1 -
1 file changed, 1 deletion(-)
diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
index c963035..c4009f3 100644
--- a/eng/SourceBuild.props
+++ b/eng/SourceBuild.props
@@ -3,7 +3,6 @@
<PropertyGroup>
<GitHubRepositoryName>emsdk</GitHubRepositoryName>
<SourceBuildManagedOnly>true</SourceBuildManagedOnly>
- <SourceBuildTrimNetFrameworkTargets>true</SourceBuildTrimNetFrameworkTargets>
</PropertyGroup>
</Project>

View file

@ -1,38 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: davidwengier
Date: Mon, 30 Jan 2023 15:40:22 +0000
Subject: [PATCH] Add some projects to Razor.Slim.slnf
Backport: https://github.com/dotnet/razor/pull/8188
---
Razor.Slim.slnf | 3 +++
.../Microsoft.NET.Sdk.Razor.SourceGenerators.Transport.csproj | 2 ++
2 files changed, 5 insertions(+)
diff --git a/Razor.Slim.slnf b/Razor.Slim.slnf
index 6e76d40f1..8328075c4 100644
--- a/Razor.Slim.slnf
+++ b/Razor.Slim.slnf
@@ -6,6 +6,9 @@
"src\\Compiler\\Microsoft.AspNetCore.Mvc.Razor.Extensions\\src\\Microsoft.AspNetCore.Mvc.Razor.Extensions.csproj",
"src\\Compiler\\Microsoft.AspNetCore.Razor.Language\\src\\Microsoft.AspNetCore.Razor.Language.csproj",
"src\\Compiler\\Microsoft.CodeAnalysis.Razor\\src\\Microsoft.CodeAnalysis.Razor.csproj",
+ "src\\Compiler\\Microsoft.NET.Sdk.Razor.SourceGenerators.Transport\\Microsoft.NET.Sdk.Razor.SourceGenerators.Transport.csproj",
+ "src\\Compiler\\tools\\Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal\\Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal.csproj",
+ "src\\Compiler\\tools\\Microsoft.CodeAnalysis.Razor.Tooling.Internal\\Microsoft.CodeAnalysis.Razor.Tooling.Internal.csproj",
"src\\Shared\\Microsoft.AspNetCore.Razor.LanguageSupport\\Microsoft.AspNetCore.Razor.LanguageSupport.csproj",
"src\\Razor\\src\\Microsoft.AspNetCore.Razor.Common\\Microsoft.AspNetCore.Razor.Common.csproj",
"src\\Razor\\src\\Microsoft.CodeAnalysis.Razor.Workspaces\\Microsoft.CodeAnalysis.Razor.Workspaces.csproj",
diff --git a/src/Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport.csproj b/src/Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport.csproj
index 278e35a42..745645fc9 100644
--- a/src/Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport.csproj
+++ b/src/Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport.csproj
@@ -8,6 +8,8 @@
<NoPackageAnalysis>true</NoPackageAnalysis>
<GenerateDependencyFile>false</GenerateDependencyFile>
<IsPackable>true</IsPackable>
+ <!-- Need to build this project in source build -->
+ <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
</PropertyGroup>
<ItemGroup>

View file

@ -0,0 +1,51 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Matt Thalman <mthalman@microsoft.com>
Date: Mon, 27 Feb 2023 14:02:25 -0600
Subject: [PATCH] Enable packable projects for razor
Backport: https://github.com/dotnet/razor/issues/8332
---
.../Microsoft.NET.Sdk.Razor.SourceGenerators.Transport.csproj | 2 +-
...soft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal.csproj | 2 +-
.../Microsoft.CodeAnalysis.Razor.Tooling.Internal.csproj | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport.csproj b/src/Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport.csproj
index 547da8632..606af7bf4 100644
--- a/src/Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport.csproj
+++ b/src/Compiler/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport/Microsoft.NET.Sdk.Razor.SourceGenerators.Transport.csproj
@@ -7,7 +7,7 @@
<SuppressDependenciesWhenPacking>false</SuppressDependenciesWhenPacking>
<NoPackageAnalysis>true</NoPackageAnalysis>
<GenerateDependencyFile>false</GenerateDependencyFile>
- <IsPackable Condition="'$(OS)' == 'Windows_NT'">true</IsPackable>
+ <IsPackable>true</IsPackable>
<!-- Need to build this project in source build -->
<ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
</PropertyGroup>
diff --git a/src/Compiler/tools/Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal/Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal.csproj b/src/Compiler/tools/Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal/Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal.csproj
index 00e1cedec..cc1f32523 100644
--- a/src/Compiler/tools/Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal/Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal.csproj
+++ b/src/Compiler/tools/Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal/Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal.csproj
@@ -5,7 +5,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<IsShipping>false</IsShipping>
<IncludeBuildOutput>false</IncludeBuildOutput>
- <IsPackable Condition="'$(OS)' == 'Windows_NT'">true</IsPackable>
+ <IsPackable>true</IsPackable>
<ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
</PropertyGroup>
diff --git a/src/Compiler/tools/Microsoft.CodeAnalysis.Razor.Tooling.Internal/Microsoft.CodeAnalysis.Razor.Tooling.Internal.csproj b/src/Compiler/tools/Microsoft.CodeAnalysis.Razor.Tooling.Internal/Microsoft.CodeAnalysis.Razor.Tooling.Internal.csproj
index 7216edbe7..c1fbd3af4 100644
--- a/src/Compiler/tools/Microsoft.CodeAnalysis.Razor.Tooling.Internal/Microsoft.CodeAnalysis.Razor.Tooling.Internal.csproj
+++ b/src/Compiler/tools/Microsoft.CodeAnalysis.Razor.Tooling.Internal/Microsoft.CodeAnalysis.Razor.Tooling.Internal.csproj
@@ -5,7 +5,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<IsShipping>false</IsShipping>
<IncludeBuildOutput>false</IncludeBuildOutput>
- <IsPackable Condition="'$(OS)' == 'Windows_NT'">true</IsPackable>
+ <IsPackable>true</IsPackable>
<ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
</PropertyGroup>

View file

@ -0,0 +1,38 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nikola Milosavljevic <nikolam@microsoft.com>
Date: Thu, 6 Apr 2023 19:53:04 +0000
Subject: [PATCH] Only pack the shipping/non-shipping nupkgs for roslyn
Avoid packing release, pre-release stable nupkgs, and symbol nupkg.
Backport: https://github.com/dotnet/roslyn/pull/67679
---
eng/SourceBuild.props | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
index d5d41e7167e..a8b55f352ad 100644
--- a/eng/SourceBuild.props
+++ b/eng/SourceBuild.props
@@ -4,8 +4,21 @@
<GitHubRepositoryName>roslyn</GitHubRepositoryName>
<SourceBuildManagedOnly>true</SourceBuildManagedOnly>
<SourceBuildTrimNetFrameworkTargets>true</SourceBuildTrimNetFrameworkTargets>
+ <!-- Roslyn produces stable release branded and stable pre-release branded artifacts in addition to the normal non-stable artifacts.
+ Only the non-stable artifacts should flow downstream in source build -->
+ <EnableDefaultSourceBuildIntermediateItems>false</EnableDefaultSourceBuildIntermediateItems>
</PropertyGroup>
+ <Target Name="GetCustomIntermediateNupkgContents" BeforeTargets="GetCategorizedIntermediateNupkgContents">
+ <ItemGroup>
+ <IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\**\*.nupkg" />
+ <IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)NonShipping\**\*.nupkg" />
+ <!-- Don't pack any symbol packages: not needed for downstream source-build CI.
+ Roslyn's symbol packages come in .Symbols.<version>.nupkg instead of the standard format. -->
+ <IntermediateNupkgArtifactFile Remove="$(CurrentRepoSourceBuildArtifactsPackagesDir)**\*.Symbols.*.nupkg" />
+ </ItemGroup>
+ </Target>
+
<!--
The build script passes in the full path of the sln to build. This must be overridden in order to build
the cloned source in the inner build.

View file

@ -1,24 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nikola Milosavljevic <nikolam@microsoft.com>
Date: Wed, 25 Jan 2023 20:21:17 +0000
Subject: [PATCH] Allow source-build to set UsingToolMicrosoftNetCompilers
property
backport: https://github.com/dotnet/runtime/pull/81180
---
eng/Versions.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index a57587c74a8..15f65bc269b 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -22,7 +22,7 @@
<UsingToolIbcOptimization>false</UsingToolIbcOptimization>
<UsingToolXliff>false</UsingToolXliff>
<LastReleasedStableAssemblyVersion>$(AssemblyVersion)</LastReleasedStableAssemblyVersion>
- <UsingToolMicrosoftNetCompilers>true</UsingToolMicrosoftNetCompilers>
+ <UsingToolMicrosoftNetCompilers Condition="'$(DotNetBuildFromSource)' != 'true'">true</UsingToolMicrosoftNetCompilers>
</PropertyGroup>
<ItemGroup>
<WorkloadSdkBandVersions Include="$(SdkBandVersion)" SupportsMachineArch="true" />

View file

@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Matt Thalman <mthalman@microsoft.com>
Date: Mon, 20 Mar 2023 15:35:53 -0500
Subject: [PATCH] Revert switch to self-hosted NativeAOT compiler
Backport: https://github.com/dotnet/runtime/issues/83695
---
src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj b/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
index db48433db73..982bbc78427 100644
--- a/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
+++ b/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
@@ -12,6 +12,7 @@
<PublishDir>$(RuntimeBinDir)ilc-published/</PublishDir>
<NativeAotSupported Condition="'$(TargetOS)' != 'windows' and '$(TargetOS)' != 'linux' and '$(TargetOS)' != 'osx'">false</NativeAotSupported>
<NativeAotSupported Condition="'$(TargetArchitecture)' != 'x64'">false</NativeAotSupported>
+ <NativeAotSupported>false</NativeAotSupported>
<PublishAot Condition="'$(NativeAotSupported)' == 'true'">true</PublishAot>
<PublishReadyToRun Condition="'$(NativeAotSupported)' != 'true'">true</PublishReadyToRun>
<PublishSingleFile Condition="'$(NativeAotSupported)' != 'true'">true</PublishSingleFile>

View file

@ -0,0 +1,23 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Wed, 1 Mar 2023 01:12:26 +0000
Subject: [PATCH] Update BroswerRefresh TFM
Backport: https://github.com/dotnet/sdk/issues/30272
---
.../Microsoft.AspNetCore.Watch.BrowserRefresh.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/BuiltInTools/BrowserRefresh/Microsoft.AspNetCore.Watch.BrowserRefresh.csproj b/src/BuiltInTools/BrowserRefresh/Microsoft.AspNetCore.Watch.BrowserRefresh.csproj
index fc35c0ec3d..6e429eb963 100644
--- a/src/BuiltInTools/BrowserRefresh/Microsoft.AspNetCore.Watch.BrowserRefresh.csproj
+++ b/src/BuiltInTools/BrowserRefresh/Microsoft.AspNetCore.Watch.BrowserRefresh.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- Intentionally pinned. This feature is supported in projects targeting 6.0 or newer.-->
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
<IsPackable>false</IsPackable>

View file

@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Michael Simons <msimons@microsoft.com>
Date: Tue, 11 Apr 2023 17:03:48 +0000
Subject: [PATCH] Exclude dotnet-sourcelink from source build
This addresses prebuilts.
Backport: https://github.com/dotnet/sourcelink/pull/933
---
src/dotnet-sourcelink/dotnet-sourcelink.csproj | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/dotnet-sourcelink/dotnet-sourcelink.csproj b/src/dotnet-sourcelink/dotnet-sourcelink.csproj
index f2a6e7a..5c675ef 100644
--- a/src/dotnet-sourcelink/dotnet-sourcelink.csproj
+++ b/src/dotnet-sourcelink/dotnet-sourcelink.csproj
@@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>$(NetCurrent)</TargetFrameworks>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
<!-- NuGet -->
<IsPackable>true</IsPackable>

View file

@ -139,11 +139,10 @@ ln -s $HOME/.dotnet/dotnet /usr/bin/dotnet
You can also utilize [GitHub Codespaces](https://github.com/features/codespaces) where you can find preset containers in this repository.
### Exporting a source archive
### Building outside of git
In case you'd like to export a more lightweight archive of sources that can be built outside of this git repository, a simple copy of the working tree won't do.
The build is using some git metadata (information from the `.git` directory) that are needed to be kept with the sources.
To export a `tar.gz` archive of the sources, you need to use the `eng/pack-sources.sh` script from within a clone of the VMR checked out at the revision that you're interested in.
.NET uses git metadata so that it can link assemblies to their original source code when debugging (think "Step into.." functionality) and for that it needs information about the original place the code comes from.
When you're building source code only, taken outside of context of a git repository (e.g. you download it from the release page), you will need to specify the source repository to the `prep.sh` script via the `--source-repository` and `--source-version` arguments. This can be your fork of the repository and should match the origin where your SDK was built from.
## List of components

View file

@ -29,8 +29,7 @@ src/aspnetcore/src/*.otf
src/aspnetcore/src/*.ttf
src/aspnetcore/src/*.woff
src/aspnetcore/src/*.woff2
src/aspnetcore/src/Components/Web.JS/dist/Release/blazor.server.js # JavaScript file with a null byte
src/aspnetcore/src/Components/Web.JS/dist/Release/blazor.webview.js # JavaScript file with a null byte
src/aspnetcore/src/Components/Web.JS/dist/Release/blazor.*.js # JavaScript files with a null bytes
src/aspnetcore/src/ProjectTemplates/Web.ProjectTemplates/**/app.db
src/aspnetcore/src/submodules/spa-templates/**/app.db

View file

@ -5,8 +5,12 @@
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System;
#if !NETFRAMEWORK
using System.Formats.Tar;
#endif
using System.IO;
using System.IO.Compression;
using System.Linq;
namespace Microsoft.DotNet.Build.Tasks
{
@ -33,7 +37,7 @@ namespace Microsoft.DotNet.Build.Tasks
public bool CleanDestination { get; set; }
/// <summary>
/// A list of directories, semicolon deliminated, relative to the root of the archive to include. If empty all directories will be copied.
/// A list of directories, relative to the root of the archive to include. If empty all directories will be copied.
/// </summary>
public ITaskItem[] DirectoriesToCopy { get; set; }
@ -71,22 +75,26 @@ namespace Microsoft.DotNet.Build.Tasks
public override bool Execute()
{
bool retVal = true;
bool isZipArchive = Path.GetExtension(SourceArchive).Equals(".zip", StringComparison.OrdinalIgnoreCase);
bool isTarballArchive = SourceArchive.EndsWith(".tar.gz", StringComparison.OrdinalIgnoreCase);
// Inherits from ToolTask in order to shell out to tar.
// Inherits from ToolTask in order to shell out to tar for complete extraction
// If the file is a .zip, then don't call the base Execute method, just run as a normal task
if (Path.GetExtension(SourceArchive).Equals(".zip", StringComparison.OrdinalIgnoreCase))
// If the file is a .tar.gz, and DirectoriesToCopy isn't empty, also run a normal task.
if (isZipArchive || isTarballArchive)
{
if (ValidateParameters())
{
if (DirectoriesToCopy != null && DirectoriesToCopy.Length != 0)
{
var zip = new ZipArchive(File.OpenRead(SourceArchive));
string loc = DestinationDirectory;
foreach (var entry in zip.Entries)
// Partial archive extraction
if (isZipArchive)
{
foreach (var directory in DirectoriesToCopy)
var zip = new ZipArchive(File.OpenRead(SourceArchive));
string loc = DestinationDirectory;
foreach (var entry in zip.Entries)
{
if (entry.FullName.StartsWith(directory.ItemSpec))
if (ShouldExtractItem(entry.FullName))
{
if (!Directory.Exists(Path.Combine(DestinationDirectory, Path.GetDirectoryName(entry.FullName))))
{
@ -98,16 +106,57 @@ namespace Microsoft.DotNet.Build.Tasks
}
}
}
else
{
#if NETFRAMEWORK
// Run the base tool, which uses external 'tar' command
retVal = base.Execute();
#else
// Decompress GZip content
using FileStream compressedFileStream = File.Open(SourceArchive, FileMode.Open);
using var decompressor = new GZipStream(compressedFileStream, CompressionMode.Decompress);
using var decompressedStream = new MemoryStream();
decompressor.CopyTo(decompressedStream);
decompressedStream.Seek(0, SeekOrigin.Begin);
// Extract Tar content
using TarReader tr = new TarReader(decompressedStream);
while (tr.GetNextEntry() is TarEntry tarEntry)
{
if (tarEntry.EntryType != TarEntryType.Directory)
{
string entryName = tarEntry.Name;
entryName = entryName.StartsWith("./") ? entryName[2..] : entryName;
if (ShouldExtractItem(entryName))
{
Log.LogMessage(entryName);
string destinationPath = Path.Combine(DestinationDirectory, entryName);
Directory.CreateDirectory(Path.GetDirectoryName(destinationPath));
tarEntry.ExtractToFile(destinationPath, overwrite: true);
}
}
}
#endif
}
}
else
{
{
// Complete archive extraction
if (isZipArchive)
{
#if NETFRAMEWORK
// .NET Framework doesn't have overload to overwrite files
ZipFile.ExtractToDirectory(SourceArchive, DestinationDirectory);
// .NET Framework doesn't have overload to overwrite files
ZipFile.ExtractToDirectory(SourceArchive, DestinationDirectory);
#else
ZipFile.ExtractToDirectory(SourceArchive, DestinationDirectory, overwriteFiles: true);
ZipFile.ExtractToDirectory(SourceArchive, DestinationDirectory, overwriteFiles: true);
#endif
}
else
{
// Run the base tool, which uses external 'tar' command
retVal = base.Execute();
}
}
}
else
@ -129,6 +178,17 @@ namespace Microsoft.DotNet.Build.Tasks
return retVal;
}
private bool ShouldExtractItem(string path)
{
if (DirectoriesToCopy != null)
{
return DirectoriesToCopy.Any(p => path.StartsWith(p.ItemSpec));
}
return false;
}
protected override string ToolName
{
get { return "tar"; }

View file

@ -53,7 +53,7 @@ namespace Microsoft.DotNet.Cli.Build
foreach (var file in files)
{
sb.Append(@" file source=""!(bindpath.sources)\Redist\Common\NetCoreSDK\MSBuildExtensions\");
sb.Append(@" file source=""$(PkgVS_Redist_Common_Net_Core_SDK_MSBuildExtensions)\");
sb.Append(Path.Combine(relativeSourcePath, Path.GetFileName(file)));
sb.AppendLine("\"");
}

View file

@ -5,6 +5,7 @@
<CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<ResolveAssemblyReferencesSilent>true</ResolveAssemblyReferencesSilent>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>none</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<ItemGroup>

View file

@ -66,14 +66,6 @@
</Target>
<PropertyGroup>
<VersionFeature21>30</VersionFeature21>
<VersionFeature31>32</VersionFeature31>
<VersionFeature50>17</VersionFeature50>
<VersionFeature60>13</VersionFeature60>
<VersionFeature70>2</VersionFeature70>
</PropertyGroup>
<Target Name="GenerateBundledVersionsProps" DependsOnTargets="SetupBundledComponents">
<PropertyGroup>
<BundledVersionsPropsFileName>Microsoft.NETCoreSdk.BundledVersions.props</BundledVersionsPropsFileName>
@ -359,6 +351,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<NetCoreRoot Condition="'%24(NetCoreRoot)' == ''">%24([MSBuild]::NormalizePath('%24(MSBuildThisFileDirectory)..\..\'))</NetCoreRoot>
<NetCoreTargetingPackRoot Condition="'%24(NetCoreTargetingPackRoot)' == ''">%24([MSBuild]::EnsureTrailingSlash('%24(NetCoreRoot)'))packs</NetCoreTargetingPackRoot>
<MicrosoftNetFrameworkCompilersToolsetPackageVersion>$(MicrosoftNetCompilersToolsetPackageVersion)</MicrosoftNetFrameworkCompilersToolsetPackageVersion>
<NETCoreAppMaximumVersion>$(_NETCoreAppTargetFrameworkVersion)</NETCoreAppMaximumVersion>
<BundledNETCoreAppTargetFrameworkVersion>$(_NETCoreAppTargetFrameworkVersion)</BundledNETCoreAppTargetFrameworkVersion>
<BundledNETCoreAppPackageVersion>$(_NETCoreAppPackageVersion)</BundledNETCoreAppPackageVersion>
@ -412,6 +405,10 @@ Copyright (c) .NET Foundation. All rights reserved.
<KnownILLinkPack Include="Microsoft.NET.ILLink.Tasks"
TargetFramework="net8.0"
ILLinkPackVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
<KnownWebAssemblySdkPack Include="Microsoft.NET.Sdk.WebAssembly.Pack"
TargetFramework="net8.0"
WebAssemblySdkPackVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
<KnownRuntimePack Include="Microsoft.NETCore.App"
TargetFramework="net8.0"

View file

@ -1,5 +1,5 @@
name: dotnet-sdk
version: 6.0.100-preview.2.21155.3
version: 6.0.408
summary: Cross-Platform .NET Core SDK
description: |
.NET Core SDK. https://dot.net/core.
@ -16,21 +16,26 @@ base: core18
parts:
dotnet-sdk:
plugin: dump
source: https://download.visualstudio.microsoft.com/download/pr/25c7e38e-0a6a-4d66-ac4e-b550a44b8a98/49128be84b903799259e7bebe8e9d969/dotnet-sdk-6.0.100-preview.2.21155.3-linux-x64.tar.gz
source-checksum: sha512/90d9b6070f7732dcf75f5a09a4f10f9b23c835a3bb144e0c3f1fa451cadd3d49c9781973b180f70a4d2798358a7c00f3c0b9b3bf35326fe4c94e470e84ac8c35
source: https://download.visualstudio.microsoft.com/download/pr/dd7d2255-c9c1-4c6f-b8ad-6e853d6bb574/c8e1b5f47bf17b317a84487491915178/dotnet-sdk-6.0.408-linux-x64.tar.gz
source-checksum: sha512/d5eed37ce6c07546aa217d6e786f3b67be2b6d97c23d5888d9ee5d5398e8a9bfc06202b14e3529245f7ec78f4036778caf69bdbe099de805fe1f566277e8440e
stage-packages:
- libicu60
- libssl1.0.0
- libcurl3
- libgssapi-krb5-2
- libstdc++6
- zlib1g
- libgcc1
- libtinfo5
- liblttng-ust0
- liburcu6
- libicu60
- libc6
- libgcc1
- libstdc++6
- libssl1.0.0
- libcurl3
- libgssapi-krb5-2
- zlib1g
- lldb
- libunwind8
- libtinfo5
- liblttng-ust0
- liburcu6
runtime-wrapper:
plugin: dump
source: .

View file

@ -1,5 +1,5 @@
name: dotnet-sdk
version: 7.0.100-preview.1.22110.4
version: 7.0.203
summary: Cross-Platform .NET Core SDK
description: |
.NET Core SDK. https://dot.net/core.
@ -16,8 +16,8 @@ base: core18
parts:
dotnet-sdk:
plugin: dump
source: https://download.visualstudio.microsoft.com/download/pr/1af9d3c3-a20e-400c-abe5-3d80dec7b63b/803f8dc5cf21fb28245aba71a7fdbc05/dotnet-sdk-7.0.100-preview.1.22110.4-linux-x64.tar.gz
source-checksum: sha512/54488a911172f059e3823d6bf52e1fa87305eb09e84d97f81a40e0815fc8a73a480b149023283f557a672ef0341f022b8ca16ebec92264ee16a56fac8f35e2e2
source: https://download.visualstudio.microsoft.com/download/pr/ebfd0bf8-79bd-480a-9e81-0b217463738d/9adc6bf0614ce02670101e278a2d8555/dotnet-sdk-7.0.203-linux-x64.tar.gz
source-checksum: sha512/ed1ae7cd88591ec52e1515c4a25d9a832eca29e8a0889549fea35a320e6e356e3806a17289f71fc0b04c36b006ae74446c53771d976c170fcbe5977ac7db1cb6
stage-packages:
- libicu60
- libc6
@ -36,3 +36,6 @@ parts:
runtime-wrapper:
plugin: dump
source: .

View file

@ -0,0 +1,41 @@
name: dotnet-sdk
version: 8.0.100-preview.3.23178.7
summary: Cross-Platform .NET Core SDK
description: |
.NET Core SDK. https://dot.net/core.
grade: stable
confinement: classic
apps:
dotnet:
command: dotnet
base: core18
parts:
dotnet-sdk:
plugin: dump
source: https://download.visualstudio.microsoft.com/download/pr/103d5e2c-d5c4-4101-bb6e-b82bc73a7d93/284a5cdccbc995f39806a3ba2dc17b93/dotnet-sdk-8.0.100-preview.3.23178.7-linux-x64.tar.gz
source-checksum: sha512/3b5d72979831256b9340a01db23d3b2dca801672546eeed04385949ed5f4363d3c731f31477ec82c7200ce88502dc45e03986c8acc8f2fc611b0343af5f1c488
stage-packages:
- libicu60
- libc6
- libgcc1
- libstdc++6
- libssl1.0.0
- libcurl3
- libgssapi-krb5-2
- zlib1g
- lldb
- libunwind8
- libtinfo5
- liblttng-ust0
- liburcu6
runtime-wrapper:
plugin: dump
source: .