One or more projects could not be mapped to local directory

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
BBM
Posts: 21
Joined: Sat Jul 29, 2006 3:47 pm
Location: Roswell GA

One or more projects could not be mapped to local directory

Post by BBM » Mon Apr 16, 2007 12:39 pm

Hi,

A co-worker of mine made some fairly extensive modifications (deleted and re-added source files) to a couple of projects in a Solution on which we both work.

I have these projects in my local working directory, but because we've had some problems in the past when source files (and projects) have been added and deleted, I moved my working folder to another location on my computer (for safekeeping), and then created a new, identically named, blank folder at the same location as the original working folder.

Then I started VS, and told it to open the solution from Source Control. I specified exactly the same Working Folder as was originally used. I get the error message shown in the attachment below.

What does this message mean?

Our development environments are identical (same directory structure). All externally referenced dll's should be in exactly the same place.

If I hit <Ok> on the error message, the Solution loads, and it has no "unloaded" projects. However, there is a broken reference in one of the projects that was modified. The Solution will not run due to other "missing stuff" errors but I'm not going to worry about those until I understand why I'm getting this message in the first place.

Thanks.

BBM
Attachments
VaultError1.png
VaultError1.png (7.45 KiB) Viewed 8134 times

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Tue Apr 17, 2007 7:29 am

Did you unbind the project before moving it and reopening from source control? I'm thinking that somewhere the old binding information may have confused things.

In VS you could go into File - Source Control - Change Source control and unbind and rebind the project. If something is still confused it would show up then by having an invalid binding. Even though Visual Studio is showing the icons, I have seen it do that a few times when the bindings still weren't quite right, so better to figure that out now rather than later. Let me know the results of an unbind and rebind.

BBM
Posts: 21
Joined: Sat Jul 29, 2006 3:47 pm
Location: Roswell GA

Post by BBM » Tue Apr 17, 2007 11:48 am

Same result.

You're right that I didn't unbind the Solution the last time before I moved it.

This time I unbound the Solution (and all projects) from Source control, then moved the folder to my Desktop, created an identical empty folder, and re-opened from Source Control to the empty folder.

I got exactly the same message, with the same broken reference when the solution was loaded.

BBM

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Tue Apr 17, 2007 1:59 pm

Try creating a new blank solution, and then add each project to it one by one. If everything loads correctly during that, then you can do a compare of the new .sln file to the old .sln file and see what's different that may be getting in the way of everything loading.

BBM
Posts: 21
Joined: Sat Jul 29, 2006 3:47 pm
Location: Roswell GA

Post by BBM » Wed Apr 18, 2007 10:00 am

Ok, I took your suggestion, and I was able to create the blank solution and then add the projects to it one at a time from Vault. No errors.

I solved my broken reference problem. As it turns out we did have a slightly different folder configuration and the reference in question was truly broken and didn't have anything to do with the load error.

So I compared the two solution files. There is in fact a problem with the original one in Vault. I've attached the comparison below. The test solution file is on the right.

As you can see the solution file in Vault thinks that there are 7 projects when in fact there are 5. And the first project is blank.

I think the error was possibly caused by my removing a "WebSite" project from the Solution.

But the real question now is how do I correct this? Is there a way to just replace the corrupt solution file or do I have to go through the process of creating a new local version, unbinding it, renaming the existing Solution folder in Vault, and then re-adding the Solution to Vault?

Thanks.

BBM
Attachments
DiffComp.png
DiffComp.png (67.63 KiB) Viewed 8094 times

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Thu Apr 19, 2007 9:46 am

Now that it's been established that the .sln is not right from the other project, an easy way to take care of this would be to add the new one to source control and use that instead.

BBM
Posts: 21
Joined: Sat Jul 29, 2006 3:47 pm
Location: Roswell GA

Post by BBM » Mon Apr 23, 2007 8:01 am

Ok, I was hoping there was a way to just fix the Solution file in the existing project. If there's not, I'll re-add the one I built.

Thanks for your help.

BBM

Locked