Skip to content
This repository was archived by the owner on Nov 21, 2018. It is now read-only.

Use file globbing to resolve manifests #143

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,4 @@
<Content Include="build\**\*.targets" PackagePath="%(Identity)" />
</ItemGroup>

<Target Name="UpdateManifestVersionNumbers" BeforeTargets="GenerateNuspec">
<PropertyGroup>
<ManifestTargetsFile>$(MSBuildThisFileDirectory)build\PublishWithAspNetCoreTargetManifest.targets</ManifestTargetsFile>
</PropertyGroup>

<Exec Command="powershell.exe -command &quot;(Get-Content $(ManifestTargetsFile)).replace('__MANIFEST_VERSION__','$(VersionPrefix)-$(VersionSuffix)') | Set-Content $(ManifestTargetsFile)&quot;" Condition="'$(OS)' == 'Windows_NT'"/>
<Exec Command="sed -i -e &quot;s/__MANIFEST_VERSION__/$(VersionPrefix)-$(VersionSuffix)/g&quot; $(ManifestTargetsFile)" Condition="'$(OS)' != 'Windows_NT'"/>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
<PublishWithAspNetCoreTargetManifest Condition="'$(PublishWithAspNetCoreTargetManifest)'=='' and '$(RuntimeIdentifier)'=='' and '$(RuntimeIdentifiers)'=='' and '$(PublishableProject)'=='true'">true</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>

<PropertyGroup Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true'">
<TargetManifestFiles>$(TargetManifestFiles);$(MSBuildThisFileDirectory)aspnetcore-store-__MANIFEST_VERSION__-win7-x64.xml;$(MSBuildThisFileDirectory)aspnetcore-store-__MANIFEST_VERSION__-win7-x86.xml;$(MSBuildThisFileDirectory)aspnetcore-store-__MANIFEST_VERSION__-osx-x64.xml;$(MSBuildThisFileDirectory)aspnetcore-store-__MANIFEST_VERSION__-linux-x64.xml</TargetManifestFiles>
</PropertyGroup>

<!--
******************************************************************************
Target: PublishWithAspNetCoreTargetManifest
Expand All @@ -15,12 +11,19 @@ Error if PublishWithAspNetCoreTargetManifest is set to true for standalone app
-->
<Target
Name="PublishWithAspNetCoreTargetManifest"
BeforeTargets="Publish"
DependsOnTargets="PrepareForPublish"
AfterTargets="PrepareForPublish"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆙📅 we need to run this target earlier than we have been to ensure TargetManifestFiles is set before all dotnet/sdk targets that rely on it.

Condition="'$(PublishWithAspNetCoreTargetManifest)'=='true'" >

<Error
Text="PublishWithAspNetCoreTargetManifest cannot be set to true for standalone apps."
Condition="'$(RuntimeIdentifier)'!='' or '$(RuntimeIdentifiers)'!=''" />

<ItemGroup>
<AspNetCoreTargetManifestFiles Include="$(MSBuildThisFileDirectory)aspnetcore-store-*.xml"/>
</ItemGroup>

<PropertyGroup>
<TargetManifestFiles>$(TargetManifestFiles);@(AspNetCoreTargetManifestFiles)</TargetManifestFiles>
</PropertyGroup>
</Target>
</Project>