Language: XML
Update AssemblyInfo with MSBuild
<PropertyGroup> <SolutionRootDir>$(MSBuildProjectDirectory)\..</SolutionRootDir> <ApplicationName>MyApp</ApplicationName> <Version>0.0.1.0</Version> <Company>Active Solution AB</Company> <Copyright>Copyright © Active Solution AB 2010</Copyright> </PropertyGroup> <PropertyGroup Condition="'$(BUILD_NUMBER)' != ''"> <Version>$(BUILD_NUMBER)</Version> </PropertyGroup> <Target Name="UpdateAssemblyInfo"> <ItemGroup> <AllAssemblyInfos Include="$(SolutionRootDir)\**\AssemblyInfo.cs"/> </ItemGroup> <Attrib Files="@(AllAssemblyInfos)" ReadOnly="false"/> <AssemblyInfo AssemblyTitle="" AssemblyProduct="$(ApplicationName)" AssemblyCompany="$(Company)" AssemblyCopyright="$(Copyright)" ComVisible="false" CLSCompliant="false" CodeLanguage="CS" AssemblyVersion="$(Version)" AssemblyFileVersion="$(Version)" OutputFile="%(AllAssemblyInfos.FullPath)" /> </Target>
Tags:
Report Abuse
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search


If run from TeamCity, the version number is replaced with the TeamCIty build number