Unsupported pending change error when moving folder - visual-studio

I am trying to move a folder in TFS 2010. After coming to grips with the fact that TFS can't do this without losing the folder's history (see this question and users' responses to Microsoft), I tried the following TF.EXE command:
tf rename Apps "Test Main\Apps"
But I get an error message.
TF10169: Unsupported pending change attempted on team project folder $/Apps. Use the Project Creation Wizard in Team Explorer to create a project or the Team Project deletion tool to delete one.
The Apps folder does not appear to have any pending changes but I tried some other folders for good measure and got the same result.
I do not want to create or delete any Team projects. What am I missing?

$/Apps is not a folder, it is the root of a team project. Think of it as "C:\". You can create folders underneath it, but it's a special entity with its own set of rules.
So, what does this mean for what you're trying to do? It looks like your goal is to rename the team project. Unfortunately, TFS 2010 does not support renaming team projects, although TFS 2015 and beyond do.
If you want to rename the "Apps" team project, you will have to upgrade to a modern version of TFS, but at a minimum TFS 2015.
Otherwise, you will have to manually create a new team project with your desired name and check in the source code. You won't be able to move it from within the source control explorer.
However, keep in mind that there is more to a team project than just source code -- any work items or build definitions will not transfer to the new team project, and there is not a mechanism for moving them.
So, your options are:
Live with the name
Upgrade to TFS 2015 or beyond (ideally the most recent version, of course)
Create a new team project

Related

TFS Project Deleted, how to upload code to new project

Somehow on my team's TFS server, one of our projects got deleted. The code is on my local machine though so I'm trying to get it reuploaded, but I'm running into issues getting it back on the server. I've recreated the project and given it the same name and Visual Studio seems to recognize that the new project I've created is connected to the Project I'm trying to upload as a result. The problem is that when I try to check in the version I have to the new project it throws a pile of errors because the files "does not exist at the specified version or you do not have permission to access it". Is there some way to force the upload so that the files are all on the server again?
First remove .* folder from your current working project.
Then go to Visual Studio
Open Team Explorer
Click On Manage Connection
Add your account If not added
Enter your tfs url
Select your TFS folder where you want to checked in your code.
Try to checked in your code.
Even though you have deleted the project on server side, all changes in TFS are non-destructive.
You could check this, just navigate to the Source Control –> Visual Studio Team Foundation Server section.
In that section is a check box that says "Show deleted items in the Source Control Explorer"
If you have recreated the project and given it the same name and want check in local code to TFS. This may cause some trouble.
Suggest you to permanently destroy the project in TFS using Destroy Command (Team Foundation Version Control)
tf destroy [/keephistory] <itemspec1>[;<versionspec>][<itemspec2>...<itemspecN>]
[/stopat:<versionspec>] [/preview] [/startcleanup] [/noprompt] [/silent] [/login:username,[password]] [/collection:TeamProjectCollectionUrl]]
After destroy the old project, then create a new project with the same name, add your local code to this project, finally check in pending changes.

Does Visual sturdio creates a workspace for every tfs project?

