DotNetOpenAuth causing a can not load Assembly System.Web.WebPages.Razor

后端 未结 3 527
没有蜡笔的小新
没有蜡笔的小新 2021-01-22 04:25

My local version of my code runs just fine. But when I do a web deploy I am getting the following exception:

Could not load file or assembly \'System.Web.

3条回答
  •  迷失自我
    2021-01-22 05:04

    Place this in your web.config file. It will cause the framework to redirect dependencies to the appropriate version.

    
      
        
          
            
            
          
        
      
      
    

    Edit from the future

    As I revisit this post because of a XML error pointed out in the above syntax, there are a few other places that most likely need updated as well. First, in the primary web.config, this line should be changed in the section to the following

    
        
    

    Also, there is a web.config in the views folder that should be updated to the following

     
        
          

    Basically, you want to identify all of the places that mention razor 2.0.0.0 and change those to 3.0.0.0 in addition to the assembly redirect. I believe I have all of those locations identified above.

    If you update the entire MVC framework, there is additional work that would need to be performed as well, but that is not the basis for the question.

提交回复
热议问题