The type 'System.Object' is defined in an assembly that is not referenced

后端 未结 6 1227
小蘑菇
小蘑菇 2020-12-30 18:49

I installed a Microsoft ASP.NET Web API Compression nuget package to my project and added a line to WebApiconfig inside Register method as shown in this link https://www.nug

6条回答
  •  自闭症患者
    2020-12-30 19:21

    This was a bit tricky because I also tried add the assembly reference to the project’s root Web.config file first, which didn’t help in my case. After that I did the same thing for the Web.config file that is located in the Views folder for my ASP.NET MVC project: Views\Web.config

      
         
            
              
            
         
      
    

    The above worked.

    Actually I already had one assembly reference System.Web.Mvc there before, so here’s the complete list for my ASP.NET MVC project.

      
        
          
            
            
          
        
      
    

提交回复
热议问题