Trim by all manifests
This commit is contained in:
parent
c0d7d2cd4c
commit
e1a29f1b61
|
|
@ -1,44 +1,26 @@
|
||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PublishWithAspNetCoreTargetManifest Condition="'$(PublishWithAspNetCoreTargetManifest)'==''">true</PublishWithAspNetCoreTargetManifest>
|
<PublishWithAspNetCoreTargetManifest Condition="'$(PublishWithAspNetCoreTargetManifest)'=='' and '$(RuntimeIdentifier)'=='' and '$(RuntimeIdentifiers)'=='' and '$(PublishableProject)'=='true'">true</PublishWithAspNetCoreTargetManifest>
|
||||||
<ManifestRuntimeIdentifier Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true' and '$(PublishableProject)'=='true'" >$(AspNetCoreTargetManifestRuntimeIdentifier)</ManifestRuntimeIdentifier>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true' and '$(PublishableProject)'=='true' and '$(ManifestRuntimeIdentifier)'==''">
|
<PropertyGroup Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true'">
|
||||||
<ManifestRuntimeIdentifier
|
<TargetManifestFiles>$(TargetManifestFiles);$(MSBuildThisFileDirectory)manifest.win7-x64.xml;$(MSBuildThisFileDirectory)manifest.win7-x86.xml;$(MSBuildThisFileDirectory)manifest.osx.10.12-x64.xml;$(MSBuildThisFileDirectory)manifest.linux-x64.xml</TargetManifestFiles>
|
||||||
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
|
|
||||||
and '$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture)'=='X64'">win7-x64</ManifestRuntimeIdentifier>
|
|
||||||
<ManifestRuntimeIdentifier
|
|
||||||
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
|
|
||||||
and '$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture)'=='X86'">win7-x86</ManifestRuntimeIdentifier>
|
|
||||||
<ManifestRuntimeIdentifier
|
|
||||||
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))'">osx.10.12-x64</ManifestRuntimeIdentifier>
|
|
||||||
<ManifestRuntimeIdentifier
|
|
||||||
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))'">linux-x64</ManifestRuntimeIdentifier>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true' and '$(PublishableProject)'=='true'">
|
|
||||||
<TargetManifestFiles>$(TargetManifestFiles);$(MSBuildThisFileDirectory)manifest.$(ManifestRuntimeIdentifier).xml</TargetManifestFiles>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
*******************************************************
|
******************************************************************************
|
||||||
Target: PublishWithAspNetCoreTargetManifest
|
Target: PublishWithAspNetCoreTargetManifest
|
||||||
Error if manifest runtime identifier cannot be resolved
|
Error if PublishWithAspNetCoreTargetManifest is set to true for standalone app
|
||||||
*******************************************************
|
******************************************************************************
|
||||||
-->
|
-->
|
||||||
<Target
|
<Target
|
||||||
Name="PublishWithAspNetCoreTargetManifest"
|
Name="PublishWithAspNetCoreTargetManifest"
|
||||||
BeforeTargets="Publish"
|
BeforeTargets="Publish"
|
||||||
DependsOnTargets="PrepareForPublish"
|
DependsOnTargets="PrepareForPublish"
|
||||||
Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true' and '$(PublishableProject)'=='true'" >
|
Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true'" >
|
||||||
|
|
||||||
<Error
|
<Error
|
||||||
Text="Could not resolve manifest runtime identifier. Please specify the the runtime identifier via the AspNetCoreTargetManifestRuntimeIdentifier property."
|
Text="PublishWithAspNetCoreTargetManifest cannot be set to true for standalone apps."
|
||||||
Condition="'$(ManifestRuntimeIdentifier)'==''" />
|
Condition="'$(RuntimeIdentifier)'!='' or '$(RuntimeIdentifiers)'!=''" />
|
||||||
|
|
||||||
<Message
|
|
||||||
Text="Appending default ASP.NET Core runtime package store manifest for use during publish based for the runtime $(ManifestRuntimeIdentifier)."
|
|
||||||
Importance="low" />
|
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue