Reputation: 418
I'm trying to get an old project to run on the new .NET VM, I've gotten through a few obstacles at this point. For a while I couldn't get DNVM to recognize my project as a .NET project, until I added a couple missing files from a sample project, and used dnvm . kestrel
instead of dnvm . web
and then I got back about 80mb worth of C# errors...
So I went from not being recognized as a project, to being recognized as a shitty one :/
Anybody beat this level yet? Thank you in advance.
Upvotes: 1
Views: 120
Reputation: 141672
dnvm . kestrel
, do you mean that you tried dnx . kestrel
? dnu restore
to download dependencies before running dnu . kestrel
?There are three command line programs that you will use to run a .NET 5 app, and it's easy to confuse them. dnvm
is the version manager, dnu
is the utility, and dnx
is the runtime. It's the runtime not the version manager that you use from your project's root folder to start the kestrel web server.
Here's the very short version of how to start up a .NET 5 app. After using dnvm
to install .NET 5, and after creating a project (and optionally a solution,) you need to use both dnu
and dnx
in this sequence.
dnu restore
. This will download your project's dependencies. If you have only a project and no solution, run this from your project's folder instead.dnx . kestrel
to run the web application in the browser.It sounds like you did number (2) without having first done number (1).
Let me know whether you're able to reach the next level. Also, have you read these articles?
Upvotes: 0