Skip navigation.

Do You Feel Dumb Yet?All recent postsForm Inside of a User Control - Q817779 And Q817779

Visual SourceSafe Daily Aggravation

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.

Comments

Comment permalink 1 Neil |
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
Comment permalink 2 Meen |
Thank you, thank you, thank you very much for this workaround. It saved a lot of time and effort. A million thanks!

Regards,
Meen
Comment permalink 3 ameen |
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
Comment permalink 4 Jim |
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
Comment permalink 5 trusha |
Thank you very much.
Comment permalink 6 Andrew McClure |
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.
Comment permalink 7 Nick McLean |
Mr McClure!

Thanks for your post...

This one was really annoying.

Simply added the csproj.webinfo file to vss and everything starts working. Genius :)
Comment permalink 8 Tom |
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?
Comment permalink 9 Greg |
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!
Comment permalink 10 Tariq Ahmad |
You are the man - nice one!
Comment permalink 11 David |
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]
Comment permalink 12 David |
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).
Comment permalink 13 Web Development |
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.
Comment permalink 14 Marnix |
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.
Comment permalink 15 Linden |
I love you. Thank you.
Comment permalink 16 Yuri Kuleshov |
God bless you!
Comment permalink 17 Dave Conger |
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. :(
Comment permalink 18 parshu |
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. :)
Comment permalink 19 John P. Roberts III |
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!!!
Comment permalink 20 Abhishek |
Thanks.
Comment permalink 21 Chris |
Thanks alot mate, saved me alot of time.
Nice to have an answer to voodoo every now and again.
Comment permalink 22 Faizel |
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 ?
Comment permalink 23 greg |
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
Comment permalink 24 Adam Tuliper |
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
Comment permalink 25 Phan Dung |
Great man! Saved us a lot of time with this stupid problem & somehow Microsoft doesn't do anything about it.
Comment permalink 26 Rob Russell |
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?
Comment permalink 27 Rob Russell |
Aha, oho. Had to reinstall FP Server extensions. Nothing to do with VSS after all. Sheesh.
Comment permalink 28 Tittle |
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.
Comment permalink 29 Tom |
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...
Comment permalink 30 Henrik |
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.
Comment permalink 31 Wei |
Stuck on the simialr problem for two days, lucky enough to find your post and problem is solved by enabling Directory browsing
Comment permalink 32 Coggsa |
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
Comment permalink 33 Holly |
Thank you God.
Comment permalink 34 pavan |
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
Comment permalink 35 vihanga |
Thanks !
Comment permalink 36 Vinod |
Yep .. the 3 steps worked fine ..
Thanks
Comment permalink 37 Ashish Maheshwari |
Thanks A lot buddy
Comment permalink 38 Burhan |
WOW!
Thanks buddy! That really saved a lot of time.
Comment permalink 39 Rajeev Ranjan Lall |
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
Comment permalink 40 Nay Lin |
Thank you very much. All of your comments helped me a lot.
Comment permalink 41 gaurav |
great help,thanks yaar ...:-)
Comment permalink 42 Joe |
Nice! VS 2003 can be a bugger.
Comment permalink 43 Jose |
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
Comment permalink 44 morphy |
Cheers, this saved me a lot of trouble :)
Comment permalink 45 check in problem |
some times my vss takes about 15 to 30 minutes in cheching in single file. Plz help me to solve it.
THANKS.
Comment permalink 46 Kevin |
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

Emails and Notifications

Would you like to be notified when somebody responds to this post?  Would you like to have these comments emailed to you?

Submit your comment

Please enter only text since all HTML tags except hyperlinks will be stripped. Hyperlinks will become live links. Any comments with flaming or offensive language will be deleted. Be courteous to other posters. Thank you.

Your name (required):
Your email (optional):
Your site's URL (optional):
Enter this number
Type in the number above:
Comment (required):