After configuring .NET on Ubuntu Linux, I was looking at ways to start developing ASP.NET vNext projects on Ubuntu 14.04 Linux using Visual Studio Code. So, let’s jump in.
Since, there is no File -> New Project facility in Code till now, we can either use MonoDevelop or alternatives such as Yeoman, asp.net generator, bower and gulp.
Yeoman is a scaffolding tool for modern webapps. Install it, asp.net generator, bower and gulp using node, using the following command:
sudo npm install -g yo generator-aspnet gulp bower
Scaffolding the ASP.NET 5 project:
yo aspnet
FirstASPNET5
cd FirstASPNET5
dnu restore
dnx web
The project will start running at http://localhost:5000.
Side note: There seems to be some issue with running ASP.NET with VS Code.
In case of errors, upgrade npm. In my specific case, the <VERSION>
is 5.4.1
:
Make sure that Mono is latest using mono --version
:
Also check if dnvm
(.NET version manager) is latest or not using dnvm upgrade
, upgrade if not:
After every piece fits into the place, something like this will show up:
Originally published at xameeramir.github.io.