27
Web Deployment Projects and SourceSafe
No comments · Posted by nosey in .NET General, ASP.NET
So today I was just watching an old webcast from Bradley Bartz regarding Web Deployment Projects in Visual Studio 2005. There was not much new in this (well it was a webcast from december 2005, so it figures), but one thing struck me though. Bradley used a self-developed, custom MS Build task for auto-incrementing assembly version numbers – pretty handy thing.
So my thought was/is: why not take this to the next level!?
At my company we use Source(Un)Safe as our VCS. So why not leverage the Microsoft.VisualStudio.SourceSafe.Interop namespace and create a new MSBuild task that automatically gets the SourceSafe configuration (somehow) and automatically labels the current version in SourceSafe with the current build number (it either be automatically generated from Bradley’s MSBuild taks for Web Sites or from the Class Library or whatever other project that has auto-increment functionality natively).
Of course this would require the files to be checked in before build, but this could perhaps also be done automatically using the SourceSafe Interop functionality (if you release it should be under version control anyway) – only you might want to control the checkin, but then it should be done manyally prior to build.
So… I haven’t developed a MSBuild task before, nor have I tried using the Microsoft.VisualStudio.SourceSafe.Interop namespace, but how hard can it be?
VCS is not very complicated as it is so why should this be a problem???
The latter statement was a joke!!!!
Update
It appears that some of the tasks in the SDC Tasks project (now) on Codeplex has most of this functionality. The task Microsoft.Sdc.Tasks.SourceSafe.LabelLatest is able to label the lastest VSS version with a label defined in the project file. So (theoretically) you should be able to write something similar to:
Project=”$/somepath/someproject”
Username=”someuser”
Password=”somePa$$w0rd”
Label=”${AssemblyVersion}”>
Where ${AssemblyVersion} has been initialized similar to using Bradley’s method
ASP.NET · sourcesafe · vcs
