Could not load file or assembly 'Microsoft.Practices.Unity'

前端 未结 7 1609
半阙折子戏
半阙折子戏 2021-02-12 23:58

I am trying to upgrade Unity to version (2.1.505.2), but when I run the application I get the following FileLoadException

Could

7条回答
  •  [愿得一人]
    2021-02-13 00:52

    The binding redirect should be pointed to a proper assembly version.

    For your case version 2.1.505.0 should be used!

    
        
        
      
    
    

    2.1.505.2 cannot be specified because of next reason:

    enter image description here

    Unity assembly 2.1.505.2 has different versions specified in the AssemblyFileVersion and AssemblyVersion.

    CLR is working with the AssemblyVersion and AssemblyFileVersion is ignored but NuGet is working with the AssemblyFileVersion!

    So that's why you have this difference!

    Please use AssemblyVersion

提交回复
热议问题