Removing soltuion items from TFS2010 and "action caused a check out of the file(s)..." message - visual-studio-2010

My solution structure looks something like this:
MySolution
FirstProject
SecondProject
SolutionFolder1
SolutionFolder2
SolutionItem1.txt
SolutionItem2.txt
Then there are two workspaces with
this solution at the same version
used by two users on different
computers.
A solution item is removed in the first workspace and the change is checked in into TFS.
In the second workspace the latest version is get from the TFS (the workspace is without local modifications and no files are checked out). Visual Studio displays this message:
Your action caused a check out of the
file(s) C:\MySolution \MySolution.sln,
and a new version from source control
has been loaded in the development
environment.
Now, there are two items in pending changes in the second workspace: solution file is checked out and the solution item is deleted. After undoing these changes and getting latest version, they appear again. These conflicts are resolved only during checkin which is a little bit confusing.
Is there a way how to get rid of this TFS oddity? Thanks.

I cannot find any answer but there is a workaround. Solution probably is not the best place to store complex folder hierarchies with a lot of files. When these folders and files are moved to own VS project then everything works well.

Related

TFS Specific Changeset files to be merged with latest version

I am in the following situation:
A Team Member worked on a task which was partially done in few changesets, few months back. These changesets were reverted and many more changes are done on same files in subsequent changesets.
I want to get the latest version of code (which I have taken) and have some option to get the older changesets (even I can merge changesets one by one) and merge it.
Though I find option to changeset GetThisVersion which gives me whole old codebase. I don't find relevant option in Visual Studio 2010. It would be great to have GUI option and not command line one.
Please help. Thanks in advance.
You can get specific version of a file from file history (view or get specific version) or with command line Need command to get a file from TFS without a workspace. But to get a folder (project, solution) state seems to be necessary to have a workspace How to get specific version of folder from tfs without creating a workspace?. I don't think that there is a possibility to merge an old and newer version. When I want to resuscitate some old code I use view in history and copy/paste.

Getting latest version in TFS is not working properly

I'm using TFS for synchronizing my works with my partner on out project. But I have many problems with this. When my partner added some new files to the project and I want to have this files is my local version.
At first I tried to get it by right-click on project in solution explorer and selecting "Get Latest Version". But this method did not get the new files.
Then I went to Source Control and selected all the files and folders in project and pressed "Get Latest Version". The new files downloaded, but it seems that files are not a part of the project. They are just downloaded, but the don't appear in solution explorer near other file.
What is the problem here? Thanks.
Is your solution and project files bound to Source control in TFS? That is one of the things I can come up with with your description.
Those files may be added after mapping is done I think. Also, as #James Reed suggested, those files may not be checked-in.
If those are not the cases, I recommend a "Remove Mapping" and "Mapping" again.
Hope this helps.

Visual Studio retrieving an incorrect path to a project from somewhere

Visual Studio (and possibly TFS) has somehow (I think perhaps during a source control merge) become confused about the path of a project within my solution.
It thinks it is here (example paths for simplicity):
C:\My Projects\ExampleSolution\ExampleProjectWrong\ExampleProjectCorrect.csproj
whereas actually, the project file is located here:
C:\My Projects\ExampleSolution\ExampleProjectCorrect\ExampleProjectCorrect.csproj
I cannot for the life of me get it to recognize the correct location. I have tried:
Removing and re-adding the project from the correct location. An error message comes up saying The project file at C:\My Projects\ExampleSolution\ExampleProjectWrong\ExampleProjectCorrect.csproj could not be found.
Manually editing the .sln file to ensure all references to ExampleProjectCorrect.csproj have the correct paths.
Doing a find in files on the solution directory for both the correct and incorrect paths, to try and track down where studio is hiding the incorrect path.
Deleting the cache directories for VS and TFS
I'm tearing my hair out because I can't recreate the solution as it has near as makes no difference 100 projects in and is tied in to source control with several other developers working on it.
Can anyone point me in the right direction as to where it is storing this incorrect path and/or how to reset it so the damn thing will load correctly?
Go to Manage Workspaces (either through the File/Source Control menu or the workspace drop down in Source Control Explorer)
select edit for your workspace.
You should see, under working folders, a mapping for the source
control directory to the old/wrong project directory.
Select it and click remove.
Close VS and delete the suo file.
It still references the wrong directory. Maybe rebinding might work at this point but I didn't try that. Reload your project and you should be good to go.
Simply deleting the solutions .suo file worked for me.
I was facing this issue after performing a migration from Visual Source Safe 2005 to TFS 2012. I couldn't wait for the "Conversion Wizard" due out in the next couple weeks so I just ran VSSConvert.exe. This took 6 or so years of history and moved it into TFS.. while I didn't get the actual timeline history.. I got a bunch of entries on the same day with the comments indicating the actual check-ins of the history.. not bad.
So after it ran all night (Successfully, yay!), I was having trouble loading my projects just as this question stated. For some reason, a few projects were being referenced to an incorrect directory. I checked the .sln, the .vsproj files, and getting latest, deleting re-getting, adding removing, etc.. I tried everything noted here... even upgrading my workspace, which I'm not sure what that even did.
FINALLY... I deleted the *.suo files and viola. It worked.
I spent a couple hours on this one.
A slightly different solution.
TFS was displaying a non-existing path for a particular Solution. Previously, I had a laptop with a separate D: drive, but now, I just have a C: drive. TFS still thought my project was stored on D:\Project\MikesProject
I didn't have a .suo file to delete, the D: path wasn't mentioned anywhere in my Workspaces (buried away under the File\Source Control\Advanced\Workspaces menu), TFS showed that I did have the latest files in my (no-longer-existant) D: directory, and TFS in VS2013 didn't have a "Remove Mappings" option for this project.
But what did work was to simply do a "Get latest version" on the project.
After doing so, a fresh copy of the code was written to my C: drive, and (interestingly), now the Local Path was shown underlined.
Previously, the D: path wasn't shown like this.
Odd. Very odd.
We've had similar issues with moves and renames.
Deleting the local directories and then getting again solved it.
Even after deleting the .suo file and .vs folders, I had to edit the .sln file and remove the old relative url from SccProjectName# despite the SccLocalPath# being correct. Apparently VS also uses the name as a hint path.
Try to delete or rename .suo file (including extension). This file is at the same location where your solution file is. It worked for me.
Just guessing, but perhaps some of your other projects references your project from the wrong location? In this case, you have not just to delete and re-insert the project into your solution, you will also have to delete and recreate the references from the referencing projects (stored in their .csproj files).
After trying many recommendations I deleted the suo file ( again ). The last time worked. Why it did not work earlier I do not know. In general I find deleting the suo file one of the first steps I do.
I had my asp.net website solution opened from my Dev Branch.
Then for some other purpose I opened same solution from Main branch.
I made a change to one of my .ascx.cs file in the dev branch and set breakpoint. When I ran the debugger, all my break points were hit in the Dev Branch except for the .ascx.cs which was hitting the Main branch. Have not idea.
Tried cleaning the Temporary folder but didn't work.
What worked:
Closed all instances of Visual Studio
Opened the solution from Dev branch again.
Run again and the break points started hitting.
In my case i copied the *.sln file into the project folder and changed the path to project into the *.sln file. Only this resolved the problem (vs 2015 sp1, winservise project).
Delete *.suo does not helps for me.
Yet another solution worked for us - after trying the delete of suo and almost everything mentioned in this thread. We had a project in the solution which was showing a ghost version of the csproj file. We deleted that file and our paths fixed on another project we were trying to add.
Deleting obj and bin files would solve the problem...
I know it is an old line. I just went through the same problem. We recently migrate the TFS, so I created a new workspace to map to new server and kept the old one. Every time when I open a solution which is supposed to target to my new workspace, VS always tried to load projects from my old mapping directory, till I removed my old workspace.

