Skip to content

Instantly share code, notes, and snippets.

@michaellwest
Last active December 29, 2015 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaellwest/7665723 to your computer and use it in GitHub Desktop.
Save michaellwest/7665723 to your computer and use it in GitHub Desktop.
Hedgehog Team Development for Sitecore - Package version based on Assembly Version
<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>
@michaellwest
Copy link
Author

The TDS team recommended that I use BeforeSitecoreBuild rather than BeforeBuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment