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-x86.1.0.0-rc1-update1). No connection could be made because the target machine actively refused it [::ffff:127.0.0.1]:63106”.
[Update: DNX Commands will be replaced with dotnet cli in RC 2 release.]
Also read,
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.
When I run the command “dnvm upgrade” in powershell, I get the error (below).
Can you please help? I tried a lot of solutions but nothing worked.
The term ‘dnvm’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ dnvm upgrade
+ ~~~~
+ CategoryInfo : ObjectNotFound: (dnvm:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
When I get this error, I do the following. Without closing the studio shut down the current project and then re-open it using the menu file->Open solution. And it works.
This works for me: Open a command prompt and run “devenv /setup”
Thanks a lot, it works with “dnvm upgrade” command
Thanks,
1. dnvm update-self
2. dnvm upgrade
I am run both command respectively in the project directory and it work for me.
Thanks again.
thanks
You saved my day 🙂 Thanks
Is there any permanent fix for this issue? like its a single command to execute but still it makes me to blieve something is wrong and it should work built in.
I am glad that it helped you. Regarding your question, I didn’t find any other way. But I think this should be fixed in future release.
Thank you very much. It’s working for me.
Glad that it worked for you.
Thank you very much. I have been redirected here by one of the github user “https://github.com/aspnet/Tooling/issues/358”. This solution did help and saved my day.
Glad that it helped you.
Worked for me. Had to run from project root.
Thank you so much it worked
The strange behavior is that when this error occurs than all the references are gone ..so what I do is to load the project twice and the second time it loads all the references and no error occur. First load the project than go to the start page and click the project from recent projects it reload the project perfectly.
I deinstalled dnvm and then did dnvm install latest
1. dnvm list
2. deinstall it all
3. dnvm install latest
error doesnt show anymore for now, I’m not sure if it truelly fixed it
cheers
dnvm upgrade worked. thanks
note that I ran it from the project directory …\src\projectname
Thanks for your feedback. I am glad that it helped you.
Thank you it worked
Thanks for stopping here and putting your comments. I am glad that it worked for you. Keep visiting and follow us on social platforms.
I followed every step in your blog, still have no luck
Hi Vincent,
Thanks for your feedback. Did you try both the commands?
dnvm update-self
OR
dnvm upgrade
Did these commands executed successfully? If not, then please fix that.
Well, these commands do the magic for me. There might be some other workaround for this problem. I will see if I can find something else and keep you posted. Meanwhile, if you find any solution, please share with us.