Set TargetManifestFiles in PropertyGroup
This commit is contained in:
parent
b5125caa44
commit
98b1945d65
|
|
@ -1,26 +1,10 @@
|
||||||
<Project>
|
<Project>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PublishWithAspNetCoreTargetManifest Condition="'$(PublishWithAspNetCoreTargetManifest)'==''">true</PublishWithAspNetCoreTargetManifest>
|
<PublishWithAspNetCoreTargetManifest Condition="'$(PublishWithAspNetCoreTargetManifest)'==''">true</PublishWithAspNetCoreTargetManifest>
|
||||||
|
<ManifestRuntimeIdentifier Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true' and '$(PublishableProject)'=='true'" >$(AspNetCoreTargetManifestRuntimeIdentifier)</ManifestRuntimeIdentifier>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!--
|
<PropertyGroup Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true' and '$(PublishableProject)'=='true' and '$(ManifestRuntimeIdentifier)'==''">
|
||||||
*****************************************************************************
|
|
||||||
Target: PublishWithAspNetCoreTargetManifest
|
|
||||||
Append the default ASP.NET Core runtime package store manifest during publish
|
|
||||||
*****************************************************************************
|
|
||||||
-->
|
|
||||||
<Target
|
|
||||||
Name="PublishWithAspNetCoreTargetManifest"
|
|
||||||
BeforeTargets="Publish"
|
|
||||||
DependsOnTargets="PrepareForPublish"
|
|
||||||
Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true' and '$(PublishableProject)'=='true'" >
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<ManifestRuntimeIdentifier>$(AspNetCoreTargetManifestRuntimeIdentifier)</ManifestRuntimeIdentifier>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(AspNetCoreTargetManifestRuntimeIdentifier)'==''">
|
|
||||||
<ManifestRuntimeIdentifier
|
<ManifestRuntimeIdentifier
|
||||||
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
|
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
|
||||||
and '$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture)'=='X64'">win7-x64</ManifestRuntimeIdentifier>
|
and '$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture)'=='X64'">win7-x64</ManifestRuntimeIdentifier>
|
||||||
|
|
@ -33,6 +17,22 @@ Append the default ASP.NET Core runtime package store manifest during publish
|
||||||
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))'">linux-x64</ManifestRuntimeIdentifier>
|
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))'">linux-x64</ManifestRuntimeIdentifier>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true' and '$(PublishableProject)'=='true'">
|
||||||
|
<TargetManifestFiles>$(TargetManifestFiles);$(MSBuildThisFileDirectory)manifest.$(ManifestRuntimeIdentifier).xml</TargetManifestFiles>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
*******************************************************
|
||||||
|
Target: PublishWithAspNetCoreTargetManifest
|
||||||
|
Error if manifest runtime identifier cannot be resolved
|
||||||
|
*******************************************************
|
||||||
|
-->
|
||||||
|
<Target
|
||||||
|
Name="PublishWithAspNetCoreTargetManifest"
|
||||||
|
BeforeTargets="Publish"
|
||||||
|
DependsOnTargets="PrepareForPublish"
|
||||||
|
Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true' and '$(PublishableProject)'=='true'" >
|
||||||
|
|
||||||
<Error
|
<Error
|
||||||
Text="Could not resolve manifest runtime identifier. Please specify the the runtime identifier via the AspNetCoreTargetManifestRuntimeIdentifier property."
|
Text="Could not resolve manifest runtime identifier. Please specify the the runtime identifier via the AspNetCoreTargetManifestRuntimeIdentifier property."
|
||||||
Condition="'$(ManifestRuntimeIdentifier)'==''" />
|
Condition="'$(ManifestRuntimeIdentifier)'==''" />
|
||||||
|
|
@ -40,9 +40,5 @@ Append the default ASP.NET Core runtime package store manifest during publish
|
||||||
<Message
|
<Message
|
||||||
Text="Appending default ASP.NET Core runtime package store manifest for use during publish based for the runtime $(ManifestRuntimeIdentifier)."
|
Text="Appending default ASP.NET Core runtime package store manifest for use during publish based for the runtime $(ManifestRuntimeIdentifier)."
|
||||||
Importance="low" />
|
Importance="low" />
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetManifest>$(TargetManifest);$(MSBuildThisFileDirectory)manifest.$(ManifestRuntimeIdentifier).xml</TargetManifest>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue