I have created two team projects (Demo and NewTest) in my collection (DemoCode). I accidentially mapped my application (WindowsFormsApplication3) to the wrong team project (Demo):
How can I move the above application (WindowsFormsApplication3) to the correct team project (NewTest).
Here is what I see:
You can just right click, select move, and specify the location that you want.
Caveat: This does a branch+delete under the covers.
Caveat#2: You need to have latest for both locations in the same workspace.
Related
I created a new project in my solution under a newly created folder. Not just a solution folder. It is placed under a physical folder also.
Say, my original solution is like this:
MySolution
- MySolution.Web
- MySolution.Domain
Now the structure is:
MySolution
- App
- MySolution.Web
- Lib
- MySolution.Domain
- MySolution.Repositories
- MySolution.WorkerServices
- Test
- MySolution.Specs
- MySolution.Unit
Please note in addition to the newly added projects, MySolution.Web and MySolution.Domain are moved to a physical subfolder also.
To move MySolution.Web into the App folder, I moved the files outside Visual Studio and then edit the MySolution.sln manually with a text editor so that the project entry can point to the correct physical location.
Since those two projects are almost empty, I don't really care about losing history.
Then I find I could not check in the change to TFS!
I got Team Foundation Error, saying Could not find a part of the path.
As suggested by comments/answers to this question, I have done an Add Items to Folder in my Source Control Explorer. Now the new folders and projects have a plus sign ahead of their icons. But the MySolution.Web and MySolution.Domain still stubbornly exists in the root. If I try to delete them, it says One or more children have pending changes. It appears TFS tracking failed to understand what I am doing and pending changes are related to those projects even though they are not in existence physically on my local computer.
How can I fix it? What is the correct way to add a project into another folder?
It sounds like you need to add these new folders to source control.
In Source Control Explorer, use the tree view and right-click on the folder above the folders you want to add. You should see an "Add Items to Folder" menu item. Click that, and follow the instructions.
Note that all involved folders must be mapped into your workspace in order for this to work.
I'm using Visual Studio 2012 and TFS Express. I have the top level collection 192.168.100.100\Collection; under it I have a project for each program; under those I have the solution folders. So in the project folder FooBarBaz I have the solution OldName. (I'd rather not post screen shots of the folder tree, but I can rig up an ASCII art depiction if needed.)
I want to rename the folder OldName to NewName. I have already successfully renamed the solution itself and checked that in. I have also successfully changed my local mapping from ~/Projects/OldName to ~/Projects/NewName.
In MSVS Source Code Explorer, when I right-click on OldName the context menu options Rename and Move are both greyed out.
How do I rename the folder in TFS? I am the team's TFS admin so I can use the web-based settings and I can also use the TFS control panel on the host system.
Right click on the folder name in the left panel.
Also, you must have those folders mapped into your current workspace.
Pre-step assumption: Create local folder with solution and project under it and added solution to TFS. TFS now has a path in TFS pointing to a TFS folder that contains your added solution. This location is bound to the location on your local machine that is likely out of sync with the path structure represented in Source Control Explorer.
You want to rename the folder in TFS that holds your solution. When I right-click in Source Control Explorer, “Rename” is grayed out. It appears that TFS wants the TFS path to match your local path structure.
In order to rename the TFS folder I had to:
Check everything in
Remove binding to source control
Do a get latest - TFS assumes structure inherited binding - so whatever the folder is named and where it is in the TFS path structure, the get latest will create a local folder to hold the code.
Now, right click on the folder and do a rename in Source Control Explorer.
TFS and your local workspace are now in sync. If you now go and rename the TFS folder that contains your solution, the next time you open the solution, your local folder name will be automatically changed to match TFS.
Of course, don’t forget to go back later - after VS has released the lock, and delete your old/first/”no longer bound to TFS” version of the local solution folder.
I hope this helps someone else.
I have Visual Studio Express 2012 installed which is linked to my VisualStudio.com account, I created a new project but I didn't tick the
Add to source control
option as I was intending it to be a throwaway project. However, I now want to keep it so I am trying to add it to source control after the fact.
I've tried both adding the project to source control when the project is open and moving the files from the "Excluded Changes" section of the Pending Changes window. In both cases I get the following error:
TF10169: Unsupported pending change attempted on team project folder $/RadioButtonTest. Use the Project Creation Wizard in Team Explorer to create a project or the Team Project deletion tool to delete one.
My default collection is mapped to E:\Chris\projects and the project I'm trying to add is directly in that folder.
What am I missing?
I had exactly the same happen - mucked about a bit and got it working by adding a project of the same name to my VS Online page.
Try this:
Open your web browser to your visualstudio.com homepage
Under "Recent projects & teams"
Hit "New"
Use your "RadioButtonTest" as the project name and go through the
creation flow
Check in from VS
I found a much simpler way to add the Project to Source Control for Visual Studio 12. I selected the project, go to the "FILE" menu, selected "Source Control", where you may see an option to "add this project to source control".
If you don't see that option, though I think you will; you can select "Advance" then "Change Source Control". In that dialog box you will see all the projects bound to the solution. Select the project you want to add to source control, and choose "unbind" then "ok". (it will throw a warning that some files were already in source-control, select "ignore all") Now your project is unbound, right click on the project name, the option to "add this to source control", and voila! Now you're running with petrol!
The reason this is happening is because there isn't a "team project" for the solution but there more than likely is a collection which isn't the same thing.
The above answers helped me figure it out but all I had to do was create a new team project from the instructions on MS's website: https://msdn.microsoft.com/en-us/library/dhedaeb2(v=vs.90).aspx and then I was able to add solution to source control.
I'm not quite sure why you are getting this error but here is another approach you could take.
Create a new project with the same name and check the "Add to Source Control" project.
Commit the initial version and close the project in Visual Studio
Copy the contents of the real project over the newly created project
Re-open in Visual Studio and let it detect the new changes
Commit the new changes to SCC
This is a round about way of getting an existing project into source code control.
I managed to fix this issue by right-clicking the solution and selecting "Add Solution to Source Control".
I encountered this issue when I tried to create a new TFS project folder (rather than a "team project") at the root. After trying everything suggested above, I did the following:
copied my code to another folder
did an "undo" on all pending changes (making sure that the only changes included were the ones for the project at hand)
deleted the filesystem folder
created a "team project" in TFS Team Explorer (this wizard automatically creates a folder at the root and checks in the changeset)
copied my source code back to a folder with the same name as the team project
opened the solution in VS
right-clicked the solution and clicked "add solution to source control"
checked in...success at last!
I got this error when I went to check in a project, I had created the solution in a new team folder that was not in TFS and fixed it by doing the following:
Go to Team Explorer
Click the drop-down arrow to the right of Home
Click Projects and My Teams
Click New Team Project...
Add a team project with the same name as the new project folder.
I'm trying to use TFS but there is one problem:
I created project called NewWeb and added him to source control, after that I deleted this project and mapped Global to another project on cloud but one folder from still shown in the tree under the deleted project.
NewWeb is a separate Team Project, so has nothing to do with MVC4. You cannot map two source control folders to the same folder on your hard drive, so you can't have one folder shared by two team projects.
Instead, you will need the global stuff to be held in one place in source control and then referenced from there by your code solutions. Either use a separate Team Project for globals and each application, or have one Team Project for all your code, and place each app in its own subfolder.
finally, I'd advise that you try to minimise the mappings, I.e. map $/ to your hard drive so your workspace matches the source control layout. Using mappings to move things about Introduces complexity that leads to problems.
Try deleting $tf (hidden) folder from your project folder.
To avoid conflicts use tfs destroy command to destroy all the folders.
Goto File -> Source control -> Advenced -> Workspaces, in the popup click edit and remap the folder where there should be.
Check in pending changes.
I am trying to use TFS storing non-VisualStudio source code. Working with Visual Studio 2012 and Microsoft's online Team Foundation Service.
I've setup a TeamProject and mapped its root to a local folder. All it contains at the moment is a BuildProcessTemplates folder in it. (which was created as part of the TeamProject)
I copied my source code externally (using windows explorer) into the TeamProject root folder on my hard drive and since my TFS workspace is NOT a server workspace but rather a local workspace, I was expecting VS to detect the folders/files and show them in Pending Changes window .... yet it doesn't.
Interestingly, new files in the root folder are detected as "Excluded Changes" but new folders are not detected.
What am I missing?
First make sure the newly added folders contains files.
Are there any Detected changes shown in the Excluded Changes section?
Pending Changes > Detected changes link > The Promote Candidate Changes dialog box appears > check the files you want and click Promote.
I can't say I have ever noticed nor expected TFS to automatically pick up files or folders added to a mapped directory as pending changes.
I always just add them manually using the 'Add existing items' option from the source control view.
It may actually do (or at least be meant to do) the auto-detection, but I can't say I've ever relied on it. I don't think it's something to fret too much about - adding them manually is easy enough, and the 'Add existing items' option is usually smart enough to show you which files are not already under source control, so even if you need to add even more files later, it shouldn't be too much extra effort.