Skip to content
Open
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
13 changes: 10 additions & 3 deletions VisualStudio.Extension-2022/PrepareImageManifest.targets
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,16 @@
Text="Cannot find the Value attribute of the Resources element. imagemanifest cannot be updated."
Condition="'$(ResourcesValue)' == ''" />
<PropertyGroup>
<LastIndex>$([MSBuild]::Subtract($(ResourcesValue.Split(';').Length), 1))</LastIndex>
<LastComponent>$(ResourcesValue.Split(';')[$(LastIndex)])</LastComponent>
<ValueToSet>$([System.String]::Concat(/$(AssemblyName);v%(ImageManifests.AssemblyVersion);$(LastComponent)))</ValueToSet>
<SegmentsCount>$([System.String]::Copy('$(ResourcesValue)').Split(';').Length)</SegmentsCount>
<LastComponent Condition="'$(SegmentsCount)' == '4'">$([System.String]::Copy('$(ResourcesValue)').Split(';')[3])</LastComponent>
<LastComponent Condition="'$(SegmentsCount)' == '3'">$([System.String]::Copy('$(ResourcesValue)').Split(';')[2])</LastComponent>
<PublicKey Condition="'$(SegmentsCount)' == '4'">$([System.String]::Copy('$(ResourcesValue)').Split(';')[2])</PublicKey>
<PublicKey Condition="'$(SegmentsCount)' != '4'"></PublicKey>
<SemiPublicKey Condition="'$(PublicKey)' != ''">;$(PublicKey)</SemiPublicKey>
<SemiPublicKey Condition="'$(PublicKey)' == ''"></SemiPublicKey>
<ValueToSet>
$([System.String]::Concat(/$(AssemblyName);v%(ImageManifests.AssemblyVersion)$(SemiPublicKey);$(LastComponent)))
</ValueToSet>
</PropertyGroup>
<XmlPoke Namespaces="$(Namespace)"
XmlInputPath="%(ImageManifests.FullPath)"
Expand Down