razor-tooling/eng/AfterSigning.targets

42 строки
2.0 KiB
XML

<Project>
<Target Name="_EnsureVSIXWasGenerated" AfterTargets="GenerateVisualStudioInsertionManifests" Condition="'$(OS)'=='WINDOWS_NT' AND '$(DotNetBuildSourceOnly)' != 'true'">
<PropertyGroup>
<VSSetupDir>$(ArtifactsDir)VSSetup\</VSSetupDir>
<RazorExtensionVSIXName>Microsoft.VisualStudio.RazorExtension.vsix</RazorExtensionVSIXName>
</PropertyGroup>
<Error
Text="$(RazorExtensionVSIXName) was not generated."
Condition="!Exists('$(VSSetupDir)$(Configuration)\$(RazorExtensionVSIXName)')" />
</Target>
<!--
Write a list of assembly names and versions that the insertion tool uses to update assembly versions in DevDiv.
We want to update these lines in VS's /src/ProductData/AssemblyVersions.tt:
const string RazorRuntimeAssemblyVersion = "7.0.0.0";
const string RazorToolingAssemblyVersion = "7.0.0.0";
Hence we write into VSSetup/DevDivPackages/DependentAssemblyVersions.csv:
RazorRuntimeAssembly,8.0.0.0
RazorToolingAssembly,8.0.0.0
-->
<PropertyGroup>
<_DependentAssemblyVersionsFile>$(VisualStudioBuildPackagesDir)DependentAssemblyVersions.csv</_DependentAssemblyVersionsFile>
<_RazorAssemblyVersion>$(MajorVersion).$(MinorVersion).$(PatchVersion).0</_RazorAssemblyVersion>
</PropertyGroup>
<Target Name="_GenerateDependentAssemblyVersions"
AfterTargets="GenerateVisualStudioInsertionManifests"
Inputs="$(_RazorAssemblyVersion)"
Outputs="$(_DependentAssemblyVersionsFile)"
Condition="'$(OS)'=='WINDOWS_NT' AND '$(DotNetBuildSourceOnly)' != 'true'">
<ItemGroup>
<_AssemblyVersionEntry Include="RazorRuntimeAssembly" />
<_AssemblyVersionEntry Include="RazorToolingAssembly" />
</ItemGroup>
<MakeDir Directories="$(VisualStudioBuildPackagesDir)"/>
<WriteLinesToFile Lines="@(_AssemblyVersionEntry->'%(Identity),$(_RazorAssemblyVersion)')" File="$(_DependentAssemblyVersionsFile)" Overwrite="true"/>
<ItemGroup>
<FileWrites Include="$(_DependentAssemblyVersionsFile)"/>
</ItemGroup>
</Target>
</Project>