Here's a piece of code that I finally figured out how to accomplish dynamically. Place at the bottom of your .scproj file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Import Project="$(MSBuildExtensionsPath)\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets" /> | |
<ItemGroup> | |
<AssembliesPath Include="..\SomethingAwesome.Web\bin\SomethingAwesome.Web.dll" /> | |
</ItemGroup> | |
<Target Name="BeforeSitecoreBuild"> | |
<GetAssemblyIdentity AssemblyFiles="@(AssembliesPath)"> | |
<Output TaskParameter="Assemblies" ItemName="AssemblyVersion" /> | |
</GetAssemblyIdentity> | |
<CreateProperty Value="%(AssemblyVersion.Version)"> | |
<Output TaskParameter="Value" PropertyName="PackageVersion" /> | |
</CreateProperty> | |
</Target> |
No comments:
Post a Comment