Raspberry PI ASP.NET Core MVC

Sign in to queue

Description

Last week we highlighted Laurent Kempé's, Hello World .NET Core Pi, post. This week we continue to follow his work and get ASP.NET Core running on a Raspberry Pi too...

ASP.NET Core MVC app running on Raspberry Pi

After running a first console app on my Raspberry Pi 3, I had to try ASP.NET Core and API. Two weeks ago when I posted “.NET Core console app running on Raspberry Pi”, I could make API working, but I had no chance with MVC. Today it worked!

This post will describe all steps I had to go through to have an ASP.NET Core MVC application running on my Raspberry Pi 3. I will not repeat the steps needed to install the Ubuntu MATE on the Pi, neither how to install the different tools, e.g., SSH Server, Putty, WinSCP… to have an efficient development environment, you can check the previous post for that.

Again you will need to install the .NET Core 2.0 SDK on your Windows machine. This time I used Windows x64 2.0.0-preview1-005791 which I downloaded as a zip. I unzipped it, and then I added it to the System Path.

...

Next, we will create the ASP.NET Core MVC project using the following ...

Now we have to adapt the mvc.csproj like this ...

Then we need to run the restore command ...

Then we publish  ...

Now we are ready to display our first web page using ASP.NET Core MVC running on the Raspberry Pi 3. The first time your browse the site, it will be slow because the Raspberry Pi needs to compile the Razor Page, but you will finally end in front of

image

[Click through to read the entire post]



The Discussion

Add Your 2 Cents