WPF Class-loading Error? Crashes on addition of custom class

Popup

An unhandled exception of type 'System.IO.IOException' occurred in
PresentationFramework.dll

Additional information: Cannot locate resource 'mainwindow.xaml'.

Output Log

'markless.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'
...
'markless.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll'
The thread 'vshost.NotifyLoad' (0x6b0) has exited with code 0 (0x0).
The thread 'vshost.LoadReference' (0x1fa8) has exited with code 0 (0x0).
'markless.vshost.exe' (Managed (v4.0.30319)): Loaded 'T:\#_\Programming\GitHub\markless\src\win2\markless\bin\Debug\markless.exe', Symbols loaded.
Step into: Stepping over method without symbols 'markless.App.App'
'markless.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
A first chance exception of type 'System.IO.IOException' occurred in PresentationFramework.dll
An unhandled exception of type 'System.IO.IOException' occurred in PresentationFramework.dll
Additional information: Cannot locate resource 'mainwindow.xaml'.
The program '[6268] markless.vshost.exe: Program Trace' has exited with code 0 (0x0).
The program '[6268] markless.vshost.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).

This happens every time I try to add a C# class to my project. It's WPF, and when I start a new project, it'll run fine with just the window. The minute I try to add actual functionality to the application, it blows up on me like this. (Oh, it builds, it builds fair enough - this is a runtime error.) Even if I then remove the class, the application will still not run correctly. Wat do?

Any help is appreciated.

There are many ways of going forward, but only one way of standing still. - FDR

EDIT: If you want to check out the repo, it's right here.

Answers


Additional information: Cannot locate resource 'mainwindow.xaml'.

Your App.xaml:

<Application x:Class="markless.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">

The problem is not the adding of any classes but the removal/renaming of the MainWindow which is still referenced here.


Need Your Help


About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.