Could not load file or assembly “System.ValueTuple, Version=0.0.0.0” or one of its dependencies

后端 未结 3 1236
渐次进展
渐次进展 2020-12-14 17:34

I tried to update my project to .NET Standard 2.0 and during testing I got catch an exception:

System.IO.FileLoadException: \'Could not load file or a

3条回答
  •  忘掉有多难
    2020-12-14 18:03

    I solved this problem by enabling Automatic Binding Redirection in my .NET Framework 4.7 project (that references .NET Standard 2.0 library). Binding redirection can be enabled by manually editing project's .csproj file and addind following snippet a child of Project element:

    
      true
      true
    
    

    Visual Studio then during build generates neccessary assembly redirections to project's app.config, similar to this:

    
      
        
        
      
    
    

    allowing correct assembly to be loaded.

提交回复
热议问题