Preserve DotNetPackageVersionPropsPath when restoring with msbuild.exe
This commit is contained in:
parent
801ad07560
commit
809dedd40c
|
|
@ -4,7 +4,9 @@
|
||||||
<RestoreDependsOn Condition="'$(OS)'=='Windows_NT' AND '$(BuildVSIX)' == 'true'">$(RestoreDependsOn);RestoreVSIX</RestoreDependsOn>
|
<RestoreDependsOn Condition="'$(OS)'=='Windows_NT' AND '$(BuildVSIX)' == 'true'">$(RestoreDependsOn);RestoreVSIX</RestoreDependsOn>
|
||||||
<PackageDependsOn Condition="'$(OS)'=='Windows_NT' AND '$(BuildVSIX)' == 'true'">$(PackageDependsOn);PackageVSIX</PackageDependsOn>
|
<PackageDependsOn Condition="'$(OS)'=='Windows_NT' AND '$(BuildVSIX)' == 'true'">$(PackageDependsOn);PackageVSIX</PackageDependsOn>
|
||||||
<VSIXName>Microsoft.VisualStudio.RazorExtension</VSIXName>
|
<VSIXName>Microsoft.VisualStudio.RazorExtension</VSIXName>
|
||||||
|
<VSIXOutputPath>$(BuildDir)$(VSIXName).vsix</VSIXOutputPath>
|
||||||
<VSIXProject>$(RepositoryRoot)tooling\$(VSIXName)\$(VSIXName).csproj</VSIXProject>
|
<VSIXProject>$(RepositoryRoot)tooling\$(VSIXName)\$(VSIXName).csproj</VSIXProject>
|
||||||
|
<MSBuildArtifactsDir>$(ArtifactsDir)msbuild\</MSBuildArtifactsDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Target
|
<Target
|
||||||
|
|
@ -16,7 +18,32 @@
|
||||||
VisualStudioMSBuildx86Path is set by the GetToolsets target in KoreBuild if a version of VS matching the requirements in korebuild.json is found.
|
VisualStudioMSBuildx86Path is set by the GetToolsets target in KoreBuild if a version of VS matching the requirements in korebuild.json is found.
|
||||||
-->
|
-->
|
||||||
<Target Name="RestoreVSIX" DependsOnTargets="GetToolsets">
|
<Target Name="RestoreVSIX" DependsOnTargets="GetToolsets">
|
||||||
<Exec Command=""$(VisualStudioMSBuildx86Path)" "$(VSIXProject)" /t:Restore /v:m /p:BuildNumber=$(BuildNumber)"
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<VSIXResponseFilePath>$(MSBuildArtifactsDir)vsix-restore.rsp</VSIXResponseFilePath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<MSBuildArguments Remove="@(MSBuildArguments)" />
|
||||||
|
<MSBuildArguments Include="
|
||||||
|
$(VSIXProject);
|
||||||
|
/t:Restore;
|
||||||
|
/m;
|
||||||
|
/v:m;
|
||||||
|
/p:Configuration=$(Configuration);
|
||||||
|
/p:BuildNumber=$(BuildNumber);" />
|
||||||
|
<MSBuildArguments Include="/p:DotNetPackageVersionPropsPath=$(DotNetPackageVersionPropsPath)" Condition="'$(DotNetPackageVersionPropsPath)' != ''" />
|
||||||
|
<MSBuildArguments Include="/p:DotNetRestoreSourcePropsPath=$(DotNetRestoreSourcePropsPath)" Condition="'$(DotNetRestoreSourcePropsPath)' != ''" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<MakeDir Directories="$(MSBuildArtifactsDir)" />
|
||||||
|
|
||||||
|
<WriteLinesToFile
|
||||||
|
File="$(VSIXResponseFilePath)"
|
||||||
|
Lines="@(MSBuildArguments)"
|
||||||
|
Overwrite="true" />
|
||||||
|
|
||||||
|
<Exec Command=""$(VisualStudioMSBuildx86Path)" @"$(VSIXResponseFilePath)""
|
||||||
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
|
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
@ -26,13 +53,12 @@
|
||||||
Condition="'$(VisualStudioMSBuildx86Path)' == ''" />
|
Condition="'$(VisualStudioMSBuildx86Path)' == ''" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<MSBuildArtifactsDir>$(ArtifactsDir)msbuild\</MSBuildArtifactsDir>
|
|
||||||
<VSIXLogFilePath>$(MSBuildArtifactsDir)vsix.log</VSIXLogFilePath>
|
<VSIXLogFilePath>$(MSBuildArtifactsDir)vsix.log</VSIXLogFilePath>
|
||||||
<VSIXResponseFilePath>$(MSBuildArtifactsDir)vsix.rsp</VSIXResponseFilePath>
|
<VSIXResponseFilePath>$(MSBuildArtifactsDir)vsix-build.rsp</VSIXResponseFilePath>
|
||||||
<VSIXOutputPath>$(BuildDir)$(VSIXName).vsix</VSIXOutputPath>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<MSBuildArguments Remove="@(MSBuildArguments)" />
|
||||||
<MSBuildArguments Include="
|
<MSBuildArguments Include="
|
||||||
$(VSIXProject);
|
$(VSIXProject);
|
||||||
/m;
|
/m;
|
||||||
|
|
@ -44,7 +70,7 @@
|
||||||
/p:Configuration=$(Configuration);" />
|
/p:Configuration=$(Configuration);" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<MakeDir Directories="$(MSBuildArtifactsDir)" Condition="!Exists('$(MSBuildArtifactsDir)')" />
|
<MakeDir Directories="$(MSBuildArtifactsDir)" />
|
||||||
|
|
||||||
<WriteLinesToFile
|
<WriteLinesToFile
|
||||||
File="$(VSIXResponseFilePath)"
|
File="$(VSIXResponseFilePath)"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue