SourceSafe + Web Projects = Oil + Water
August 25, 2006 Leave a comment
Okay, I know I am bitching right now, but the dumbing down of development has reached a point where so many of the tools we have relied on in the past (yes, I am talking about SourceSafe … favorably, for a change) do not work correctly. As we dumb things down, the scenarios that are tested get reduced to the dumbed down set to the exclusion of the more professional set of functions.
Now that I have some of you asking "was that English?", let me explain. While SourceSafe is an inferior source control system (compared to more Enterprise strength products), it is a reality for many of us. And, although we complain from time to time, it works. In Visual Studio 2003, with SourceSafe 6.0d, the largest headache was setting up the project on machines (get source, make a web project, etc.). This portion has been greatly simplified in Visual Studio 2005 as you can now leave the website as a file based web.
Now for the pain. As long as you keep everything in the App_Code folder and rely on NO external assemblies (ie, you code wrong for the Enterprise), you are fine. If you include other files, you are screwed. Want to test this. Follow these steps:
- Create a library (or use one you already have). If you are creating, just add a simple class that returns Hello World when you call a method. This is your external library.
- Check librar into sourcesafe
- Create a new website (file-based or IIS)
- Add reference to the library
- Check into sourcesafe
- Go to another machine (or a virtual instance).
- Get code from sourcesafe on this machine
- Compile. Woo Hoo! So far so good.
- Change the class library by adding additional methods
- Check in
- Use these additional methods in your web library
- Go to other machine and get latest
- Run project! BOOM!
To fix this issue, you have to re-reference the DLLs in the machine where things are blowing up by using Add Reference. And, you have to do this on EVERY machine that you are using it.
This is an issue with the project-less model of ASP.NET 2.0 and does not affect people who compile all of their tiers into their web apps. For those of us who have tiered apps (mandatory in Enterprise systems), the dumbing down of the web has its downside.