简体   繁体   English

启动时加载主窗口XamlParseException的异常

[英]Exception on loading main window XamlParseException on startup

getting and Exception thrown: 'System.Windows.Markup.XamlParseException' in PresentationFramework.dll additional information 'The invocation of the constructor on type 'Wpf.Controller' that matches the specified binding constraints threw an exception.' 获取并引发异常:PresentationFramework.dll中的'System.Windows.Markup.XamlParseException'其他信息'与指定绑定约束匹配的类型为'Wpf.Controller'的构造函数的调用引发了异常。

Where Wpf.Controller is just a controller class.... so, I've re-targeted a WPF app as a dll, and have some environmental WPF applications using that XAML dll as the core UI. Wpf.Controller只是一个控制器类...。因此,我将WPF应用程序重新定位为dll,并使用XAML dll作为核心UI的一些环境WPF应用程序。 (minor changes to wpf.exe to help deployment). (对wpf.exe进行了少量更改以帮助部署)。

This error isn't happening will all the wpf.exe projects... (3 of the 5 are running without issue - the code is the same, outside some app.config and properties which have deployment differences. 所有wpf.exe项目都不会发生此错误...(5个项目中的3个正在运行,没有问题-代码相同,除了一些app.config和具有部署差异的属性之外。

When I re-targeted the WPF.exe to a wpf.dll, I didn't change it's name, so the wpf.dll and wpf.exe project clashed. 当我将WPF.exe重新定位到wpf.dll时,我没有更改它的名称,因此wpf.dll和wpf.exe项目发生冲突。 Once I renamed the dll to something else, it all worked. 一旦我将dll重命名为其他名称,它就可以正常工作。 Error made sense, but a gotcha. 错误是有道理的,但要注意。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM