I am using the new ASP.Net and Web Tools 2012.2 Publish Profiles for Web Sites (not web application).
I have created a Publish Profile using the tooling which has created the file website.publishproj
in the root of the web site.
The website.publishproj
file contains the following:
<AssemblyAttributes Include="AssemblyFileVersion">
<Value>$(AssemblyFileVersion)</Value>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyVersion">
<Value>$(AssemblyVersion)</Value>
</AssemblyAttributes>
This would suggest that you can pass in the properties to MSBuild to set the version of the output dll.
However, single output assembly for the website (it is compiled and then merged into a single assembly) always has the version number 1.0.0.0
.
I have tried passing in /p:AssemblyFileVersion=2.1.0.0;AssemblyVersion=2.1.0.0
but this has no effect.
I've even tried editing the website.publishproj file directly, but this has no effect either.
Does anyone know how to set the version number of the output assembly on a Web Site Project when you want it merged into a single assembly?
website.publishproj
file in the<AssemblyFileVersion>
and<AssemblyVersion>
elements in a previous<PropertyGroup>
element block. Maybe this is new functionality after this question was asked and answered. Or a bug was fixed. Either way. Hope this helps someone else. – Tove