‘System.IO.IOException’ occurred in PresentationFramework.dll
使用MVVM框架创建WPF应用时,移动过**Window.xaml
文件到View文件夹,运行时回报'System.IO.IOException' occurred in PresentationFramework.dll
异常。
解决
<Application x:Class="MVVMDemo.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:MVVMDemo"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>
修改App.xaml
文件中的StartupUri
StartupUri="View/MainWindow.xaml"
参考:An unhandled exception of type ‘System.IO.IOException’ occurred in PresentationFramework.dll