Skip to content

Commit

Permalink
Fix variable substitution in targets too (#813)
Browse files Browse the repository at this point in the history
  • Loading branch information
lewing authored Jun 12, 2024
1 parent 41fe641 commit 727397c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@

<PropertyGroup>
<WorkloadManifestPath>$(IntermediateOutputPath)WorkloadManifest.json</WorkloadManifestPath>
<WorkloadManifestTargetsPath>$(IntermediateOutputPath)WorkloadManifest.targets</WorkloadManifestTargetsPath>
</PropertyGroup>

<ItemGroup>
<PackageFile Include="$(WorkloadManifestPath)" TargetPath="data" />
<PackageFile Include="WorkloadManifest.targets" TargetPath="data" />
<PackageFile Include="$(WorkloadManifestTargetsPath)" TargetPath="data" />
</ItemGroup>
</Target>

Expand All @@ -50,6 +51,11 @@
TemplateFile="WorkloadManifest.json.in"
Properties="@(_WorkloadManifestValues->'%(Identity)=%(Value)')"
OutputPath="$(WorkloadManifestPath)" />

<GenerateFileFromTemplate
TemplateFile="WorkloadManifest.targets.in"
Properties="@(_WorkloadManifestValues->'%(Identity)=%(Value)')"
OutputPath="$(WorkloadManifestTargetsPath)" />
</Target>

<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.targets" />
Expand Down

0 comments on commit 727397c

Please sign in to comment.