I can't check in an existing project to VisualStudio.com - visual-studio-2012

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.

Related

How to check in a new project to Team Foundation Server?

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.

How do I rename a solution-level folder in TFS?

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.

Visual Studio 2012 - Database Project - setting a default profile for publish

Just wondering if anyone knows how to set a saved publish profile as the default i.e. profile that's automatically loaded when I select publish. I love the new profile approach but I'm a bit over having to reselect the same profile over and over while I'm developing.
In VS2012 and up, you can set the Default Publish Profile by right-clicking on the .xml profile file and clicking the Set As Default Publish Profile option. It will then be auto-loaded when you click to Publish the project.
So I've just discovered how to do this, right click on the specific .xml file (e.g. Debug.publish.xml) that you wish to publish and it is automatically loaded into the Publish panel.
Double clicking the XML file also works
The latest Visual Studio 2012 Updates also now include right click options for:
1 - Set as default
2 - Publish
Rob, you may want to consider setting up some batch files that call SQLPackage to use your desired Publish profile. I blogged about it here: http://schottsql.blogspot.com/2012/11/ssdt-publishing-your-project.html
For our dev team, we have a set of batch files set up that can build one or all databases locally from whatever branch they're currently using. That makes it a lot easier to update the local database. The "Publish All" batch file takes a little time to run but is still better than opening each project individually to publish the databases.
Slightly odd issue: I renamed my .xml file to .localdev.xml....file name is "double extension'd" - VS/Datatools looks for ".publish.xml" NOT just the .xml file. In my case I needed "*.localdev.publish.xml". When it had the wrong name the "Set as Default Publish Profile" right click option DID NOT show up, nor did double-clicking...where is Molder when you need him?!?!? ;)
Get the name right, get the right functionality......MS needs better, more creative QA people!! ;)

Using local TFS workspace for non-VisualStudio source code

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.

TortoiseSvn Folders Can't Commit

Good morning,
I've got an ASP.NET MVC VB2008 .NET 3.5 project I'm upgrading to ASP.NET MVC3 VB2010 .NET 4.0 and it seems to be going OK so far.
I have got it into a working state and all the tests run correctly so it is ready to commit to subversion.
The problem is that to get the tests to update for .NET 4.0 I had to put the classes in a different folder, delete the project and recreate the project in the same place then put the classes back into it.
Now TortoiseSvn can't commit the folders as it already has copies of those folders, even though if I take them out and update the project they're not put back into the project.
Is there any way I can get tortoisesvn to overwrite the old files even though they are technically new files?
Regards,
Harry
You've probably lost the hidden ".svn" folders used to keep track of changes.
Tortoise has an "export" feature. Right-click-and-drag the top level of you modified project to a safe place, choose "Export all here" from the menu.
The check your project out again to a new location, and drop the exported copy on top of it.
Delete any files/folder that shouldn't be there using Tortoise's "Delete" right-click menu item.
It should then be OK to check in, then clean up the mess we've made! :)
I had the same problem as yours. What I did was:
delete the old folder that you have for the project
create a new folder and redo "SVN Checkout"
Then you will have the standard menu back to your SVN.

Resources