Asp.net Core 2.0 with .net framework 4.6.1 - Cannot find reference assembly '.NETFramework/v4.6.1/Microsoft.CSharp.dll

Same issue was resolved when MvcRazorCompileOnPublish was added to .csproj file.

Give it a try.

<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>

I noticed if you have the Views folder included with the compiled View.dll when you start your IIS pool, you get this error. I was doing this on purpose for a short term work around hack.