Could not load file or assembly 'System.ValueTuple'

前端 未结 18 1852
你的背包
你的背包 2020-12-08 18:02

I\'ve got a VS2017 project that compiles to a DLL which is then called by an EXE written by someone else. Both projects target .Net Framework 4.6.2. I rewrote one of my DLL

18条回答
  •  借酒劲吻你
    2020-12-08 18:47

    In my solution I found 2 different trouble maker. Either in the App.config or Web.config file:

    1. Version mismatch: The version installed via NuGet did not match the version in the config file. Solution: Change the version manually in the .config file.

    2. Duplicate entries: I found duplicate entries for ValueTuple. In my case one for 4.0.3.0 and another one for 4.5.0. Removing the older entry solved the issue.

    In another case I managed to fix the issue by removing unneeded references and getting rid of the ValueTuple NuGet package altogether.

提交回复
热议问题