Require the Microsoft.VisualStudio.Component.VSSDK workload to be installed
This commit is contained in:
parent
ab62ea9321
commit
6c7551d9c7
|
|
@ -12,25 +12,19 @@
|
||||||
DependsOnTargets="RestoreVSIX;PackageVSIX"
|
DependsOnTargets="RestoreVSIX;PackageVSIX"
|
||||||
Condition="'$(OS)'=='Windows_NT'" />
|
Condition="'$(OS)'=='Windows_NT'" />
|
||||||
|
|
||||||
<Target Name="_LocateMSBuildExe" Condition="Exists('$(MSBuildProgramFiles32)')">
|
<!--
|
||||||
<ItemGroup>
|
VisualStudioMSBuildx86Path is set by the GetToolsets target in KoreBuild if a version of VS matching the requirements in korebuild.json is found.
|
||||||
<MSBuild15ExePaths Include="$(MSBuildProgramFiles32)\Microsoft Visual Studio\**\MSBuild\15.0\Bin\MSBuild.exe" />
|
-->
|
||||||
</ItemGroup>
|
<Target Name="RestoreVSIX" DependsOnTargets="GetToolsets">
|
||||||
|
<Exec Command=""$(VisualStudioMSBuildx86Path)" "$(VSIXProject)" /t:Restore /v:m /p:BuildNumber=$(BuildNumber)"
|
||||||
<Warning
|
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
|
||||||
Text="Unable to locate MSBuild 15.0 under $(MSBuildProgramFiles32)\Microsoft Visual Studio"
|
|
||||||
Condition="'@(MSBuild15ExePaths)'==''"/>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'@(MSBuild15ExePaths)'!=''">
|
|
||||||
<MSBuildExePath>%(MSBuild15ExePaths.FullPath)</MSBuildExePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="RestoreVSIX" DependsOnTargets="_LocateMSBuildExe">
|
<Target Name="PackageVSIX" DependsOnTargets="GetToolsets">
|
||||||
<Exec Command=""$(MSBuildExePath)" "$(VSIXProject)" /t:Restore /v:m /p:BuildNumber=$(BuildNumber)" />
|
|
||||||
</Target>
|
<Warning Text="Could not find a version of Visual Studio that has the Visual Studio SDK installed. This is required to build the Razor VSIX. Skipping."
|
||||||
|
Condition="'$(VisualStudioMSBuildx86Path)' == ''" />
|
||||||
|
|
||||||
<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>
|
||||||
|
|
@ -57,7 +51,8 @@
|
||||||
Lines="@(MSBuildArguments)"
|
Lines="@(MSBuildArguments)"
|
||||||
Overwrite="true" />
|
Overwrite="true" />
|
||||||
|
|
||||||
<Exec Command=""$(MSBuildExePath)" @"$(VSIXResponseFilePath)"" />
|
<Exec Command=""$(VisualStudioMSBuildx86Path)" @"$(VSIXResponseFilePath)""
|
||||||
|
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json",
|
||||||
|
"channel": "dev",
|
||||||
|
"toolsets": {
|
||||||
|
"visualstudio": {
|
||||||
|
"required": false,
|
||||||
|
"includePrerelease": true,
|
||||||
|
"minVersion": "15.0.26730.03",
|
||||||
|
"requiredWorkloads": [
|
||||||
|
"Microsoft.VisualStudio.Component.VSSDK"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue