Mvc: Publish failed after upgrading to 2.0 RTM

Created on 15 Aug 2017  路  5Comments  路  Source: aspnet/Mvc

In my projects, modules are dynamically loaded at runtime, and I need to turn off PrecompiledViews by adding

    <EnableDefaultContentItems>false</EnableDefaultContentItems>
    <PreserveCompilationContext>false</PreserveCompilationContext>

I worked fine, but after upgrading to 2.0 RTM. I got the following error

Severity Code Description Project File Line Suppression State
Error The command ""dotnet" exec --runtimeconfig "C:\WebApplication15\bin\Releasenetcoreapp2.0\WebApplication15.deps.json" "C:\Program Filesdotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.mvc.razor.viewcompilation\2.0.0\buildnetstandard2.0\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.dll" @"obj\Releasenetcoreapp2.0\microsoft.aspnetcore.mvc.razor.viewcompilation.rsp"" exited with code 1. WebApplication15 0

Most helpful comment

Add:

    <MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>

All 5 comments

Add:

    <MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>

It works, thanks

Awesome! Thanks alot

Where do you add that? Which file?

@nmg196 in your project right-click and Edit your csproj. Then in <ProperyGroup></PropertyGroup> add it. Regards

Was this page helpful?
0 / 5 - 0 ratings