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