Skip to content
代码片段 群组 项目
未验证 提交 1e3dacc1 编辑于 作者: Antoine Martin's avatar Antoine Martin 提交者: GitHub
浏览文件

source-build: support building aspnetcore using non-portable runtime packages...

source-build: support building aspnetcore using non-portable runtime packages (backport #43937) (#44752)
上级 7b7f4f86
No related branches found
No related tags found
无相关合并请求
...@@ -173,6 +173,8 @@ ...@@ -173,6 +173,8 @@
freebsd-x64 freebsd-x64
</SupportedRuntimeIdentifiers> </SupportedRuntimeIdentifiers>
<SupportedRuntimeIdentifiers Condition=" '$(PortableBuild)' == 'false' ">$(SupportedRuntimeIdentifiers);$(TargetRuntimeIdentifier)</SupportedRuntimeIdentifiers>
<!-- Make error messages clickable in VS Code's console --> <!-- Make error messages clickable in VS Code's console -->
<GenerateFullPaths Condition="'$(VSCODE_CWD)' != '' OR '$(TERM_PROGRAM)' == 'vscode'">true</GenerateFullPaths> <GenerateFullPaths Condition="'$(VSCODE_CWD)' != '' OR '$(TERM_PROGRAM)' == 'vscode'">true</GenerateFullPaths>
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
<TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('FreeBSD'))">freebsd</TargetOsName> <TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('FreeBSD'))">freebsd</TargetOsName>
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture> <TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture>
<TargetRuntimeIdentifier Condition="'$(TargetRuntimeIdentifier)' == ''">$(TargetOsName)-$(TargetArchitecture)</TargetRuntimeIdentifier> <TargetRuntimeIdentifier Condition="'$(TargetRuntimeIdentifier)' == ''">$(TargetOsName)-$(TargetArchitecture)</TargetRuntimeIdentifier>
<PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
<DefaultAppHostRuntimeIdentifier Condition=" '$(PortableBuild)' == 'false' ">$(TargetRuntimeIdentifier)</DefaultAppHostRuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(BuildAllProjects)' == 'true' "> <PropertyGroup Condition=" '$(BuildAllProjects)' == 'true' ">
......
...@@ -95,6 +95,7 @@ and are generated based on the last package release. ...@@ -95,6 +95,7 @@ and are generated based on the last package release.
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.linux-musl-x64" /> <LatestPackageReference Include="Microsoft.NETCore.App.Runtime.linux-musl-x64" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.linux-musl-arm" /> <LatestPackageReference Include="Microsoft.NETCore.App.Runtime.linux-musl-arm" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.linux-musl-arm64" /> <LatestPackageReference Include="Microsoft.NETCore.App.Runtime.linux-musl-arm64" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.$(TargetRuntimeIdentifier)" Condition=" '$(PortableBuild)' == 'false' " />
<!-- Crossgen2 compiler --> <!-- Crossgen2 compiler -->
<LatestPackageReference Include="Microsoft.NETCore.App.Crossgen2.osx-x64" /> <LatestPackageReference Include="Microsoft.NETCore.App.Crossgen2.osx-x64" />
...@@ -109,6 +110,7 @@ and are generated based on the last package release. ...@@ -109,6 +110,7 @@ and are generated based on the last package release.
<LatestPackageReference Include="Microsoft.NETCore.App.Crossgen2.win-x86" /> <LatestPackageReference Include="Microsoft.NETCore.App.Crossgen2.win-x86" />
<LatestPackageReference Include="Microsoft.NETCore.App.Crossgen2.win-arm" /> <LatestPackageReference Include="Microsoft.NETCore.App.Crossgen2.win-arm" />
<LatestPackageReference Include="Microsoft.NETCore.App.Crossgen2.win-arm64" /> <LatestPackageReference Include="Microsoft.NETCore.App.Crossgen2.win-arm64" />
<LatestPackageReference Include="Microsoft.NETCore.App.Crossgen2.$(TargetRuntimeIdentifier)" Condition=" '$(PortableBuild)' == 'false' " />
</ItemGroup> </ItemGroup>
<ItemGroup Label=".NET team dependencies (Non-source-build)" Condition="'$(DotNetBuildFromSource)' != 'true'"> <ItemGroup Label=".NET team dependencies (Non-source-build)" Condition="'$(DotNetBuildFromSource)' != 'true'">
......
...@@ -39,8 +39,15 @@ ...@@ -39,8 +39,15 @@
<DefaultRuntimeFrameworkVersion Condition=" '$(IsServicingBuild)' != 'true' AND <DefaultRuntimeFrameworkVersion Condition=" '$(IsServicingBuild)' != 'true' AND
'%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' AND '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' AND
'$(TargetLatestDotNetRuntime)' != 'false' ">${MicrosoftNETCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion> '$(TargetLatestDotNetRuntime)' != 'false' ">${MicrosoftNETCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion>
<RuntimePackRuntimeIdentifiers Condition=" '$(PortableBuild)' == 'false' ">$(TargetRuntimeIdentifier)</RuntimePackRuntimeIdentifiers>
</KnownFrameworkReference> </KnownFrameworkReference>
<KnownCrossgen2Pack Update="Microsoft.NETCore.App.Crossgen2" Condition=" '$(PortableBuild)' == 'false' ">
<Crossgen2PackVersion
Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRuntimeVersion}</Crossgen2PackVersion>
<Crossgen2RuntimeIdentifiers>$(TargetRuntimeIdentifier)</Crossgen2RuntimeIdentifiers>
</KnownCrossgen2Pack>
<!-- Use the just-built ASP.NET Core shared framework if available except when building product code in servicing. --> <!-- Use the just-built ASP.NET Core shared framework if available except when building product code in servicing. -->
<KnownFrameworkReference Update="Microsoft.AspNetCore.App" Condition=" $(UpdateAspNetCoreKnownFramework) "> <KnownFrameworkReference Update="Microsoft.AspNetCore.App" Condition=" $(UpdateAspNetCoreKnownFramework) ">
<LatestRuntimeFrameworkVersion <LatestRuntimeFrameworkVersion
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<!-- WebDriver is not strong-named, so this test project cannot be strong named either. --> <!-- WebDriver is not strong-named, so this test project cannot be strong named either. -->
<SignAssembly>false</SignAssembly> <SignAssembly>false</SignAssembly>
<IsTestAssetProject>true</IsTestAssetProject> <IsTestAssetProject>true</IsTestAssetProject>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier> <RuntimeIdentifier Condition=" '$(DotNetBuildFromSource)' != 'true' ">linux-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
......
...@@ -96,7 +96,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant ...@@ -96,7 +96,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
<Crossgen2ToolFileName Condition=" '$(TargetOsName)' == 'win' ">$(Crossgen2ToolFileName).exe</Crossgen2ToolFileName> <Crossgen2ToolFileName Condition=" '$(TargetOsName)' == 'win' ">$(Crossgen2ToolFileName).exe</Crossgen2ToolFileName>
<!-- E.g. "PkgMicrosoft_NETCore_App_Runtime_win-x64" (set in obj/Microsoft.AspNetCore.App.Runtime.csproj.nuget.g.props). --> <!-- E.g. "PkgMicrosoft_NETCore_App_Runtime_win-x64" (set in obj/Microsoft.AspNetCore.App.Runtime.csproj.nuget.g.props). -->
<RuntimePackageRootVariableName>PkgMicrosoft_NETCore_App_Runtime_$(RuntimeIdentifier)</RuntimePackageRootVariableName> <RuntimePackageRootVariableName>PkgMicrosoft_NETCore_App_Runtime_$(RuntimeIdentifier.Replace('.', '_'))</RuntimePackageRootVariableName>
<!-- <!--
Determine the crossgen2 package path property name. Special case linux-musl-arm and linux-musl-arm64 because they Determine the crossgen2 package path property name. Special case linux-musl-arm and linux-musl-arm64 because they
...@@ -105,9 +105,10 @@ This package is an internal implementation of the .NET Core SDK and is not meant ...@@ -105,9 +105,10 @@ This package is an internal implementation of the .NET Core SDK and is not meant
--> -->
<BuildOsName>$(TargetOsName)</BuildOsName> <BuildOsName>$(TargetOsName)</BuildOsName>
<BuildOsName Condition="'$(TargetOsName)' == 'linux-musl' and '$(TargetArchitecture)'!='x64'">linux</BuildOsName> <BuildOsName Condition="'$(TargetOsName)' == 'linux-musl' and '$(TargetArchitecture)'!='x64'">linux</BuildOsName>
<BuildOsName Condition=" '$(PortableBuild)' == 'false' ">$(TargetRuntimeIdentifier.Substring(0,$(TargetRuntimeIdentifier.IndexOf('-'))))</BuildOsName>
<Crossgen2BuildArchitecture Condition=" '$(BuildOsName)' == 'win' ">x64</Crossgen2BuildArchitecture> <Crossgen2BuildArchitecture Condition=" '$(BuildOsName)' == 'win' ">x64</Crossgen2BuildArchitecture>
<Crossgen2BuildArchitecture Condition=" '$(Crossgen2BuildArchitecture)' == '' ">$(BuildArchitecture)</Crossgen2BuildArchitecture> <Crossgen2BuildArchitecture Condition=" '$(Crossgen2BuildArchitecture)' == '' ">$(BuildArchitecture)</Crossgen2BuildArchitecture>
<Crossgen2PackageRootVariableName>PkgMicrosoft_NETCore_App_Crossgen2_$(BuildOsName)-$(Crossgen2BuildArchitecture)</Crossgen2PackageRootVariableName> <Crossgen2PackageRootVariableName>PkgMicrosoft_NETCore_App_Crossgen2_$(BuildOsName.Replace('.', '_'))-$(Crossgen2BuildArchitecture)</Crossgen2PackageRootVariableName>
<AssetTargetFallback>$(AssetTargetFallback);native,Version=0.0</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);native,Version=0.0</AssetTargetFallback>
......
<Project> <Project>
<PropertyGroup Condition=" '$(PackAsTool)' == 'true' "> <PropertyGroup Condition=" '$(PackAsTool)' == 'true' ">
<!-- Microsoft tool packages are required to target both x64 and x86. --> <!-- Microsoft tool packages are required to target both x64 and x86. -->
<PackAsToolShimRuntimeIdentifiers Condition=" '$(IsShippingPackage)' == 'true' ">win-x64;win-x86</PackAsToolShimRuntimeIdentifiers> <PackAsToolShimRuntimeIdentifiers Condition=" '$(IsShippingPackage)' == 'true' AND '$(DotNetBuildFromSource)' != 'true' ">win-x64;win-x86</PackAsToolShimRuntimeIdentifiers>
<!-- None of the tool projects are project reference providers. --> <!-- None of the tool projects are project reference providers. -->
<IsProjectReferenceProvider>false</IsProjectReferenceProvider> <IsProjectReferenceProvider>false</IsProjectReferenceProvider>
<!-- <!--
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册