MVC 4 @Scripts “does not exist”

后端 未结 24 2006
长发绾君心
长发绾君心 2020-12-12 11:20

I have just created an ASP.NET MVC 4 project and used Visual Studio 2012 RC to create a Controller and Razor Views for Index and Create Actions.

24条回答
  •  青春惊慌失措
    2020-12-12 12:03

    I had the same problem and I used WinMerge to help me track this down. But as I researched it more, I found that Rick has the perfect blog post for it.

    Summary:

    • Add to both web.config files
    • Run Install-Package -IncludePrerelease Microsoft.AspNet.Web.Optimization
    • Update Bundling code
    • Update Layout file
    • The last step is to update 10 other libraries. I didn't and it worked fine. So looks like you can procrastinate this one (unless I already updated 1 or more of them). :)

提交回复
热议问题