Visual Studio 2013 can't create new project after renaming computer

0

After creating a new windows forms project i receive 2 errors.

Microsoft.VisualStudio.Web.PasteJson did not load correctly.

enter image description here

HRESULT: 0x80041010

enter image description here

The activitylog shows nothing of interest.

I have cleared the ComponentModelCache with no success. (C:\Users\%username%\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache)

c#
tfs
visual-studio-2013
asked on Stack Overflow Nov 17, 2014 by Steven Spyrka

1 Answer

6

Reason:

The error occurs after renaming the computer name and only while you are using teamfoundation server and have some active workspaces on your pc. The error even occurs if the new project should not be added to the source control or if you choose an other folder that is not controled by tfs.

Solution

1. Start the vs2013 command prompt

%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"" amd64

2. Write

tf workspaces /updateComputerName:xpc-zero /s:"https://mcondev.visualstudio.com/DefaultCollection"

Replace xpc-zero with your old computer name that you have changed and the Url to your TFS Collection.

After executing the command you get a list with all existing workspaces, the owner and the new computername.

Note

Visual Studio 2013 Output-Window shows: Workspace XPC-ZERO;Steven Spyrka does not reside on this computer. If this computer was recently renamed, the workspace may be updated by running 'tf workspaces /updateComputerName:oldComputerName'. The command that visual studio output shows without the "s" parameter does not work. You have to enter the complete url to the collection that you want to change. After that new projects can be created.

answered on Stack Overflow Nov 17, 2014 by Steven Spyrka • edited Nov 18, 2014 by Steven Spyrka

User contributions licensed under CC BY-SA 3.0