我有一个简单的WPF应用程序,我正在尝试启动。我正在遵循Microsoft Pattern and Practices“WPF复合应用程序指南”。我遵循了他们的指示,但是我的WPF应用程序立即失败,并显示了一个"TypeInitializationException“。
InnerException属性显示“'System.Windows.Navigation.BaseUriHelper‘的类型初始值设定项抛出了一个异常。”
这是我的app.xaml:
<Application x:Class="MyNamespace.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
</Application.Resources>
</Application>
下面是我的app.xaml.cs (在"public App()“抛出的异常):
public partial class App : Application
{
public App()
{
Bootstrapper bootStrapper = new Bootstrapper();
bootStrapper.Run();
}
}
我已经将"App“类设置为项目中的启动对象。
到底是什么误入歧途?
https://stackoverflow.com/questions/58425
复制相似问题