I set up my solution according to this article. I left out some of the things because according to this, ASP.NET Core 2.0 precompiles views by default. In the end, I publish it
I usually just add these to the .csproj. No need to copy files or any of that mess.
.csproj
netcoreapp2.2true true ...