Reputation: 681
I have the following error message:
An unhandled exception of type 'System.IO.IOException' occurred in PresentationFramework.dll
Additional information: Cannot locate resource 'Sections/MainWindow.xaml'.
I created folder and then moved my MainWindow.xaml into the folder named Sections. I got the error and then found the question that is already on here about making sure that I change my starupURI to Sections/mainwindow.xaml
However I'm still getting the error message and I don't know why.
Edit: So i ran the code again, not making any changes and now I'm getting this
A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
Additional information: 'Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' Line number '5' and line position '54'.
The code that I have at that position:
<Window x:Class="CTaC_Information_System.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
WindowStartupLocation="CenterScreen"
Title="CTaC Information System" Height="828" Width="1486.5" Icon="AISLogov2.ico" Loaded="Window_Loaded" FontFamily="Georgia">
The red line is under the >
. I went to the end of my code and added the </Window>
because for some reason I was still getting the error message.
All help is greatly appreciated.
Upvotes: 0
Views: 2783
Reputation: 419
For me this happen, when i moved classes MainWindows.xaml and App.xaml from root folder to /UI folder.
When i moved them back - all become normal again, error gone.
Upvotes: 0
Reputation: 5074
I think the second error is being caused by your icon. Try removing that bit of code and re-compiling to check if that isolates the problem. You could try changing the icon image to a .png
rather than .ico
.
Upvotes: 2