SvnVersionTasks v2.0

Rating: No reviews yet
Downloads: 533
Released: Nov 20, 2009
Updated: Nov 20, 2009 by nyxtom
Dev status: Stable Help Icon

Recommended Download

Application SvnVersionTasks-v2.x86.msi
application, 3082K, uploaded Nov 20, 2009 - 444 downloads

Other Available Downloads

Application SvnVersionTasks-v2.x64.msi
application, 3640K, uploaded Nov 20, 2009 - 89 downloads

Release Notes

This release provides the ability on top of the normal versioning of assembly info files to build simultaneously with deployment project files.

Easier Versioning of Assemblies and Setup Projects
http://nyxtom.vox.com/library/post/easier-svnversiontasks.html

Simply leverage the DeploymentProjectFiles, DeployFormat, ProductCodes, PackageCodes and UpgradeCodes where needed.

Leverage in your build process

What if you don't want to modify your projects as it interferes with your Visual Studio Environment. This is usually a natural choice. All you need to do is create a new xml file that msbuild can run against and insert the following.

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="build">
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\SvnTools.Targets\SvnTools.Tasks.VersionManagement.Tasks" />
<Target Name="build">
<CreateItem Include="/Properties/AssemblyInfo.cs;/AssemblyInfo.cs">
<Output TaskParameter="Include" ItemName="AssemblyInfoFiles" />
</CreateItem>
<UpdateVersion AssemblyInfoFiles="@(AssemblyInfoFiles)" />
<MSBuild Projects="MySolution.sln" Properties="Configuration=Debug" />
<RevertVersionChange AssemblyInfoFiles="@(AssemblyInfoFiles)" />
</Target>
</Project>

Deployment Project Files and DeployFormat

If you have a vdproj in your solution and wish to update the version number on it, you will need to create a new msbuild.proj file and call msbuild on it while referring to the vdproj file like so:

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="build">
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\SvnTools.Targets\SvnTools.Tasks.VersionManagement.Tasks" />
<Target Name="build">
<UpdateVersion DeploymentProjectFiles="MyProjectSetup.vdproj" DeployFormat="major.rev_m.rev_l" />
<Exec Command="&quot;$(DevEnvDir)\devenv&quot; MyProjectSetup.vdproj /rebuild" />
<RevertVersionChange DeploymentProjectFiles="MyProjectSetup.vdproj" />
</Target>
</Project>

By default this will update the version according to your format specified as well as generating a new ProductCode and PackageCodes. If you want to specify those to not change, simply use the ProductCodes, PackageCodes and UpgradeCodes attributes (set these to a valid set of Guids (separated by semi-colon or through itaskitems)

Reviews for this release

No reviews yet for this release.