Skip to content

Commit

Permalink
Build .vsix generation adjustments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey M committed Aug 29, 2020
1 parent 701475c commit dd1a724
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions DPackRx/DPackRx.targets
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@
<PropertyGroup>
<_AssemblyInfoEx>$(MSBuildProjectDirectory)\$(IntermediateOutputPath)AssemblyInfoEx.cs</_AssemblyInfoEx>
<_AssemblyFileVersion Condition=" '$(_AssemblyFileVersion)'=='' ">true</_AssemblyFileVersion>
<_CreateVsix>true</_CreateVsix>
<_CreateVsix Condition=" '$(Configuration)' == 'Debug' AND '$(BuildingInsideVisualStudio)' == 'true' ">false</_CreateVsix>
</PropertyGroup>


<!-- Retrieve VSIX manifest version -->
<Target Name="ResolveVsixVersion">
<Target Name="ResolveVsixVersion"
Condition=" '$(_CreateVsix)' == 'true' ">
<XmlPeek Namespaces="&lt;Namespace Prefix='pkg' Uri='http://schemas.microsoft.com/developer/vsx-schema/2011'/&gt;"
XmlInputPath="$(MSBuildProjectDirectory)\source.extension.vsixmanifest"
Query="/pkg:PackageManifest/pkg:Metadata/pkg:Identity/@Version">
Expand All @@ -48,6 +51,7 @@

<!-- Generate AssemblyInfoEx.cs using VSIX manifest version -->
<Target Name="UpdateAssemblyInfoExFromVsix"
Condition=" '$(_CreateVsix)' == 'true' "
Inputs="$(MSBuildProjectDirectory)\source.extension.vsixmanifest"
Outputs="$(_AssemblyInfoEx)">
<CreateItem Include="System.Reflection.AssemblyVersionAttribute"
Expand All @@ -74,7 +78,8 @@

<!-- Copy VSIX package to project output folder with an extra file name's version suffix -->
<!-- Add copied file name to auto-clean file -->
<Target Name="CopyVsixPackageWithVersion">
<Target Name="CopyVsixPackageWithVersion"
Condition=" '$(_CreateVsix)' == 'true' ">
<ItemGroup>
<_GeneratedVSIXPackage Include="$(TargetVsixContainerName)" />
<_SourceVSIXPackage Include="@(_GeneratedVSIXPackage->'$(TargetDir)%(Filename)%(Extension)')" />
Expand Down

0 comments on commit dd1a724

Please sign in to comment.