Skip to content

Commit

Permalink
Fix asset manifest generation (#10370)
Browse files Browse the repository at this point in the history
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2056346

I made a mistake when I originally authored this, but we didn't notice
because we were shipping .NET Framework services so there were files at
the specified location too. Now that we've removed those, this started
to cause exceptions.
  • Loading branch information
davidwengier authored May 16, 2024
2 parents e2128d0 + b22daa3 commit 8de1a27
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions eng/targets/ReplaceServiceHubAssetsInVsixManifest.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<Project>
<Import Project="GenerateServiceHubConfigurationFiles.targets" />
<!--
Injects generated Asset entries for ServiceHub configuration files to vsixmanifest:
Injects generated Asset entries for ServiceHub configuration files to vsixmanifest:
<Asset Type="Microsoft.ServiceHub.Service" d:Source="File" Path="{service-name}.servicehub.service.json"/>
-->

<Target Name="GetGeneratedVsixManifestPath">
<PropertyGroup>
<_GeneratedVsixManifestPath>$(IntermediateOutputPath)source.extension.g.vsixmanifest</_GeneratedVsixManifestPath>
</PropertyGroup>
</Target>

<!--
Redefines VSSDK target FindSourceVsixManifest to allow adding generated content to the manifest.
Workaround for: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1179780
Expand All @@ -23,13 +23,13 @@
Outputs="$(_GeneratedVsixManifestPath)">
<PropertyGroup>
<_Placeholder><![CDATA[<!--#SERVICEHUB_ASSETS#-->]]></_Placeholder>
<_Replacement>@(ServiceHubServiceJsonFile->'&lt;Asset Type="Microsoft.ServiceHub.Service" d:Source="File" Path="%(FileName)%(Extension)" /&gt;', '
<_Replacement>@(ServiceHubServiceJsonFile->'&lt;Asset Type="Microsoft.ServiceHub.Service" d:Source="File" Path="ServiceHubCore\%(FileName)%(Extension)" /&gt;', '
')</_Replacement>
</PropertyGroup>

<Copy SourceFiles="$(VsixSourceManifestPath)" DestinationFiles="$(_GeneratedVsixManifestPath)" />

<WriteLinesToFile
<WriteLinesToFile
File="$(_GeneratedVsixManifestPath)"
Lines="$([System.IO.File]::ReadAllText('$(_GeneratedVsixManifestPath)').Replace('$(_Placeholder)', '$(_Replacement)'))"
Overwrite="true"
Expand Down

0 comments on commit 8de1a27

Please sign in to comment.