VSeWSS phantom feature can't be deleted

After doing a subversion merge with a co-worker, my VSeWSS project no longer build correctly. It creates two features for a single webpart feature (before the merge, this didn't happen). If the name of the feature is "MyFeature', VSeWSS always creates a second folder called 'MyFeature_2' and adds it to the solution manifest.
I've tried deleting everything I know to delete: pkg/MyFeature_2, the entry from pkg/manifest.xml, and the incorrect feature id in pkg/solution.xml (which gets generated every time I build the wsp). I've deleted bin/Debug/solution. After that, I have no idea where VSeWSS is getting information telling it to add a second feature.
I've also tried completely removing that feature and re-adding it from scratch, but the same behavior persists. In the WSP view, the 'delete feature' button is enabled for the "true" feature, but disabled for the generated one. however, if I try to delete the true one, it fails and reports a permission error on pkg/MyFeature/.svn/all-wcprops.
Grr.
By default the /pkg directory isn't part of your Visual Studio project. So it doesn't get added to source control. You need to add this as it contains the GUID's for features and if you don't have it you'll find VSeWSS will silently create new GUID's and populate /pkg for you.
Regards,
Paul
It turns out that during the SVN merge, the pkg/MyFeature/feature.xml file got jacked up. A FeatureID was no longer specified, so every time it tried to rebuild, VSeWSS generated a FeatureID for it, which caused it to try and build out the entire feature again, but the folder that existed in the filesystem was in conflict with it. Once I restored the feature.xml for MyFeature, this problem was resolved. Now my problem is that I can't seem to get the package built - there may be a problem retracting the old solution, but that's something different.

SVN: Colleague checked in a folder into repository, but I can't Update my version to it

In showing a colleague how to use SVN yesterday, we created a test folder and file within our existing Visual Studio Solution. We'll call it "Test" folder with two files, "Test.ascx" and "Test.ascx.cs". We added it (or Visual SVN added it, 'cos it's awesome), and committed it. We also added and committed other files elsewhere in the project.
We can see it in the repository (and the other files).
Doing an update on my own machine to pull down these new files resulted in the other files being pulled down correctly, BUT the Test folder does not appear. No matter how many times I try Updating from various points in VS and in TortoiseSVN (urgh) Repo browser, it can't see that there are any changes to pull down.
Where am I going wrong?
This is a known problem.
You can use
$ svn update --depth=infinity
to force the update. With TortoiseSVN, use the "Update to revision" command in the Submenu, then change the depth combobox to "fully recursive".
I've had ghost errors like this before and found the easiest work around is to delete the parent folder and update it's parent:
Project Root
Project
NewFolder
Delete Project, then Update Project Root
We can see it in the repository (and the other files).
...
No matter how many times I try Updating from various points in VS and in TortoiseSVN (urgh) Repo browser, it can't see that there are any changes to pull down.
So you can or cannot see it in the repository browser?
Did you commit and update the parent folder of your Test folder?
I don't know, svn is always telling me to clean, did you try that?
It's not an answer, I know, but I have tried all the solutions you guys have kindly suggested and I just end up with conflicts, crashed TortoiseSVN and built up Karma. Therefore, a trusty edit in the .svn/entries file sorted it.
I have until now been a single developer using SVN just to manage my source code. Other people don't have problems, and I just check in stuff. I use Visual SVN as a layer to frig SVN for .NET (which it isn't great with) and I seem to constantly run into issues. I am performing very simple operations, not even branching/tagging. Simple simple simple. And yet I have issues with it?

Resources