无法加载文件或程序集 NLog

Joh*_*ohn 3 c# wpf xaml

错误:http : //pbrd.co/1vTqOTb

我的 WPF 项目中的 XAML 出现错误:

"Error  11  Could not load file or assembly 'NLog, Version=2.0.0.0, 
 Culture=neutral, PublicKeyToken=5120e14c03d0593c' or one of its dependencies. 
 The system cannot find the file specified. MainWindow.xaml 73  9   TestApp"
Run Code Online (Sandbox Code Playgroud)

我已经搜索了整个解决方案,但找不到任何“NLog” 我曾尝试将 NLog dll 添加到解决方案中的每个项目,但没有任何区别。任何的想法?

Joh*_*ohn 5

原来是 NLog 是 .Net 4.0,项目是 .Net 4.5 我将项目更改为 4.0,将另一个依赖项目更改为 4.0 及其工作。谢谢!