Views
ASP.NET Core - InvalidOperationException: Cannot find compilation library location for package 'Microsoft.Win32.Registry'
TL;DR Add following line to your .csproj file: false Introduction I was publishing a project I am working on to web server (Linux) and I had an issue with Razor Pages. However, it seems that this error occurs only when you precompile your Razor views (MVC views, Razor Pages). Why would you do that? Well, precompiling your views results in a smaller published bundle and faster startup time.