Cannot Build solution because of error="The Local Path C:\xyz\pqr...... is not associtated with a TFS Workspace
-
Saturday, February 05, 2011 10:49 AM
Hi,
I have built an c-sharp .exe application. I used TFS for my solution/project. Now I want to take my source code to another machine and run through it in debug mode. So that I can figure what is causing a bug. On this new computer, I do no want to use TFS. This solution has the project which contains my source code and several other projects it references.
I zipped my solution and unzipped it in the new location. I try to rebuild, it gives the following error due one of the project which is used as a reference in the solution..
The Local Path C:\xyz\pqr...... is not associtated with a TFS Workspace. The error shows me the description, the File Name, the line, Column and the Project. The File itself is of type .csproj.
So the complile fails.
In my solution/project under File I do not see any Source Control menu option. So I am unable to delete any source control bindings.
There must be a way where one can take the code from its original location of development and run it in a new location, in debug mode, without being forced to worry about TFS/use it.. But I do not know how.
Help appreciated
diana4- Moved by Victor_Chen Monday, February 07, 2011 7:23 AM TFS version control (From:MSBuild)
All Replies
-
Saturday, February 05, 2011 5:03 AM
Hi
When I try to compile my project/solution i get the following error =The Local Path C:\xyz\pqr...... is not associtated with a TFS Workspace"
So the complile fails.
This solution was on another computer, linked to TFS. It compiles fine on that computer. I copied over the entire solution & Reference projects within it to a new computer and I want it to compile on a new computer and i do not care about using TFS on this machine. I have fixed all error due to moving this solution, except this last one (it seems, anyway).
Somebody on MSDN forum suggested i go to File, Source Control and remove all source control bindings.
But, In my solution/project under File I do not see any Source Control menu option
Also, When I get the error during Rebuild All, it shows me the description, the File Name, the line, Column and the Project. The File itself is of type .csproj.
Help appreciated... Thanks
- Merged by Cathy KongMicrosoft Contingent Staff, Moderator Tuesday, February 08, 2011 3:10 AM repeat
-
Monday, February 07, 2011 7:23 AM
Thanks for your post.
I think it is more relevant to TFS version control, I'm going to move it,
our engineer will help provide more information there.
Best Regards,
Ziwei Chen
Ziwei Chen [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

-
Monday, February 07, 2011 5:59 PM
Diana4,
what version and edition of Visual Studio are you using? What source control providers are available in Tools->Options->Source Control?
Michal Malecki TFS Version Control -
Tuesday, February 08, 2011 5:32 AM
Hi, I am using Visual Studio Team system 2008. Version 9.0.21022.8 RTM.
.NET Framework 3.5SP1
For Original Location where code is developed, Tools->Options->Source Control shows Visual Studio Team Foundation server
For location where I am trying to run code in debug mode Tools->Options->Source Control shows none
Thanks
diana4 -
Tuesday, February 08, 2011 7:26 AM
Hello,
in VS 2010 you wouldn't have this problem since it always ship with tfs, in VS 2008 you have 2 possible solutions. Unfortunately Visual Studio itself does not provide command to strip version control bindings.
Solution 1
on the original machine go to File->Source Control->Change Source Control
select each project and unbind it
Close dialog, save
Now it's not source controlled - you can zip it and use on other machines
Go back to File->Source Control->Change Source Control
Select each project and bind it
Verify each changes that were pended makes sense. You can provide undo all of them anyway
Solution2
On the target machine:
Make backup of the solution
Open sln file in the notepad, remove teamfoundation section
open each csproj file, remove 4 scc attribute near the top of the page
Good luck!
Michal Malecki TFS Version Control -
Wednesday, February 09, 2011 6:17 AM
Thank you Michal. Before I got your answer, i started afresh on the computer where I want debug, unzipped a new solutions folder. First time, i tried to open the .sln file, a dialog asked me if I wanted to remove permanenty my source control bindings. I chose yes.
1) So the question is do I still need to use one of the methods given by you. or what I did above is sufficient.
2). I no longer get any source control related errors when I try to compile on the new computer. In fact I do not get any errors, either in the out put window or the errors window, but i still get Rebuild All failed message.
When i try to start debugging (Menu Build --> Start Debugging), it says "There were build errors. Would you like to continue and Run last successful build?". When I say yes, I find that exe which starts running is really using the latest source code changes I made (on this debug machine). But exe still does not seem to work quite right..
Is there any reason for this strange behavior.
Thanks
diana4 -
Wednesday, February 09, 2011 11:08 AM
I believe you don't need to do anything - Visual Studio should strip all source control related information after that message. It's interesting why you didn't get that message before.
Can you clean the solution (context menu in Solution Explorer) and rebuild again? Can you explain what you mean by " does not seem to work quite right" :)
Michal
Michal Malecki TFS Version Control -
Thursday, February 10, 2011 6:54 AMcleaned. And then did rebuild solution. It still says rebuild all failed, while showing no errors in Error Window or output Window. It does say
========== Rebuild All: 11 succeeded, 2 failed, 0 skipped ==========
in the output window, But does not say what the 2 failed are in the text abovee.
This exe starts running, when I do "start debugging", but it does not talk to a Service which it is supposed to. That is what I mean by does not seem to work quite right..
diana4 -
Friday, February 11, 2011 8:35 AMJust a wild guess - can you mark all files as Read-Write? Files are Read-Only under TFS and they are not marked as RW when you remove bindings.
Michal Malecki TFS Version Control -
Sunday, February 13, 2011 3:52 AM
I marked all the files in the Debug folder as Read & Write. That does not seem to make any difference
diana4

