"构造上键入'TestWPF.MainWindow'符合指定绑定约束抛出一个异常调用" - 如何解决这一问题? [英] "The invocation of the constructor on type 'TestWPF.MainWindow' that matches the specified binding constraints threw an exception."- how to fix this?

查看:303
本文介绍了"构造上键入'TestWPF.MainWindow'符合指定绑定约束抛出一个异常调用" - 如何解决这一问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与WPF工作。当我试图声明 SQLiteConnection 中的代码,问题就出现了 -

I'm working with WPF. When I'm trying to declare SQLiteConnection in the code, the problem arises-

The invocation of the constructor on type 'TestWPF.MainWindow' that matches the specified binding constraints threw an exception.

InnerException: Make sure that the file is a valid .NET Framework assembly.



谁能告诉我,如何解决它?

can anyone tell me, how to fix it?

推荐答案

我在的app.config 添加以下内容,

<configuration> <startup useLegacyV2RuntimeActivationPolicy="true" /> </configuration>



我发现这个通过社区除了用户的文章的 =https://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US& k = k%28EHFILELOAD%29&安培; RD =真正的>
故障排除例外:在MSDN上System.IO.FileLoadException

I found this via a community addition by user FCAA below the article " Troubleshooting Exceptions: System.IO.FileLoadException" on MSDN.

这篇关于&QUOT;构造上键入'TestWPF.MainWindow'符合指定绑定约束抛出一个异常调用&QUOT; - 如何解决这一问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