Tooling: The following error occurred attempting to run the project model server process (1.0.0-preview2-003121).

Created on 29 Jun 2016  ·  63Comments  ·  Source: aspnet/Tooling

The link on https://www.microsoft.com/net/core#windows under link .NET Core for Visual Studio official MSI Installer. still says Preview 2 – “DotNetCore.1.0.0-VS2015Tools.Preview2.exe” Is this correct?

What do I need to get VS2015 working with ASP.NET Core? I’ve installed VS2015 update 3. Then it told me to install the above link so I did. When I create a ASP.NET Core project in VS2015 I get the message once the wizard completes and everything appears in the solution explorer. I also get this when debugging the project.

The following error occurred attempting to run the project model server process (1.0.0-preview2-003121).

Unable to start the process.

The project model provides intellisense, build and reference information to Visual Studio and without it your experience will be very limited. I rebooted machine after 2015 was installed. I did find the initial SDK installed so I removed it and repaired the setup from “DotNetCore.1.0.0-VS2015Tools.Preview2.exe”.

Any way to diagnose this problem?

Also when I click compile I get:
1> C:\Program Files\dotnet\dotnet.exe build "E:\Code Workbench\Web\ASP.NET Core\Portal2016.1\src\Portal2016.1" --configuration Debug --no-dependencies

See the attached zip of what I get generated by the project wizard.

This is my development environment at work. I have had different issues updating Visual Studio 2015 to Update 3 and creating ASP.NET Core projects.

Portal2016.1.zip

Update

This happens for all .NET Core Project Types - ClassLib, Console, and ASP.NET.

TFS Tracked

Most helpful comment

Our Visual Studio 2015 just got hosed with this error after installing the 2017 RC that was just released. Opening our project in 2015 now throws the following error:

"The following error occurred attempting to run the project model server process (1.0.0-preview3-004056)

Unable to start the process.

The project model server process provides intellisense, build and reference information to Visual Studio and without it your experience will very limited."

Additionally the solution above doesn't work because "dotnet restore --no-cache" fails with:
an "error MSB4019: The imported project "C:\Program Filesdotnet\sdk\1.0.0-preview3-004056\Extensions\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk."

How do we get un-mangled??

UPDATE:
We currently worked around this with @pealmeid's solution. Here it is again with the previous version:

Edit global.json to explicitly point back to the old .NET version:

{
    "projects": [ "World.NET", "." ],
    "sdk": {
        "version": "1.0.0-preview2-003131"
    }
}

All 63 comments

I get something similar: The following error occurred attempting to run the project model server process (1.0.0-preview2-003121) No connection could be made because the target server actively refused it

I get this as well.

While still on vs update 2, and dot net preview 1, I got it the first time I opened my solution but closing VS and restarting it would make it go away.

Now I consistently get it while opening my solution every time with vs update 3 and dot net preview 2.

Okay, while I could do a non-incremental build, and didn't seem to be able to debug or anything else, I did type "dotnet run" in the console.

