Visual SourceSafe Daily Aggravation

Posted on April 20, 2004  |  

Posted in Development

47 comments

To this day Visual SourceSafe looks like an old shabby patch on the latest Visual Studio.NET. I should hand it to Microsoft folks—they managed to make its “integration” in VS.NET look nice. In the days of ASP SourceSafe was your every day companion and worst enemy at the same time. You can’t live with it, can’t live without it.

While I was merely adding a file to my web project today I somehow got the project file itself corrupted. Effortless, really. Normally VS.NET prompts you to check out the project and happily adds the file. This time around I was greeted with the following error each time I tried to reopen the project:

The project you are trying to open is a Web Project. You need to open it by specifying its URL path.

Knowing what a nightmare SourceSafe problems are, I set out to find a fix. Here’s how I went about it:

  1. Went to the IIS MMC snap-in and enabled Directory browsing.
  2. Launched VS.NET and went to File | Open | Project from the web…
  3. Typed in the project URL, and once the Open Project dialog popped up selected the .csproj file. Now pay attention: not the .sln file!

At this point the web project in question loaded just fine. I closed it and reloaded the entire solution. Lo and behold, now it liked it! Beats me why but it worked.

47 comments

Neil
on June 30, 2004

Thankyou, thankyou!

Despite doing a "repair" install on VS and rebuilding all web projects from sourcesafe etc etc nothing worked ---
Until I found your post.

Regards,
Neil


Meen
on August 3, 2004

Thank you, thank you, thank you very much for this workaround. It saved a lot of time and effort. A million thanks!

Regards,
Meen


ameen
on August 22, 2004

Thank you Very Much.

I found your solution sounds the best for a Problem which suppress me since long time.

Now I get rid of it. Thank you very much.

Good Luch ASP.NET Resources


Jim
on September 16, 2004

I know of another workarounds for this problem (the root cause may not always be the same) that do not require modifying the virtual directory in IIS.

1. Manually edit the "myproject.csproj.webinfo" file to make sure it has the correct Web URLPath to the project file. If you don't have a *.webinfo file, copy one from another project and rename/edit the file to suit the project.

I have had solutions/projects that were fixed this way, but I really don't know what caused the problems to appear.

Regards,

Jim


trusha
on September 17, 2004

Thank you very much.


Andrew McClure
on October 7, 2004

I also came up against this problem. after setting up a web project on a development system (the virtual directory was added using iis) and getting latest on the project from vss, i got the error we are discussing on opening the project.

I diagnosed the problem by looking at the differences between the two project folders on the the original system and the system in question. one difference was the --.csproj.webinfo file was missing. I fixed the problem by putting the webinfo file in place and adding the file to the vss project. I noticed that the --.csproj.webinfo file for the project was not in the source safe database and this is what caused the problem in this case.

One of my colleagues tells me that this is a known problem with vss and that MS is replacing vss in .net 2005.


Nick McLean
on October 13, 2004

Mr McClure!

Thanks for your post...

This one was really annoying.

Simply added the csproj.webinfo file to vss and everything starts working. Genius :)


Tom
on October 25, 2004

I'm in the same daily aggravation, but the tips here haven't quite given the escape. I'd like to have my code files in a tree separate from the web tree. If it just isn't possible, I can give up on that, I guess... Jim's solution to manually edit the .webinfo file seemed to make sense (I thought of editing the .csproj, too), but it assumes that the code file HAS a URL path... which it shouldn't need to, right?

Am I barking up the wrong tree?


Greg
on December 22, 2004

The "missing webinfo" problem actually has nothing to do with SourceSafe and everything to do with the SCC provider for Visual Studio .NET.

I am using SourceGear and I had exactly the same problem. It seems that when you "Add Solution to Source Control" the very first time, way back when you create your project, it FAILS to check in the webinfo file in to source control.

Therefore anytime you pull the files down into a new webroot, you are hosed until you search around and find help like I did - THANKS!


Tariq Ahmad
on January 25, 2005

You are the man - nice one!


David
on February 3, 2005

Yes, it's the missing webinfo file and here is a sample for those who need one:

[VisualStudioUNCWeb]
[Web URLPath = "http://localhost/Sample.csproj" ]
[VisualStudioUNCWeb]


David
on February 3, 2005

Oops, the site admin needs to add an HTMLencode to the "Comment" box (my last post does actually include the code/file snipit but you can only see it in the page "view source" ...funny).


Web Development
on March 1, 2005

I confrunted the same problem in the past, the problem was caused by a missing of *.webinfo file in the root of the application. When you open a web project the vs.net is looking for the webinfo file first where it can get the virtual path of the csproj/vbproj file. When you change the application's virtual directory you need to update this file with the new virtual path.

Happy programming.


Marnix
on March 17, 2005

I just figured out something else that can go wrong. Even after configuring the virtual directory in IIS and doing the .webinfo thing, VS.NET 2003 refused to open my project. It even refused to show the contents of the webshare that holds my project. It turns out that the 'VS Developers' group must have access to the folder.
After adding my login to the group and fixing the security settings on the folder I was finally able to open the project.


Linden
on March 18, 2005

I love you. Thank you.


Yuri Kuleshov
on March 25, 2005

God bless you!


Dave Conger
on March 31, 2005

A similar aggrevation I'm looking for a fix to is that if you do check the *.csproj.webinfo files into StarTeam, they will show up as "modified" every time you build the project. Apparently, VisualStudio regenerates or touches the .webinfo files. As a result, when I'm ready to check in changes to my code, I have to filter out all the damn .webinfo files that have a modified timestamp.

I was hoping I could get away with removing the files from StarTeam, but this blog makes it pretty clear I can't. :(


parshu
on April 10, 2005

