How do I add a new solution to my team project? - tfs

We have a team project in TFS 2010. This team project is used as a container for a few smaller, related projects in order to share bugs, work items, etc. My question, how do I add a new VS solution to this team project?
I created the new solution in my local working folder. The team project is already created on the server. When I go into the Source Control Explorer and try to add the new solution to the project, I can’t add the new solution because I don’t have a destination folder mapped. I can’t map the destination folder because I can’t figure out how to add a new folder to the server project for the new solution. Caught in what appears to be some wicked circular logic… help!?!

To add a new solution from you local files to TFS you could:
In the solution explorer right click on the solution and select 'Add Solution to Source Control'
Then you can right click and select check in.
Then the entire solution will be added to your team project in TFS.

Related

VS Code TFS is showing wrong project

I have setup Team Foundation Server support in my VS Code. As the docs say I open the workspace folder and the extensions sees there is TFS support in this workspace but the project shown in the status bar is for another project on the TFS.
What is wrong here?
Generally it will display the Team Project name which is based on your workspace when you connect to TFS.
So, if you mean the wrong Team Project name, then you need to check your workspace first, make sure it's really mapped to the correct Team Project.
You can also try to create a new workspace and map to the specific Team Project, then check it again.
If you mean the wrong develop project with the specific solution, then you can switch to the correct project/solution by clicking the switch button at bottom-right corner.

Add solution to different TFS team project

I've accidentally added my solution to wrong Team project on TFS, I've gone to File/Source Control/Advanced/Change source control, I've selected all my projects and unbinded them, went to solution, and after right click I've chosen Add Solution To Source Control, but pop-up appeared saying:
The item 'ProjectName.sln' is already under source control at the selected location.
If you are trying to rebind a project that you have already added to source control
outside Microsoft Visual Studio, you should use the Change Source Control command. If you are
adding this project for the first time, you should either choose a different server folder for the project or move the
existing project to a different server folder.
I've tried to bind project to new Team project, but when I tried to check in, not whole project was checked but only changes added since I've accidentally added it to wrong Team project.
To sum up how can now I add my project to TFS source control ?
You need to unbind it, then manually move the files into a local folder that is mapped to the correct team project. Then try doing the Add Solution to Source Control.
Each team project will be mapped to a different folder in your local workspace. If your files are under the folder for project A (which I assume they are if you've already added it to that team project), then you need to move them to a folder under Project B before trying to bind to Project B.

Getting "Failed to create mapping" when adding a solution to TFS source control

I've created a new Team Project in TFS, but when I try to add my solution to it I get:
'Failed to create mapping
Cannot map server path, $/Finance/MyApp, because it is not rooted beneath a team project.'
I can't find anything on google or here that looks remotely like this problem.
I had this issue when using Microsoft's Team Foundation Service from Visual Studio 2012. I had just created the new team project via the TFS website. Although I could see my new project in the 'add solution' window, I got the error the OP reported.
I had to go into the "Team Explorer" window, then into "Connect to Team Projects" and tick the new project. Then I was able to add my solution to the team project.
Is Finance a team project for you?
If not, you can clear the mappings for the workspace or even just delete your workspace.
http://msdn.microsoft.com/en-us/library/54dkh0y3(v=VS.100).aspx
Had the same issue when upgrading project to TFS 2010 from 2008. The solution was to delete the vsssc file in the root of the project folder and re-add it
In my case I had to do Team Explorer and connect to the new project
then I had to close my solution and re-open and then the "add to source control" worked.
--Connect and check project in team explorer window
--Close solution
--Open solution
--retry adding solution to source control
I had this issue with Visual Studio Online's source control, Visual Studio would not recognize the team project even after connecting to team projects, refreshing, restarting Visual Studio. I had to use the "Open in Visual Studio" link from the project on the Visual Studio Online site and then open the solution from there.
Well, i didn't want to do anything so drastic, it turned out that one of my subfolders inside the solution i wanted to add to source control, was mapped inside a different workspace (on a different TFS server). So the solution was to connect to that other TFS server, find and delete the conflicting folder mapping inside that workspace, and try again.
I had the same problem using visual studio 2008 and TFS 2012. In my case, when I manually added the local folder to the project through the workspace mapping, the problem went away.
File -> Source Control -> WorkSpaces -> Edit
Then when I went to add the solution to source control it detected the mapping automatically.
In my case, I copied the folder from "My Documents" to c:\tfsroot where I had mapped the TFS Root. Then when I opened the solution and added it to TFS it worked.
I had the same problem. My solution in VS2017:
Open Team Explorer tab
Select Source Control Explorer
Right click on the top level folder for the project and select "Advanced/Remove Mapping"
Remove the Mapping
Right click on the top level folder for the project and select "Advanced/Map to Local Folder"
Browse to the top level folder with the source code (You may need to adjust the path you selected. It may append a folder name to the end)
Click "Map"
Answer "Yes" to Message Box "Newly mapped items will not be downloaded until you execute a get. Do you want to get $/YourFolderName now?"
That should do it!

TFS Project is visible in the Source control explorer but not in Team Explorer?

I'm able to view the project
1.from the Source Control Explorer but not in Team explorer,Only if i have open the local project which is binded to TFS Only then i can view the other folders within in TFS Project.
2.From Tfs command Line Utility
3.Suppose there are no workspaces and no projects downloaded from TFS then only way to view the project is from the command line Utility.
Is there any way fix this issue.
Right click on the root in the team explorer pane, and select "Add existing team project". You should be able to select the new project from there.
It sounds like a permissions issue. I'm guessing you don't have permissions set up on the Team Project, but you do have read permissions on the source control. Keep in mind that, though the two are related, they are stored and maintained separately in the back-end.

TFS: Choose which Team Project to add a solution too

I have a solution which I developed in VS2008 and which I am trying to add to Source Control (TFS 2010, though the issue happened in TFS 2008 as well). I have several TFS workspaces on my computer and I have access to several Team Projects.
When I right click the solution in my Solution Explorer and choose the "Add Solution to Source Control" option I am never given an option of choosing which Workspace or which Team Project to add the existing solution to. VS2008 then proceeds to add it to the same team project every time. I have tried selecting an alternate workspace/team project in every window where I can see an option for it but it always adds it back to the same one. I even tried changing the name of my new workspace so that alphabetically it was the first thinking that it might be somehow related to that; no luck.
I then tried going to the Change Source Control window where you can add/remove bindings on a solution/project but that window also defaults to the same Team Project as trying to add the solution directly does.
In my experience, the add to source control mechanism tries to use the physical path of the solution to determine which TFS project it belongs to. You could try to move the solution by right-clicking on the solution folder in the Source Control Explorer and choosing "move" to move it to the TFS project of your choice.

Resources