Could not load file or assembly 'System.CodeDom, Version=4.0.2.0... or one of its dependencies. The system cannot find the file specified

winform could not load file or assembly 'System.CodeDom, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system can not find the file specified.

trigger reason

When installing IronPython in NuGet, it was always prompted that there was a lack of dependencies, so I directly changed the dependency behavior under the installation and update options from "minimum" to "ignore dependencies" during installation, resulting in an error when the program was compiled.
![Insert picture description here](https://img-blog.csdnimg.cn/ea62fbc3834f4b969806f8f9d78ac8fc.png

Solution

Find the installed solution package, scroll down with the mouse, and you can see its dependencies:
insert image description here
find the reason, you need to change the NETFramework of the project to V4.6.2 to support
insert image description here
changing the target framework to .NET Framwork 4.6.2 and then compile, the problem solve.

Guess you like

Origin blog.csdn.net/qq_35761934/article/details/132046252