I'm banging my head for several hours but couldn't find the solution on my problem. I have a team project collection. one of the project in collection is corrupted probably. It doesn't show up either in Team Explorer nor in TFS Administrator. but I can see that project in Source Control Explorer from VS. I tried TFSDeleteProject but it says:
TF200016: The following project does not exist:........
I can't create a team project with same name, nor I can delete it.
I looked at the database and there are entries about the corrupt project in many tables. Any idea how to remove it? maybe with the help of some SPs? I tried DeleteProject stored procedure, it didn't show an error, but it also didn't delete the project.
thanks.
Have you tried simply deleting it from source control?
TFS is comprised of several components (issue tracker, reports, source control, etc.), which, although typically used together, can also function individually. A file/folder in source control that does not belong to any project is thus possible. I don't know if you can create this situation manually, but it could result from a bug.
You need to use tfsdeleteproject to remove this.
The DB isn't corrupt, you cannot delete Team Project level source control folders through the UI.
tfsdeleteproject /collection:<url> <teamproject|srcfoldername>
You can always get the collection url by selecting the collection node in Team Explorer and hitting F4 to view the properties pane. Copy/paste the url. The Source Control folder you are trying to delete is likely the same as your Team project name.
Related
I have a core project and several sub projects. I link to files in the core project for the sub ones. I righted clicked my csproj and said existing file > add > link. Here is how my project looks:
Here is a picture of my Windows Explorer:
When I check in, I receive this error:
Could not find file C:\Users\joe_a84\Documents\JMASoftware\QuickBooks\Main\Source\Platform Support\NOP\Source\Versions\nop265\Nop265\Module\QuickBooksSettings.cs
The file does not exist there because it is linked. How can I tell TFS that it's a linked file?
There is the following question which states that symbolic links are not supported in TFS 2008 or TFS 2010. Symbolic links in TFS 2010 Source Control?
However, I did find the following ancient blog post which seems to show how to do it for TFS 2005: http://blogs.msdn.com/b/ericlee/archive/2006/07/20/sharing-files-in-team-foundation-server.aspx
That said I would highly recommend that you simply don't do this.
If you really need to share a file between projects then you should be using the branching functionality built into TFS. Typically you don't want just a single code file due to namespace and assembly generation concerns. It is much cleaner, and certainly easier to maintain, by having a separate project for those artifacts that are passed around. This way you either branch the entire assembly project; or just refer to it in it's normal place.
This is a local file level linking by another project. There is only one file at a specific subfolder. Other projects can link to the file via this approach. The problem with this approach is that from TFS viewpoint, you cannot tell if a file is shared by other projects. A good practice will be to keep such files in separate folder with name like Common or Shared etc.
People who have been using File linking across branches in Source Control would have to change their approach quite differently.
Linking between files in TFS is pretty simple. You just open the "Add existing item" dialog and search for the file you want to link in your local workspace. If you would click "Add" now Visual Studio would create a copy of the file in your projects directory. What you do instead is to choose the other option (you have a little drop down menu on the button) and add the item as a link. Thats it.
I faced the same problem. I just did undo on the file which was showing this error in the TFS Pending Changes window and checked-in. This undo did not remove the link that was added in the project. Make sure you do not undo the project file.
I have a Visual Studio Solution (2010) containing code projects that were under source control in Team Foundation Server 2010. That collection/project no longer exists, but the code was not removed from the collection. The collection and project have been created over again exactly as it was the first time. When I open the solution in VS, it tells me that it can find my project, it is offline, and asks if I would like to go online. I click yes, but then it errors and says it can not find the workspace. All my files are read only. I assume this is because of the source control and, since it's not hooked up, I can't check them out (remove the read only).
How do I purge the solution of the old and hook everything back up again, short of recreating all the code solutions over again?
EDIT
To clarify:
Collection refers to TFS Collection
Project refers to TFS Team Project
Solution refers to VS Code Solution
The problem is the code solutions are still associated with the team project, which doesn't exist. When I open it, I get the message "This solution is offline, but its associated TFS server is available. Would you like to go online with this solution after it has loaded?" Yes "Unable to determine the workspace for this solution"
When you have loaded the projects, enable the Source Control - Team Foundation Server tool bar, click the "Change Source Control" button (only one enabled) and it asks you if you wish to permanently remove the association with source control.
I have some solutions that are binded to TFS 2010. But a team project collection isn't avaible any longer. I need to rebind this solutions to a new Team project Collection on this server. I tried to change Source Control (File -> Source Control -> Change Source Control). After pressing "Change Source Control" the window with the worlds "Would you like to completely disassociate solution from TFS" appeared, I pressed Yes. But when I'm trying to add this solution to this new project collection, I have the message that I cant do this, because the previous team project collection is unavailable. I've deleted tags from solution file and projects files and all *.vssscc, *.vspscc files. But I have got the similar error message after several attempts.
Message:
Team foundation server http://tfs.dynamics...etc does not exist or is not available at this moment. Technical information for the administrator: Service Team foundation not available on server http://tfs.dynamics.../<OLDPROJECTCOLLECTION>
Something is clearly remembering the old collection.
One option, if you still have access to it is to re-enable the old collection, unbind cleanly from it, and rebind to the new collection, before you decommission it. That way Visual Studio has the best chance of cleaning up or overwriting any references to the old collection before it is removed.
If it's too late, then places I'd look (in priority order) are:
Make sure you've removed the old collection/server from your 'connect to TFS server' dialogs
Make sure any workspaces for the old collection are deleted, and that the folders containing your solution/projects are mapped into the new collection's file structure. (Old mappings may prompt VS to add the bindings back in for the workspace it thinks applies to those folders)
Clear any references to the collection out from any solution and project files, and delete all the source control binding files (vssscc etc)
Search for in all files (.) in your source tree
Search for throughout your registry (proceed with extreme caution if you find anything and want to delete it)
I'm using team foundation server 2010 # work and home.
I want to exclude some element from the project build but still have them exist in Team Foundation Server 2010 source control. How do I achieve this?
Exclude From Project will delete the item.
Same problem here, only way to do this is manually edit project file :(
Please vote that this bug is important to fix
https://connect.microsoft.com/VisualStudio/feedback/details/573582/vs-2010-exclude-from-project-deleting-files-from-source-control
Workaround posted on Connect:
Open the csproj file in notepad and find the files that need to be
excluded and remove or comment the compile element for that file, and
any related designer and resx files.
Editing a project file and removing the references to the files you want to exclude would be the easiest solution.
Another solution would be to remove files from the project via UI, but only checkin changes in the project file and undo the delete operations.
In the future you can add files directly to the TFS folder in Team Explorer.
May I ask: why would you want to do that? As I commonly have a problem of files which are not bound to any project and have to be getted manually.
I work in a TFS environment, and if it were me? I'd just change the name of the file (instead of excluding it from the project), and check that in instead. Since your project is expecting that particular filename...it won't find it. We use this when we're developing prototypes or holding on to antiquated code for documentation purposes. Sorry VS is eating your stuff!
Kind Regards,
-sf
I think these steps should help you do what you are looking for.
To exclude an item from a deployment project:
In Solution Explorer, select the file you want to exclude.
On the Solution Explorer toolbar, select Properties.
In the Properties window, set the Exclude property to True.
And this page explains the actions for project files supported by VS 2010:
http://msdn.microsoft.com/en-us/library/0ebzhwsk.aspx
--- Edit ---
At work I tried 'Exclude From Project' in one of the files of a project we have in VS 2010, which is bound to a TFS 2010 server, and this action did not delete the item from TFS; the Source Control Explorer window shows the red delete mark next to the item, and the 'Pending Change' column says delete, but item is there. Right click the item in the Source Control Explorer window, one of the commands in the context menu that pops-up is 'Check In Pending changes' and another one is 'Shelve Pending changes'. Shelving enables you to set aside the pending changes.
The file is still in the local hard drive. If I do 'Include In Project' the item comes back to normal.
I am a lone developer, and I am now using TFS 2010, having until recently used VSS.
I have not found it easy to get any books for beginners to help me use this.
So I have now got my project in source control. But when I check in I get references to a number of files that I no longer use. How do I remove files from the TFS Source Control repository?
So in the example below, you can see lots of files from different projects that I do not want to see.
Click on the last icon that looks like a solution (.sln) file icon (last icon on the top vertical row). It's right next to the refresh icon and just above the "Comment" box. That should clear all non-related project files, and only show the files on your current project.
In Source Control Explorer in Visual Studio, simply right-click on files and folders and choose "Delete". Then right-click again and choose "Check-in pending changes".
You need to Destroy those files first, then only those files will get removed from source control.
You can't make any changes in those files - they remain in source control until you destroy them permanently from TFS.
For more info about how to destroy see TF Destroy command utility.
The files in your screenshot are (mostly) listed as add - they are not in TFS yet, so deleting them from TFS is not what you want. Rather you want to ignore them, though that can be tricky: How to ignore files/directories in TFS for avoiding them to go to central source repository?