wooohoooo Jim's solution worked like a charm, Thanks, you saved me lot of headache. And yeah, i was having problem with Vault not with VSS. :)


John P. Roberts III
on April 20, 2005

M. : Just wanted to say thanks! I recently moved to a new machine and couldn't get any of my projects opened on it. Following your simple three steps above, I was able to. Thanks again!!!


Abhishek
on April 26, 2005

Thanks.


Chris
on May 16, 2005

Thanks alot mate, saved me alot of time.
Nice to have an answer to voodoo every now and again.


Faizel
on May 24, 2005

I have issues with VStudio:
When i open a web project from Source Control VStudio attempts to set the project location (the url) every time. The problem is that the location already exists (eg. http://localhost/myproject/) and VStudio will not accept it. How to get around this ?

Also i find that VStudio renames my web projects in SourceSafe by incrementally adding a number at the end. This is a real inconvenience because i have to search to find where my most recent build is.

Anyone know how to solve these issues ?


greg
on May 26, 2005

How can i edit the contents of .csproj file
I tried doing it with wordpad etc
but it was then changing my file type
plz giv me solution


Adam Tuliper
on June 17, 2005

In my case, the system blue screened. Two projects that were open had their project.csproj.webinfo files filled with nulls.
Replace it with the following (fill in your proper path of course)
< VisualStudioUNCWeb >
< Web URLPath = "http://localhost/whatever/whatever.csproj" />
< /VisualStudioUNCWeb >

Adam


Phan Dung
on June 23, 2005

Great man! Saved us a lot of time with this stupid problem & somehow Microsoft doesn't do anything about it.


Rob Russell
on June 27, 2005

At 1st I thought this was just what I needed, but now when I try to "open from web..." and browse to the folder, I get the equally aggravating "Documents in this folder are not available. The folder may have been moved or deleted, or network problems may be preventing a connection to the server."

Only problem is that the server is localhost, and the folder is RIGHT FREAKIN' THERE!

Anyone seen this one?


Rob Russell
on June 28, 2005

Aha, oho. Had to reinstall FP Server extensions. Nothing to do with VSS after all. Sheesh.


Tittle
on August 5, 2005

Hi,

I searched on google, typing entire error, and yours was top on list, and now I must say you thanks as I was able to solve it in the very first attempt.

Really thanks for posting it.


Tom
on August 23, 2005

I love how the when you click on the help button on the dialog in question, the help topic can't be located... nice work...


Henrik
on August 24, 2005

I tried everything here and got my solution to work (in visual studio.net), but I still had errors. My solution to the problem - which some of you may find useful was to:
1. Get the solution from source safe,
2. Delete all the Project files you just got from source safe except the *.sln / *.suo / *.vssscc / *.scc files of the Solution (You must not delete any of the files related to the solution - only the project within the solution).
3. Double click the solution file (*.sln) in explorer and viual studio will open it up with all the files you just deleted included.
Hope this makes sense.


Wei
on November 29, 2005

Stuck on the simialr problem for two days, lucky enough to find your post and problem is solved by enabling Directory browsing


Coggsa
on March 1, 2006

Finally. 3 nerds and none of us could fix it! After a VS Re-Install, Blaming, ASP2.0, Blaming our Source, Blaming Windows, Blaming each other, its was a sinch to fix! Once i found this post that is!

Thanx


Holly
on March 28, 2006

Thank you God.


pavan
on May 15, 2006

I am using VSS for the first time. I would like to know how do we work with asp.net files in VSS pls provide me some overview


vihanga
on June 19, 2006

Thanks !


Vinod
on June 19, 2006

Yep .. the 3 steps worked fine ..
Thanks


Ashish Maheshwari
on August 9, 2006

Thanks A lot buddy


Burhan
on October 9, 2006

WOW!
Thanks buddy! That really saved a lot of time.


Rajeev Ranjan Lall
on October 24, 2006

Hi All,

I am facing a problem with VSS using with Visual Studio 2005. I have set the working folder for my project in VSS as D:\PRJ_FOLDER. Now, whenever I open the solution of the porject, it creates another subfolder with the same name i.e. D:\PRJ_FOLDER\PRJ_FOLDER. This happens with me using both Visual Studio .Net and Visual Studio 2005. Please guide where I am doing the mistake.

Thanks in advance.
Rajeev Ranjan Lall


Nay Lin
on November 30, 2006

Thank you very much. All of your comments helped me a lot.


gaurav
on January 4, 2007

great help,thanks yaar ...:-)


Joe
on April 24, 2007

Nice! VS 2003 can be a bugger.


Jose
on October 10, 2007

Just in case it helps anyone out there. In my case, the solutions above did not work. I kept trying different things from this site and others and none seemed to take care of the problem.

What I ended up doing is to create a new blank solution and just re-add all the projects to it and bingo - it worked. My solution file, for some reason had something that the new environment did not like (at least that's my guess)

Cheers!

Jose Lopez Portillo


morphy
on November 26, 2007

Cheers, this saved me a lot of trouble :)


check in problem
on April 25, 2008

some times my vss takes about 15 to 30 minutes in cheching in single file. Plz help me to solve it.
THANKS.


Kevin
on October 15, 2008

If checkin takes too long time, please check if the network connection is fast or not. If you work from a remote computer, it is a common known issue of SourceSafe. You need kind of remote access add-on tool for SourceSafe.

I am writing a SourceSafe tutorial at:
http://www.kevingao.net/sourcesafe-vss-how-to

Thanks,

Kevin, MCSD MCDBA


ram
on June 23, 2009

Thank you, thank you, thank you very much for this workaround. It saved a lot of time and effort. A million thanks!

Regards,
ram


Leave a comment

  •