We have a 2008 solution that has a file system website as part of the solution. This solution is under source control with Team Foundation Server. Every time the solution is closed it either checks out a file called vwd.webinfo or attempts to and complains that someone else already has it checked out.
Removing the file from source control does not fix the issue because it gets re-added automatically for some reason.
Why does this happen and is there something we can do about it to remove this nag?
Thanks a lot!
open "source control explorer"
find vwd.webinfo in the correct path
click "delete"
chek-in the operation to solve this problem
The file will still be in your file system and solution, but not under source-control. You won't see "plus" or "v" or "lock" button
Go to Property Pages, select Build on the left, and uncheck "Build Web site as part of solution" Then you can delete the file and it won't get created automatically.
You should be able to delete this file manually and have it not reappear. This file holds some information that used to be located elsewhere in the project in earlier versions but apparently is not necessary. Close your solution before deleting the file from source control and on the disk.
Related
We are working with building ETL packages in SSIS using a TFS repository. When my collegue add new files to the repository they are not added properly to the repository even though he checks in the entire project file. He sees the files in his project folder, and it looks like everything is checked in. But when I click on "Get latest version" I get a warning that the package is missing from the project directory. If any of us then try to add the file again we get a warning that the file all redy exists, even though it is not visible in my folders. Right now the solution we are using is for him to delete the file and then commit the change. After he deletes the file I get the latest version. Then he sends me the files and then I add them to the repository. Once I have added the files things seem to work as expected. Has anyone else had this problem, and know of a solution?
UPDATE:
The solution we found now is that I have to go to the local folder and find the new file my colegue added. Then I right click the file he just added and select add to project. Then the new file is visible in my version, but it does not have a blue lock icon next to it. If I then double click the sln-file to reload the project the blue lock icon is visible to me.
It is still not an optimal solution, but it works a lot better than him having to send me the file so I could check it in.
Is this the way TFS is supposed to work?
Can you please check the mapped work space path in your local machine there you will find the checked code. You need to manually Add.
Right Click on SSIS package -->AddExisting Package--> Select the package from Workspace-->Ok
Now you will find the missing package in your Solution Explorer as well.
If you are using TFVC.
Open Source Control Explorer=>Right click that solution/project folder=>View History, then check the related ChangeSet whether he add the file correctly.
Let your college to check the permission of that folder/file: Right click the folder/file->Advanced=>Security.
Regards
We have a bunch of build definitions available through TFS, and these were visible under Team Explorer - Builds in VS until a few minutes ago, when I tried to add a couple of them to "Favourites".
All I did was right click a build definition, and select "Add to favorites", then repeat the process for another build definition:
The result however, is a now empty list of build definitions - I can't seem to find any of them again. Furthermore, I get the following error message:
An item with the same key has already been added.
Any ideas how to fix this? Anyone know where the list of "favorites" is stored? (My reasoning is that if I can find and empty that list, then perhaps this issue would disapear?)
I ran into the same issue today. I was able to resolve it with the following steps.
Close Visual Studio
Open C:\Users[username]\AppData\Local\Microsoft\Team Foundation\4.0\FavoritesStore
Move the xml file from that folder to some other location
Start Visual Studio, open team explorer and navigate to Builds
At this point, the Builds pane opened without the error and "My Favorite Build Definitions" was empty
Moved the xml file back to its original location
Refresh the builds pane.
After refreshing, my favorite build definitions were back!
You may try (this helped to me with the same issue) to delete all the files in the following folder and restart VS2012 (Source):
C:\Users[USERNAME]\AppData\Local\Microsoft\Team Foundation\4.0\Cache
This issue occurred for me today when I had a mystery dialog open and it was blocking user input. I could not locate it or bring focus to it. I had to force a shutdown of VS, and after restarting my favorites were corrupt.
I found you can delete the cache for the favorites directly and restart the IDE. As soon as it launches you will see that VS will recreate the folder, and as soon as you add your first favorite a new favorites file will be created at that location.
C:\Users\\AppData\Local\Microsoft\Team Foundation\4.0\FavoritesStore
Writing an application or clearing the adjacent Cache folder are not necessary.
Favourites are stored in metadata on the user or group. You'll need to write an app to clear them.
http://geekswithblogs.net/TarunArora/archive/2012/10/18/tfs-api-add-favorites-programmatically.aspx
I am using VS 2010 and recently I moved some files around and changed paths etc.
The solution still compiles correctly and all files are able to be loaded/compiled without error however just about every time I go to compile after a change it gives me the save as dialog and asks me to save one of the projects, if I try to give it a new name or something the dialog does not exist nothing I do can make it exit apart from pressing cancel.
If I do a build straight after cancelling it works fine and I'm not presented with the save as dialog. I have verified that the project file is not read only.
Any ideas as to whats going on here.
The solution is stored in TFS 2008
You need to do 2 things
1- remove the read-only tick from the project folder
2- when a save-as window prompts at build, just overwrite the project
next time you build, the window won't pop up
You need to run VS as administrator. (right click on VS Icon- Run as administrator)
I solved the issue. When I try to save as this time it gives the error that file is being used by another process. Google Sync prevents to save so it opens save as dialog.
You should put your project under a folder not sync while working.
Are the bindings in TFS set up correctly with the new location? TFS will mark files as read only unless they get checked in. It might have been marked as such before you moved everything around, and now, isn't being checked out properly.
Also, try closing sync. files tools like google backup and sync.
I get this error when I try to load a VS 2008 project from TFS source control:
The project file has been moved, renamed or is not on your computer
After I click OK the project says "unavailable".
What is the problem? How do I resolve this? I never had this problem before. Some blogs said to delete the .suo file but I can't locate the .suo file. I deleted the entire project on my local computer so that the next time it opens it will create a new one, but I still get same error.
What typically helps to fix it is deleting the Solution User Options aka "SUO".
VS up to 2013
In the older VS it is stored as a "hidden" SolutionName.suo in the same folder as the main .sln file.
VS2015 or later
In VS2015 the same data was moved to a "hidden" .vs folder under the same folder as the main .sln file.
I just ran into this issue using VS 2013 after renaming a project. Stanley's answer guided me to the solution:
Close VS - delete .suo file - start VS again.
Delete the .suo file in a special way.
Don't have the solution open when you delete the hidden .suo file.
Restart VisualStudio.
Open solution and Add project without error message.
TFS works like most source control packages: It remembers what it has put on your computer so that when you "Get Latest" it only has to get the chnages since your last "Get" instead of having to get absolutely everything.
This has one caveat: If you delete or rename the local files on your disk, TFS won't know that you have done this, and it will still think they are where it left them.
If you then "Get Latest" it will not bother to update the missing files.
You are then likely to get all kinds of "missing file" errors, from TFS and any other tools that look for the files.
To get around it, you need to:
If you think you might have any changes in there that you don't want to lose, copy the source folder on your PC as a back up just in case!
Right click on the project (in Solution Explorer) or folder (in Source Control)
Choose "Get Specific Version" from the context menu
Choose to get the "Latest Version" and tick the option that says (something like) "force get of files already in your workspace", which tells TFS to forget about what it "knows" and get all the files again anyway.
If you have any locally-changed (writable) files, then be careful. There is a second option that will overwrite these, losing your changes. But you have the backup, so you should be safe. It's generally better to tick this option as well to make sure that all your source code is completely up to date. (But obviously only if you don't mind losing any local changes!)
When you OK, this will forcibly get all the files in the project to your local drive, and should correct the problem.
Easiest option worked out for me is:
Right click the project & Remove the "not loaded" or "unavailable" project
Right click the solution & Add "Existing Project"
Though it's well known VS defect, definately we can handle it!
Open the solution file in edit mode
Modify the relative path to match the modified/moved physical path ..
SccProjectUniqueName1 = Source\\Order\\Order.csproj
SccProjectName1 = Order.ApplicationService
SccLocalPath1 = Order.ApplicationService
Also, makesure of correct relative path for the referring project(s)
Project("{asdasd-301F-11D3-BF4B-asdasd}") = "Order",
"Source\Order\Order.csproj", "{E25641BC-C990-40E2-8876-08AE8728F763}"
EndProject
Try opening the .csproj or .vbproj instead of the .sln. What has probably happened is the .sln (solution) file has a absolute file reference (instead of a relative path) to the compoenent project(s). You may need to re-create the .sln, or hand-edit it.
In my case, deleting the .suo file was insufficient. I discovered that my workspace configuration had an error. I discovered and resolved the problem with these steps:
In Team Explorer, "Manage Workspaces..."
Click "Edit..."
Correct the value under "Local Folder"
Finally, delete the affected .suo files per the accepted answer.
I found it easiest to create a new Solution sln file.
Clear out your workspace mappings (File -> Source Control -> Workspaces). Edit the workspace and either clear out all the mappings (more repercussion) or find the one that's associated to this server path. Then open Source Control Explorer and remap. Double click the SLN in Source Control explorer and it should get latest. Not entirely sure what has happened or what state you managed to get into, but with this should get you moving again.
I ran into this issue and was able to resolve it by obtaining the .rptproj files from a co-worker and copying them into my local directory. The project was then able to re-load.
I spent a lot of time for trying solve this problem. I did these steps : rename project, rename namespaces, rename project folder, edit .sln file, edit hidden .suo file. Project loaded but it was unrecognizable for TFS! Finally I found this guide.
If you're using Resharper and TFVC is your version control, follow these steps :
Right-click the project in Solution Explorer, select Rename, and enter the new name
Right-click the project again and select Properties. Change the "Assembly name" and "Default namespace" on the Application tab.
Right-click the project again and select Refactor -> Adjust Namespaces. Accept the changes.
Change the AssemblyTitle and AssemblyProduct in Properties/AssemblyInfo.cs
Delete bin and obj directories in Windows Explorer
Open the Source Control Explorer and rename the project's directory. This will close the solution. Let it be closed.
Open the SLN file (with a text editor such as Notepad++) and change the path to the project (there should be multiple places).
Open the Solution again. Clean and Rebuild the project.
Right click on the unavailable project and edit the project file ... chances are, you will find a hardcoded file path or a virtual one that does not match where you checked the project out to.
Kindness,
Dan
Solution for this
Again rename the project folder
Set specific version & force get in TFS
remove read only & hidden option in the latest folder (not the rename one)
Now you can open the project without any issues
Sometimes, even though you changed .sln and .csproj path, and manually rename, you might forget to check the folder name that contains the project.
It happened to me too. Apparently the csproj files were not checked in when I had created them in my old computer, and so when I downloaded the project from TFS in my new computer, the files were not there.
After checking them in using my old computer and getting them from TFS in the new computer, I succeeded in reloading the project.
In my case, because I modified .csproj file, it changed to .csproj.user .
I remove .user from the end of the file.
I added a project to an existing solution that is currently under source control using TFS, but for some reason I cannot check in the new project. When I view my pending changes, none of the files in the new project show up. None of the files have a plus (for a new file) next to them. What did I do wrong? How do I fix it? It's time to check in.
The problem is the solution has lost its binding. That's why it's not checking out automatically when you add the new project.
In order to restore the binding in VS 2010, go to File->Source Control->Change Source Control. Look for the "Solution: your solution name" and if it's not bound it will say "no server". Click on it and then click "Bind" from the toolbar.
in Visual Studio 2012/2013 it's File->Source Control->Advanced->Change Source Control (Thanks to danglund).
This should create a new vssscc file that is correctly bound. Now add the new project and everything should work correctly.
I was also having the same problem, this is how I fixed it:
Go to Visual Studion: File->Source Control->Change Source Control
Find your project there, its status would be "Invalid", Click on it and press "Unbind". Now go back to Solution Explorer and Remove your project. Add this project again into the solution explorer solve the problem.
Good Luck!
Click on the Team Project name in Source Control Explorer
File -> Source Control -> Add Items to Folder...
Follow the wizard.
Head over to Source Control Explorer and browse to the place in the tree which matches where the new project is at for your solution. Add the files there.
However, I'd be concerned that you modified the solution file and it didn't ask you to check that out. What you may want to try doing is manually checking out the solution file, then readding the project to the solution and seeing if it takes then.
You shouldn't need to drop to the command line - this is a pretty straightforward operation.
Open the solution. Select the project (make sure it is in the solution).
File -> Source Control -> Properties will bring up the binding dialog.
Bind the project to source control.
You should now see + signs next to all your files. The key is that that a .vssscc is added for your project to version control.
If that fails, open your csproj in notepad (after making a backup), and ensure any version control bindings are removed, then try again.
Unfortunately, I'd wager that your best bet is to manually do the check-ins through the command line. I've ran into situations where the Team Explorer UI grows out of sync with what's actually happening in source control, and manually fixing things through tf.exe was the only way to resolve it.
That said, normally, adding a new project to a solution isn't a hassle.
TFS can simply do not know about your project existed. Just add your project files through Source Control Explorer and re-load the solution.
While loading of a solution it can ask you to bind your project to source control. Let it do so by clicking Bind button - it should do all the magic for you.
Make sure you get the latest version of the solution
Check out the solution file
Add the new project
If the newly added project was previously under (another) source control, that might mess things up, make sure to "unbind" it before adding it. (See source control bindings somewhere under the "file" menu in Visual Studio)
You shouldn't need the command line.
I had this same problem in VS 2019, where I had added a new project to an existing solution, and the project wasn't showing up in pending changes. Right-clicking on the project and going to Source Control only had an option to "Add Solution to Source Control".
Using the above answers, I started down the File --> Source Control path, which then yielded an option to directly "Add selected projects to source control". Taking that option solved the problem, so that now the new project shows up in pending changes. NOTE: I'm adding this answer since it's still an issue in VS 2019, but has an easier solution now than in the past.