开发者

My application won't launch giving me some random error error when I haven't touched anything

I'm having trouble debugging my application because I can't even run it. I haven't changed anything only added a picture to a folder in my solution explorer and now I can't even press F5 to debug it.

Here's the error:

System.Windows.Markup.XamlParseException was unhandled

Message=" Can't create instance of 'MainWindow' in the assembly.'testapp1 v0.1[WPF], Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation. Error in markup file 'MainWindow.xaml' Line 1 Position 9."

Source="PresentationFramework"

LineNumber=1 LinePosition=9

I know this isn't much information but I'd really like to know if there is something clear I should be looking for. This is the first something like this has happened开发者_JAVA技巧 to me.


Edit: Here's the First lines of XAML code which are supposedly breaking my app.

<Window x:Class="Testapp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Tome of Newerth" Height="700" Width="900">


What happens when you remove the picture? Does it work again?

From the code you've posted it indicates that the error is in the code behind as it can't create an instance of the class.

What does the constructor of your MainWindow class look like.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