bmi
bmi

Reputation: 811

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

Application is unable to load ANY xaml. Nor create empty window "var abc = new Window1();"

Error message is still the same:

An exception of type 'System.IO.IOException' occurred in PresentationFramework.dll but was not handled in user code

Additional information: Cannot locate resource 'wvmlog.xaml'. (for wvmlog.xaml) Exception occur on InitializeComponent();

These objects are created without error on another PC - so problem is not in Project settings.

Do not help:

Do Help:

Problem is at one PC with Win 7, 64-bit. The problem occur suddenly after some xaml window renaming, but these changes was many times undo-ed, but problem remain.

Maybe some OS damage, or some wpf/.net caches?

Why wpf/.net show such error on project which is compiled without error - so compiler KNOW that these resources does exist?

Any help is appreciated.

Upvotes: 3

Views: 11210

Answers (1)

user3008146
user3008146

Reputation:

I had this very same issue. What design pattern are you using?

The issue I had was when I changed the output window ie created a new one and deleted the old one.

I am using MVVM so I created the window in the View folder.

If this is your issue, your APP.XAML will look like:

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

You then change the startURI to wherever your new window is stored. ie in the view folder.

StartupUri="Main/MainWindow.xaml"

This helped for me. Hope it's the solver to your problem.

Upvotes: 17

Related Questions