While working with ASP.NET 5 application using Visual Studio 2015, you may encounter an dnx project start up error in VS 2015 when you try to open a project. The error message says “The following error occurred attempting to run the DNX design time process (dnx-clr-win-x22.214.171.124-rc1-update1). No connection could be made because the target machine actively refused it [::ffff:127.0.0.1]:63106”.
Fix for dnx project start up error in VS 2015
When you get the error and click ok, your project will open but there will be on debug profile to work with. So you can’t debug your code.
I did following things to fix this error.
- Restarted Visual Studio & system couple of time. – [Didn’t work]
- Installed ASP.NET RC 1 – [Didn’t work]
- Uninstalled VS 2015 and installed it again – [Didn’t work]
- And finally cleaned up my system and installed VS 2015 again – [Didn’t work]
But none of them worked. But while playing to fix this issue, I tried one thing and that worked. So before you open your project, run any of the following command on command prompt.
dnvm update-self OR dnvm upgrade
Once the command is executed and completed, try to open the project and you will not get the error now. Strange but worked. This should work for all your projects. You don’t have to do it for all your projects. After starting your system, just do it once. I assume it is something to do with environment variables but I didn’t notice any change in environment variable before and after running the command.
This is a temporary solution but it works. Microsoft is yet to release the fix for this and I believe it is something to do with VS 2015 setup.
Updated on 3-Feb-2016
If any of the above solution is not fixing the problem for you, then please try to run these commands from the project directory
…\src\projectname. This solution was suggested by one of the reader “SAM” and he has also put the same in comments.
Please put your comments if this solves this issue for you and if you find any other way to fix this.