81 lines
3.1 KiB
XML
81 lines
3.1 KiB
XML
<Project>
|
|
<PropertyGroup>
|
|
<BuildVSIX Condition="'$(BuildVSIX)' ==''">true</BuildVSIX>
|
|
<RestoreDependsOn Condition="'$(OS)'=='Windows_NT' AND '$(BuildVSIX)' == 'true'">$(RestoreDependsOn);RestoreVSIX</RestoreDependsOn>
|
|
<PackageDependsOn Condition="'$(OS)'=='Windows_NT' AND '$(BuildVSIX)' == 'true'">$(PackageDependsOn);PackageVSIX</PackageDependsOn>
|
|
<VSIXProject>$(RepositoryRoot)blazor\tooling\Microsoft.VisualStudio.BlazorExtension\Microsoft.VisualStudio.BlazorExtension.csproj</VSIXProject>
|
|
</PropertyGroup>
|
|
|
|
<Target
|
|
Name="GenerateVSIX"
|
|
DependsOnTargets="RestoreVSIX;PackageVSIX"
|
|
Condition="'$(OS)'=='Windows_NT'" />
|
|
|
|
<!--
|
|
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">
|
|
|
|
<PropertyGroup>
|
|
<VSIXResponseFilePath>$(LogOutputDir)vsix-restore.rsp</VSIXResponseFilePath>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<MSBuildArguments Remove="@(MSBuildArguments)" />
|
|
<MSBuildArguments Include="
|
|
"$(VSIXProject);"
|
|
/t:Restore;
|
|
/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="$(LogOutputDir)" />
|
|
|
|
<WriteLinesToFile
|
|
File="$(VSIXResponseFilePath)"
|
|
Lines="@(MSBuildArguments)"
|
|
Overwrite="true" />
|
|
|
|
<Exec Command=""$(VisualStudioMSBuildx86Path)" @"$(VSIXResponseFilePath)""
|
|
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
|
|
</Target>
|
|
|
|
<Target Name="PackageVSIX" DependsOnTargets="GetToolsets">
|
|
|
|
<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)' == ''" />
|
|
|
|
<PropertyGroup>
|
|
<VSIXLogFilePath>$(LogOutputDir)vsix.log</VSIXLogFilePath>
|
|
<VSIXResponseFilePath>$(LogOutputDir)vsix-build.rsp</VSIXResponseFilePath>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<MSBuildArguments Remove="@(MSBuildArguments)" />
|
|
<MSBuildArguments Include="
|
|
"$(VSIXProject)";
|
|
/v:M;
|
|
/fl;
|
|
"/flp:LogFile=$(VSIXLogFilePath)";
|
|
/p:BuildProjectReferences=false;
|
|
/p:DeployExtension=false;
|
|
"/p:SymbolsPublishDir=$(BuildDir)";
|
|
"/p:Configuration=$(Configuration)";" />
|
|
</ItemGroup>
|
|
|
|
<MakeDir Directories="$(LogOutputDir)" />
|
|
|
|
<WriteLinesToFile
|
|
File="$(VSIXResponseFilePath)"
|
|
Lines="@(MSBuildArguments)"
|
|
Overwrite="true" />
|
|
|
|
<Exec Command=""$(VisualStudioMSBuildx86Path)" @"$(VSIXResponseFilePath)""
|
|
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
|
|
</Target>
|
|
|
|
</Project>
|