Restore the VSIX project with MSBuild instead of NuGet.exe (#1471)

* Restore the VSIX project with MSBuild instead of NuGet.exe
* Upgrade AppVeyor image to VS Preview
This commit is contained in:
Nate McMaster 2017-06-27 10:28:23 -07:00 committed by GitHub
parent c67e790b3b
commit bf1be9fb79
2 changed files with 4 additions and 15 deletions

View File

@ -11,4 +11,4 @@ build_script:
clone_depth: 1
test: off
deploy: off
os: Visual Studio 2017
os: Visual Studio 2017 Preview

View File

@ -1,15 +1,10 @@
<Project>
<PropertyGroup>
<PackageDependsOn Condition="'$(OS)'=='Windows_NT'">$(PackageDependsOn);GenerateVSIX</PackageDependsOn>
<NuGetCommandLineVersion>4.1.0</NuGetCommandLineVersion>
<VSIXName>Microsoft.VisualStudio.RazorExtension</VSIXName>
<VSIXProject>$(RepositoryRoot)tooling\$(VSIXName)\$(VSIXName).csproj</VSIXProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NuGet.CommandLine" Version="$(NuGetCommandLineVersion)" Condition="'$(OS)'=='Windows_NT'" />
</ItemGroup>
<Target
Name="GenerateVSIX"
DependsOnTargets="_LocateMSBuildExe;_BuildVSIX"
@ -29,13 +24,6 @@
</PropertyGroup>
</Target>
<Target Name="_RestoreProject">
<PropertyGroup>
<NuGetExe>$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))nuget.commandline\$(NuGetCommandLineVersion)\tools\nuget.exe</NuGetExe>
</PropertyGroup>
<Exec Command="$(NuGetExe) restore &quot;$(VSIXProject)&quot; -SolutionDir &quot;$(RepositoryRoot) &quot; -verbosity quiet" />
</Target>
<Target Name="_BuildVSIX" Condition="'$(MSBuildExePath)'!=''">
<PropertyGroup>
<MSBuildArtifactsDir>$(ArtifactsDir)msbuild\</MSBuildArtifactsDir>
@ -44,7 +32,8 @@
<VSIXOutputPath>$(BuildDir)$(VSIXName).vsix</VSIXOutputPath>
</PropertyGroup>
<CallTarget Targets="_RestoreProject" />
<Exec Command="&quot;$(MSBuildExePath)&quot; &quot;$(VSIXProject)&quot; /nologo /t:Restore /v:m" />
<ItemGroup>
<MSBuildArguments Include="
$(VSIXProject);
@ -66,4 +55,4 @@
<Exec Command="&quot;$(MSBuildExePath)&quot; @&quot;$(VSIXResponseFilePath)&quot;" />
</Target>
</Project>
</Project>