The type or namespace name 'Optimization' does not exist in the namespace 'System.Web'

后端 未结 7 496
花落未央
花落未央 2021-02-05 01:32

I am deploying a new website as my main site and it works beautifully.

All of my applications under the root url work as well, except for one. It is a legacy system (c#

7条回答
  •  伪装坚强ぢ
    2021-02-05 02:00

    I faced same problem after create a new area in MVC5. There is auto generate web.config file. Check your web.config file under Views folder there is a line

    
    
    1. if you need this then install it using following command.

      Install-Package Microsoft.AspNet.Web.Optimization
      

      at Package Manager Console like below

    2. If you think no need then simply remove line from following section in web.config file

      
         
         
         
         
         
                 
      
      

提交回复
热议问题