Preserve the build number when building the VSIX (#1702)
This commit is contained in:
parent
d1cca77852
commit
39c190aa0d
|
|
@ -1,13 +1,14 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<PackageDependsOn Condition="'$(OS)'=='Windows_NT'">$(PackageDependsOn);GenerateVSIX</PackageDependsOn>
|
||||
<RestoreDependsOn Condition="'$(OS)'=='Windows_NT'">$(RestoreDependsOn);RestoreVSIX</RestoreDependsOn>
|
||||
<PackageDependsOn Condition="'$(OS)'=='Windows_NT'">$(PackageDependsOn);PackageVSIX</PackageDependsOn>
|
||||
<VSIXName>Microsoft.VisualStudio.RazorExtension</VSIXName>
|
||||
<VSIXProject>$(RepositoryRoot)tooling\$(VSIXName)\$(VSIXName).csproj</VSIXProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target
|
||||
Name="GenerateVSIX"
|
||||
DependsOnTargets="_LocateMSBuildExe;_BuildVSIX"
|
||||
DependsOnTargets="RestoreVSIX;PackageVSIX"
|
||||
Condition="'$(OS)'=='Windows_NT'" />
|
||||
|
||||
<Target Name="_LocateMSBuildExe" Condition="Exists('$(MSBuildProgramFiles32)')">
|
||||
|
|
@ -24,7 +25,11 @@
|
|||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="_BuildVSIX" Condition="'$(MSBuildExePath)'!=''">
|
||||
<Target Name="RestoreVSIX" DependsOnTargets="_LocateMSBuildExe">
|
||||
<Exec Command=""$(MSBuildExePath)" "$(VSIXProject)" /t:Restore /v:m /p:BuildNumber=$(BuildNumber)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PackageVSIX" DependsOnTargets="_LocateMSBuildExe">
|
||||
<PropertyGroup>
|
||||
<MSBuildArtifactsDir>$(ArtifactsDir)msbuild\</MSBuildArtifactsDir>
|
||||
<VSIXLogFilePath>$(MSBuildArtifactsDir)vsix.log</VSIXLogFilePath>
|
||||
|
|
@ -32,11 +37,10 @@
|
|||
<VSIXOutputPath>$(BuildDir)$(VSIXName).vsix</VSIXOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Command=""$(MSBuildExePath)" "$(VSIXProject)" /nologo /t:Restore /v:m" />
|
||||
|
||||
<ItemGroup>
|
||||
<MSBuildArguments Include="
|
||||
$(VSIXProject);
|
||||
/m;
|
||||
/v:M;
|
||||
/fl;
|
||||
/flp:LogFile=$(VSIXLogFilePath);
|
||||
|
|
|
|||
Loading…
Reference in New Issue