My Links

Archives

Avoiding WebSite_1 when pulling an ASP.NET Site from SourceSafe (from: Jelle Druyts)

Today was frustration day. I got all cooked up a few times and got mad at

  • my next-door neighbour (for playing loud music at 2:30 AM)
  • some printer (for paperjamming 66% of the time)
  • Visio (for generally sucking; well either that or I'm just too much of an idiot to understand how to properly draw a UML sequence diagram in there)
  • aspnet_wp (for not finding some system dll's in its own runtime cache until I nuke the process)
  • SourceSafe (see Visio; and for the reason below)
  • Visual Studio .NET 2003 (for pestering me with the "Object type cannot be converted to target Type" CopyLocal bug again)

Luckily, I also picked up what could be the trick to avoid an all-too-common SourceSafe mess.

If you're getting a new solution from SourceSafe that includes an ASP.NET Web Site or Web Service you probably encountered this as well: chances are that you don't keep your sources under IIS's wwwroot but under your local SourceSafe working directory and then create VRoots (Virtual Roots) in IIS to the proper directory. If you did that before you opened the solution in Visual Studio .NET for the first time, you're doomed with a feeble attempt of SourceSafe to create the web for you, again. It notices that there's already a web with that name, creates a new one with the same name and a "_1" suffix and then complains that it can't bind to the proper web site. Here's a trick that worked for us:

  • Create the directory but keep it empty (don't get a local copy out of SourceSafe)
  • Create the VRoot to that directory with the proper name
  • Make sure Anonymous Access is enabled on the VRoot
  • Open the solution in Visual Studio .NET, SourceSafe should be getting the files in the right directory now
  • Disable Anonymous Access on the VRoot if required

If you have other or better solutions, don't hold back and share them :-) I've seen a trick via David to avoid some other problems by making SourceSafe treat a web project as a class library, but I think the friction is pretty high on that one.

And I'll still be holding my breath for the source control system included with Visual Studio 2005 Team System of course. That, and the fact that Visual Studio .NET 2005 doesn't need IIS anymore, or creates web sites under wwwroot by default. Shoosh, now be gone SourceSafe.

posted on Monday, January 10, 2005 9:22 PM

sales@tourneylogic.com Copyright © Tourney Logic