Follow a .NET Core tutorial to add some .NET content to my portfolio on GitHub.
Googled for the dotnet core SDK. Followed link to Linux binaries.
Downloaded on 2018-08-13:
generic@framer:~$ sha256sum Downloads/dotnet-sdk-2.1.302-linux-x64.tar.gz 2acaed79dfb54afd583a6316be63c4e497bad401e96477e4182a35960c4e1fa9 Downloads/dotnet-sdk-2.1.302-linux-x64.tar.gz
Prerequisites:
generic@framer:~$ mkdir -p $HOME/dotnet && tar zxf ~/Download/dotnet-sdk-2.1.302-linux-x64.tar.gz -C $HOME/dotnet generic@framer:~$ export DOTNET_ROOT=$PATH:$HOME/dotnet generic@framer:~$ export PATH=$PATH:$HOME/dotnet
Create a Razor web app:
generic@framer:~/src/framer/RazorTute$ dotnet new webapp -o RazorTute generic@framer:~/src/framer/RazorTute$ cd RazorPagesTute generic@framer:~/src/framer/RazorTute$ dotnet run
Add obj/Debug to the .gitignore file
Add project to repository:
generic@framer:~/src/framer/RazorTute$ git init . generic@framer:~/src/framer/RazorTute$ git add * generic@framer:~/src/framer/RazorTute$ git commit
EntityFrameworkCore is needed:
generic@framer:~/src/framer/RazorTute$ dotnet add package Microsoft.EntityFrameworkCore.Sqlite
- There were a series of errors with the Razor page scaffolds::
- Pages/Location/Details.cshtml.cs(21,16): error CS0118: 'Location' is a namespace but is used like a type [/home/generic/src/framer/RazorTute/RazorTute.csproj]
TODO: Find cause. Hypothesis - name clash with built in, passing unqualified model name to scaffolding.