I am new at using tfs online and create projects. When I am creating a project on TFS online platform, and connecting from visual studio. So I need to map project on my disc. And I see a workspace that has same named my computer name. Does visual studio creates a workspace on visual studio for every tfs project? What is the goal of workspaces?
A workspace represents a mapping between a location in source control ($/SomeTeamProject/SomeFolder and a location on your computer (C:\SourceCode\SomeTeamProject\SomeFolder).
That's all. It's a very straightforward concept.
You can maintain multiple workspaces for purposes of isolation, or just have one workspace mapped to the team project collection root ($/), which means that every team project in the collection will be mapped in the same workspace. It's entirely up to you. The advantage of multiple workspaces is that you can explicitly avoid doing things like modifying a bunch of stuff across branch or team project boundaries inadvertently. If you have a workspace for a development branch, you'll only be able to check in a set of files in that branch. If you want to check in files in another branch, you'll have to switch workspaces. It can be a nice sanity check, but it's by no means a necessity.
Workspaces can consist of multiple mappings (for example, $/Foo/Bar -> C:\Foo\Bar, $/Foo/Baz -> C:\Foo\Baz would map those two folders, but ignore any other folders under $/Foo).
Workspaces can also contain cloakings -- explicitly excluding a folder from being mapped. So you could map $/Foo/ and cloak /$Foo/Bar if you wanted everything under $/Foo except the Bar folder.
Workspaces come in two flavors: Server and Local.
Server workspaces were the default from TFS 2005 up until TFS 2012. In a server workspace, every activity you take in source control has to happen through Visual Studio (or an equivalent IDE) -- starting work on a file contacts the server and checks the file out. Files are stored in the file system as read-only unless they're checked out.
Server workspaces are, generally speaking, awful. I do not recommend using them except for in a few very specific cases.
Local workspaces were introduced in TFS 2012 and were first supported (not surprisingly) in Visual Studio 2012. Local workspaces are slightly more Git-like in that editing files does not require an explicit check-out on the server -- you can edit a file at any time in any IDE. This allows you to work offline in a very limited fashion.

Bulk TFS Migration

I have downloaded 30+ TFS projects (containing close to 100 cs projects) from my Team Services (was TFS Online). I have modified many of those cs projects and would now like to check the changes into a different Team Services repository. Is there an easy way to do this in bulk?
I know I can add the "files" to new Team Services repository through source control explorer, however, that appears to screw up the nuget package restore when they are downloaded. The only way I have found that the nuget package restore works is if I open each project, disconnect it from source control, and change the source control on the open project and check it in.
You can use TFS Integration Tool to achieve Visual Studio Online migration (VSO-To-VSO)
Detail steps please see my answer in this question: Move Team Project to another Project Collection TFS 2013 (Just need to change the TFS to VSO)

Visual Studio Online TFVC Source Control - Can't add solution

I have never used VSO before, and decided today to try it out for a small project I have. I added the solution to VSO with no problem, however I realized I made a dumb mistake and added the solution to the root of TFS. This isn't what I wanted, I want to add multiple projects under different folders. So I deleted the files from TFS and started over. Now when I try to add the same solution to VSO it fails, and gives me this error message:
A project DAFT.sln that you are attempting to add to source control
cannot be added because the item Publish-WebApplicationWebsite.ps1 is
already under source control at the selected location.
Bear in mind that I deleted this info and it no longer exists on VSO. I don't see the above file anywhere on VSO? What did I screw up now?

How can I move/copy a TFS Build Definition to a new Team Project?

We recently migrated to TFS 2010, and have created a new Team Project. (The old one was created in 2005, and seems to be missing key metadata to allow full functionality in 2010). We've copied all our source, and have figured out how to copy our work items to the new team project, but we can't figure out how to migrate our build definitions.
Is there a way to do this, or will we have to re-create them manually?
Thanks!
[EDIT]
Jeff-thank you for the reply! After reading it, and more deeply considering my situation, I realize that my description (and probably my entire question) was flawed.
We originally upgraded our 2008 team project to 2010. It had previously been upgraded from 2005. Up to this point, we've been using CruiseControl.Net to manage our builds. One of our team noticed that our upgraded project was missing some key metadata, and theorized that stuff had not been added in the migration process, so he created a new 2010 team project and imported our source as a test. Now we have two 2010 team projects: the originally migrated one (that we're all using), and the "from-scratch" one.
In the meantime, I was experimenting with TFS Build on the originally migrated project. I created a dozen or so builds, and was refining them, but we haven't moved off of CC.Net yet.
The decision was made to start using the "from-scratch" project, so I was hoping to somehow copy the builds from one project to the other. I don't see a way to do that... there is no build proj file to copy (TFS seems to keep the build definitions internal in 2010).
Normally, when you upgrade to TFS 2010, any build definitions you previously had will be automatically upgraded with the associated Team Project. It sounds like, at least in your case, that your Team Project did not upgrade completely/correctly so you had to start over with a new Team Project.
To copy your build definition, you will need to:
Copy the TFSBuild.proj file(s) from your old Team Project to the new Team Project - under whatever version control folder makes sense.
Create a new TFS 2010 build and select the Upgrade Template (in the Process tab).
Set the Configuration Folder Path property to the location of the copied TFSBuild.proj file copied in step 1 above.
Fill in the remaining required settings.
Hope this helps.
There's been significant changes to how builds are done from TFS 2008 to TFS 2010. One of the reason's why it appears that 'stuff has not been added to the migration process' is because it just does not exist. Even upgrading from TFS 2005 to TFS 2008 had a bit desired in it's completeness.
Jeff provided some good guidance to use the Upgrade Template, this will actually call the tfsbuild.proj file that was carried over from TFS 2008.
As a good practice, you'll want to create a copy of the DefaultTemplate when a new build definition is created for a corresponding relationship. Do this while creating the build definition in the process part of setup. There is a detail expansion arrow that will allow you to create a new, which is a copy of the default, and name it whatever you like. Unless of course there will be absolutely no customization done to the build definition or all of the builds in that project will be following exactly the same steps. i.e.: dev_sso_ci (build definition) corresponds to dev_sso_ci.xaml in the BuildProcessTemplates folder.
Hope this helps too.

Resources