The Dnx Runtime package needs to be installed. See

2019-02-08 03:40发布

I'm using Visual Studio 2015 Enterprise Edition and created simple Asp.net5 application. When I try to debug I'm getting this error.

The Dnx Runtime package needs to be installed. See output window for more details

Here are my project settings:

Solution DNX SDK Version : 1.0.0-beta5,
Platform : .NET Core
Architecture : x64 

(Tried with x86 as well)

Also followed the steps mentioned in this link but they didn't help.

Tried reinstalling VS2015 as well, but no luck. Any idea what I'm missing?

7条回答
时光不老,我们不散
2楼-- · 2019-02-08 04:26

I believe this is the same as a known issue and relates to not having the correct version of power shell installed. You can see the solution that helped me here

查看更多
The star\"
3楼-- · 2019-02-08 04:27

You need to update powershell tools for vs.

Tools -> Extensions and Updates -> Updates -> Visual Studio Gallery -> PowerShell Tools for Visual Studio 2015

查看更多
兄弟一词,经得起流年.
4楼-- · 2019-02-08 04:28

Run it from the NuGet console (in VS 2015: Tools > NuGet Package Manager > Package Manager Console)

dnvm upgrade
dnvm upgrade -r CoreClr
查看更多
在下西门庆
5楼-- · 2019-02-08 04:29

I tried accepted answer but no avail. I solved by typing below script in command prompt.

dnvm install 1.0.0-rc1-update1 -f

And I reloaded project and the problem solved.

查看更多
做个烂人
6楼-- · 2019-02-08 04:31

I got this error when I selected the Class Library (Package) project type from the Templates > Visual Studio C# > Web template structure (see image).

Class Library in Web template folder

What I really wanted was the "Class Library" which has the description "A project for creating a C# class library (.dll)". When I created a new project under this type, I did not get this error.

查看更多
可以哭但决不认输i
7楼-- · 2019-02-08 04:44

Found the solution at last !,

First run the command,

dnvm upgrade

if this command fails, with errors like the process is being used, run it again. And it will work after a few tries, i think the lock is due to some retires VS is doing to install the DNU properly. After this command run,

dnvm upgrade -r CoreClr

this command should restore your Core packages. It worked for me on some projects.

But if even after this the project is showing the same error, then close Visual Studio, reopen it and you will notice that the references are not loading. And it will ask your to look at the error list, which is good as once you look at the 35 odd errors, one of them give you a command to run, Run this command,

dnu restore

These three commands should get your project building.

查看更多
登录 后发表回答