C:\RMT\VCS\_E\v.m\src\v.m>dotnet run
Project v.m (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.
The specified framework 'Microsoft.NETCore.App', version '1.0.0-rc2-3002702' was not found.
  - Check application dependencies and target a framework version installed at:
      C:\Program Files\dotnet\shared\Microsoft.NETCore.App
  - The following versions are installed:
      1.0.0
  - Alternatively, install the framework version '1.0.0-rc2-3002702'.

So looking at project.json, most of the versions had been updated, but not:

    "Microsoft.NETCore.App": {
      "version": "1.0.0",
      "type": "platform"
    },

Which before I changed it to "1.0.0", referred to: "1.0.0-rc2-3002702". I was directed to look in the shared framework directory of the dotnet installation for the version, which was "1.0.0". Other than that the remaining problems are version conflicts which I need to manually resolve.

So now I can compile with errors, and debug, and this particular error has gone away for me.

@troydai, can you take a look?

cc @BillHiebert

Looks like there are two issues been reported here.

Issue 1, from original post, it seems that VS failed to locate dotnet process to start project model server. I'm not familiar with installer and WTE. I'll leave this to @BillHiebert

Issue 2, project model server refuse connection for the first start up. Issue is probably caused by dotnet local cache initialization. @BillHiebert knows the context.

@troydai @andez2000 @barrytang Any update on this one ? I'm stuck with the same problem since the release of preview 1.0.0 last week ! I'm the only one at my job to get this problem, also the only one to have previously installed every RC released...

@nboisvert What do you have in your c:\program filesdotnet\sdk folder? How many versions of the sdk do you have?

@BillHiebert I uninstalled all previous RC installed, so the only folder i have in c:\program filesdotnet\sdk is 1.0.0-preview2-003121. The exact error message i get is here

aspnetcore

Visual Studio is running as admin.

I get this on new project creation AND on opening existing .net core project created by one of my colleague.
The new project created then has no references and cannot be started since VS doesn't recognize the project.

thanks for your time

@nboisvert that error generally means the dotnet.exe failed to start. You can run the project model server from the command line as follows.

  1. Start notepad.exe and get its process id from taskmgr. This is only needed since the project model server needs a parent process (it terminates itself when the parent process ends). Leave it running
  2. cd to your project folder
  3. run the following command line. The port can be any unused port (the one below is probably ok). replace the -host-pid with notepads process id from step 1. --host-name can be anything.
    "c:\program files\dotnet\dotnet.exe" projectmodel-server --port 1348 --host-pid 2816 --host-name abcdefg

Do you see any errors in the output window?

@BillHiebert No errors, process started correctly. The problemes really seems to be VS unable to start it. Tried uninstall VS and reinstall it this morning with no success.

The event viewer indicates that dotnet.exe, version : 1.0.1.4500 is in error, caused by module coreclr.dll, version : 1.0.24214.1

@nboisvert Are there any other instances of dotnet.exe on your path? From a command prompt type "where dotnet.exe".

@BillHiebert For me everything you have said I have tried. I only have one dotnet.exe in C:\Program Filesdotnetdotnet.exe with "where dotnet.exe"

I tried the notepad.exe with dotnet.exe and that works ok. Just getting the error running from Visual Studio 2015 as per original post and @nboisvert screenshot when I load the project.

@BillHiebert @andez2000 Finally found out what the problem was (for me). I had a test framework extension called 'JustMock' installed on my Visual Studio. Disabling the extension fixed my problem.
They'll have to fix this on their side. Thanks @BillHiebert for your time on this one !

@nboisvert excellent hunting around. How did you figure that? I have JustMock too!!! I've uninstalled and it works now. Have you raised this with Telerik? Yep thanks @BillHiebert

@nboisvert. Thanks for tracking this down. I was completely out of ideas to try next. I've never seen a case where it succeeds from the command line but does not work from VS.

Also had the same thing happen. I sent in a Telerik bug report. will wait and see what they say.

i also get the dialog box reporting the project model server process error. It only happens periodically when I open a large project first thing in the morning. I close VS and then re-open the project. The 2nd time is fine.

TFS Bug#241363

Since this has been tracked down to being the JustMock tool, closing the issue

I still get this problem the first time I run VS2015 Community in the morning. I do not have JustMock installed.

I also get the same and I don't have JustMock

Reopened for further investigation, sorry about that

In my case, I got an error like the one described here

In my case the problem seemed to be related to the fact that the build was failing. Is it ok that donet restore is related to the success of the build procedure?

I also get this error on a fresh windows installation. Installed Sql server 2016, Visual Studio 2015 Update 3. When installing the VS Tools i get the error (like everyone in my office also gets: http://www.ryadel.com/en/microsoft-net-core-1-0-0-vs2015-tooling-preview-update-2-fails-install-error-0x81f4000-fix/

I think try to create a demo project, and i can not run it due to the same error as listed on this page...I did not install anything else and i have no idea what the issue is. I did not have these issues when trying the RC's in the past on my work pc. We're off to a shaky start.

Hi @chrislyse, the latest update to VS 2015 Update 3 caused an issue to the .NET Core Tooling installer. This should be fixed now. Could you please try installing from https://www.microsoft.com/net/core#windows again? Thanks!

I get this as well.

vs2015 error

It seems that your error is similar to mine but gives you a different error: I have
baderror

@daramire, I know it might seem pointless to ask now, but can you verify what process 7840 was? Perhaps that can help with determining what's happening here, as I find your error is a bit more straightforward than mine. At least maybe we can get someone through this. Maybe then we can get others working as well.

@SliceofCheese, I gave up and ended up doing a clean install of windows 10, then a new install of vs2015 community. The error is gone now.

Same here with everything latest:
image
I've removed every single tool which had active "Uninstall" button. Uninstalled everything suspected to be somehow connected with VS tools. Nothing helps.

I am experiencing exactly same error. Nothing has helped as yet.

bug

I got the same error after updating all packages and installing latest SDK and Runtime versions.

I'm having the same error since upgrading to runtime version 003590.
I'm using Visual Studio 14.0.25425.01 Update 3.

vs

Update: I managed to make the project load by changing global.json to specify the previous version (in my case, 003246) as target SDK:

{
  "projects": [ "src" ],
  "sdk": {
    "version": "1.0.0-preview3-003246"
  }
}

The project will still not load if I don't specify a SDK or if I specify 003590 in global.json.

Apparently projectmodel-server was removed from the dotnet cli commands:

https://github.com/dotnet/cli/pull/3752 - Remove Project Model Server

What is the recommended way to proceed in this case? Thanks in advance.

Update: it seems it will be added back soon:

https://github.com/dotnet/cli/pull/4152 - Adding dotnet-projectmodel-server back

Working for me after latest update (SDK version 1.0.0-preview3-003599). Thanks.

Is everyone that's having this issue on Windows 8.1? I tested this problem on another computer, and this works perfectly fine on my laptop which is Windows 7. I don't have any other Windows 8.1 machines, and I've tried uninstalling this and reinstalling it on the windows 8 machine.

This worked fine on 7 the first try.

I should also mention that the Windows 8.1 machine seems to have success when I actually download the ISO and use that version instead of using the Online installer. So what might be in question is not the actual installer.

@SliceofCheese , In my case it's not working on Windows 7.

Yup I second @pealmeid Solution.

I had the same issues as everyone here so I decided to install the latest VS 2015 Tooling preview from the dotnet site and still that didn't solve the problem until I installed the latest .NET Core SDK for Windows and that did it!

Not sure if this helps, but to solve this tooling problems (1.0.0-preview2-003121) I typically do the following steps:

  1. Close solution (or close Visual Studio);
  2. Delete all project.lock.json files;
  3. dotnet restore --no-cache in the root directory;
  4. Reopen solution;
  5. Rebuild all;

Eventually I may manually delete all the bin or obj folders. The first step is very important to prevent Visual Studio to automatically restore (which normally keeps failing).

Our Visual Studio 2015 just got hosed with this error after installing the 2017 RC that was just released. Opening our project in 2015 now throws the following error:

"The following error occurred attempting to run the project model server process (1.0.0-preview3-004056)

Unable to start the process.

The project model server process provides intellisense, build and reference information to Visual Studio and without it your experience will very limited."

Additionally the solution above doesn't work because "dotnet restore --no-cache" fails with:
an "error MSB4019: The imported project "C:\Program Filesdotnet\sdk\1.0.0-preview3-004056\Extensions\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk."

How do we get un-mangled??

UPDATE:
We currently worked around this with @pealmeid's solution. Here it is again with the previous version:

Edit global.json to explicitly point back to the old .NET version:

{
    "projects": [ "World.NET", "." ],
    "sdk": {
        "version": "1.0.0-preview2-003131"
    }
}

I am experiencing the same condition as @marchy. Just installed VS 2017 RC.

I am also experiencing the same condition as @marchy. Also Just installed VS 2017 RC.

Same for me, just installed VS 2017 RC as well. For me I didn't have a global.json file, so I just added one to the solution root and the problem seems solved.

global.json:

{
    "sdk": {
        "version": "1.0.0-preview2-003131"
    }
}

This happened to me just after the installation of Visual Studio 2017 RC.

I had the same issue,
Found 4 SDK versions on the machine,
uninstalled all + VS tooling, installed latest from https://www.microsoft.com/net/core
now it works

My VS2015 installation was also hosed after the RC2017 install with the same error message as above. When trying to follow @gravity00 suggestion about a clean restore, above, I got this error message from the dotnet restore command:

error MSB4019: The imported project "C:\Program Filesdotnet\sdk\1.0.0-preview3-004056\Extensions\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

Adding the global.json as per @mehalick , above, worked. No more errors and intellisense is working again. (Had to do this for every project in the solution, for what it's worth.)

I had similar issue with "an attempt was made to access a socket in a way forbidden by its access permissions" message.

In my case is was caused by antivirus software, after uninstalling the issue is gone..

@thtp @t0xicDen @pealmeid
I disabled Windows Firewall service and that error is gone. I suggest to try messing around in the Inbound/Outbound rules.

Solution from @mehalick works! Anyone else think there's way too many places to update this kind of metadata? Seems like it should all be contained in the project.json/csproj/xproj file. Not strewn about everywhere in my solutions which is VS specific...

Anyone else think there's way too many places to update this kind of metadata?

The global.json file is the only place you can change the SDK version. It's not VS specific at all. It also affects the version used on the command line.

Would there be any sense in just having those kinds of settings live in the project?

Would there be any sense in just having those kinds of settings live in the project?

What happens when you have more than a single project? If you want, you can put a global.json in your project but that quickly falls over when you have more than a single project.

Would that not be the point? Couldn't each project legitimately prefer a different SDK?

And what I mean by "in project" is, get rid of global.json and move this setting into the upcoming csproj stuff. Then there'd be one less nuance to track.

That's very rare and projects within the same solution are usually interleaved. Global.json in the future may be renamed to something else (dotnet.json) but it'll have the same purpose, pick the version of the CLI itself. That has to be known befor even looking at the project file. By then it's too late.

I'm not so sure it is rare.

Just an off the wall thought, but couldn't you just have fields in the project file that are not intended for msbuild? Multiple tools can read that file - please tell me there isn't a 1:1 correlation of configuration files to departments. ;)

But further to it all.. When I add any community project to my solution so that I can debug through source, there's a risk of this coming up.
And I have to say, it's early days but since figuring out how to do it, I definitely see myself adding package projects to solutions more often.

Just an off the wall thought, but couldn't you just have fields in the project file that are not intended for msbuild?

Sure, it's a mega hack though and we shouldn't do that. To know what version of msbuild to launch, you shouldn't have to read an msbuild file 😄 .

Dunno, doesn't seem so bad put that way either. It isn't parsing in entirety. Just looking for specific information. The fact that they are contained in the same file would be immaterial to the tooling. You're subject to the same issues either way as well.

Same as @mehalick. His solution worked for me too _(add a global.json file)_
Edit: In fact, global.json was existing, it's not a web application project's file but a solution's file, who is at the root of the solution's folder, so you have just to edit it to target an older version of the .NET Core SDK.

I had the same error opening a solution (opennidict-core) in VS 2015 as @marchy:
"The following error occurred attempting to run the project model server process (1.0.0-preview3-004056)

Unable to start the process.

The project model server process provides intellisense, build and reference information to Visual Studio and without it your experience will very limited."

I uninstalled Visual Studio 2017 RC and restarted and that fixed the issue.

I couldn't add a global.json for my solution, or didn't know how (I tried). The post from kirill-chilingarashvili helped me figure out how to get past the error. I opened Add or Remove Programs, scrolled down to Microsoft .Net Core and saw two SDKs. I removed the newer one, SDK 1.0.3, and was left with just SDK 1.0.0 Preview. When I attempted to open the project I got a different error about a dll being missing. I'm guessing it was removed as part of the uninstall of the newer sdk or something. Next I just clicked Modify on the remaining .Net Core SDK from Add or Remove Programs and clicked repair. After it was done repairing I no longer got the error.

i am using a VPN i disactivated it and disconnected from WIFI and the error was gone and everything works fine

For me a similar error came down to a stray reference in my Path environment variable which pointed back to a prior .Net Core installation at C:\Program Files (x86)dotnet, which didn't seem to get cleaned up when I uninstalled. I removed the old path (and reinstalled .Net Core v1.1 SDK for good measure) and let the correct path at C:\Program Filesdotnet take over.

TLDR;
This problem comes up if you try to open a project.json-based solution in VS2015 after having installed a more recent .NET Core SDK version (e.g. by installing VS2017). Fix it by migrating your solution to the newest .NET Core, or by adding a reference to a SDK that contains the Project Model Server (version 1.0.0-preview2.1-3177 or older) in the global.json. (Make sure this .NET SDK is actually installed on your computer first.)

{
  "sdk": {
    "version": "1.0.0-preview2-1-003177"
  }
}

Another more drastic solution is to uninstall any .NET Core SDK/runtime newer than 1.0.0-preview2.1-3177, and reinstalling the SDK that your solution uses.

Was this page helpful?
0 / 5 - 0 ratings