Could not load file or assembly 'WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies

前端 未结 18 1745
夕颜
夕颜 2021-01-31 07:02

I have an MVC4 Web API project. While running the service project I am getting an error

Could not load file or assembly \'WebGrease, Version=1.5.1.25624,

18条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-31 07:25

    Here is what I did to get around it,

    1. I saved a copy of the Web.config file of my current (corrupted project) to "Corrupted-Web.Config". and close the project solution.
    2. Created a new application with the same type of my courrpted project. called it ProjTemp.
    3. Save and Run the "PorjTemp", then Save a copy of the Web.Config to "OrigTemp_Web.config"
    4. Close the Web.config files.
    5. On the "ProjTemp" open Tools --> "NuGet Package Manager" --> "Manage NuGet Packages for Solutions" ---> Select to Update all related installed packages. 6 Now Open the newly updated Web.config file. Copy the get the info from the Updated "" Starting from "

    
              
                 --- Copy this section to replace in the corrupted file.---
           
    
    

    1. Save your project. Rebuild and Run. Hope this will help! ....

    Here is the corrected one for example, VS2015.


    
               
                     
                            
                            
                     
                    
                            
                            
                  
                  
                            
                            
                  
                            
                            
                    
                            
                            
                    
                    
                            
                            
                     
                     
                            
                             
                      
                      
                             
                            
                       
              
      
    

    that's what I have done to fix it, Solution on Github Sami, Oweis 4 Computer

提交回复
热议问题