I try to usually not aggregate things handled by big-name bloggers (e.g., Rob Caron and Mickey Goussett). This specific post looked like something that might slip through the cracks since the development crowd frequenting those blogs are not necessarily the intended audience. It is always good when we, the users, can provide Microsoft with feedback about how we use their products. If you use or have other team members that use TFS and Microsoft Project, please head to the Teams WIT Tools blog and let them know what you think. The survey is pretty short (4 pages or so) so spend a moment and let the product developers know how they should improve their product!
Survey Link: http://www.developersurvey.com/Surveys/TakeSurvey.aspx?surveyid=1137
I've seen many samples and had to personally manipulate the version information in AssemblyInfo during the build process on several occasions. However, I received a red-alert from a co-worker who want to check to make sure the default assembly info (18.104.22.168) was not being used. For his client, this situation was supposed to break the build.
I started with what I believe were the correct answers. That is - if it is a policy, catch it during the check in process using a custom check-in policy. Or at least create a custom build task to gracefully perform the checks during the build.
Unfortunately, time and customer needs didn't allow either. So I offered the cheap way out. This isn't as powerful or robust as either of the aforementioned solutions, but it should work based on our time constraints. I don't recommend that you make use of this as is, but perhaps you'll glance at it and find a different use for these built-in MSBuild tasks in some other build exercise that you run across...
<?xml version="1.0" encoding="utf-8"?>
<!-- Standard item creation - in my case to find all assembly info files -->
<!-- Next, read all lines from all files into items -->
<!-- Finally, force an error if any of the lines exactly matches a predefined value --> <Error
Text="Default assembly version (CS) detected in the build"
Condition="'%(ItemsFromFile.Identity)'=='[assembly: AssemblyVersion("22.214.171.124")]' " />
Text="Default assembly version (VB) detected in the build"
Condition="'%(ItemsFromFile.Identity)'=='<Assembly: AssemblyVersion("126.96.36.199")>' " />
In case you're not aware - here is the general announcement. With a little luck, I'll be there and not on a plane. Hope to 'see' you there too!
Join members of the Visual Studio Team System product group to discuss features available in Visual Studio Team Foundation Server, Team Editions for Architects, Developers, Database Pros, and Testers. In addition, discuss what's new in the latest Community Technology Preview (CTP).
Join the chat on Wednesday, February 7th, 2007 from 10:00am - 11:00am Pacific Time.
Add to Calendar
Additional Time Zones