I have problem with adding resources to my wp7 project. I have added
<resources:LocalizedStrings x:Key="LocalizedStrings"/>
and after running application I recieve such XamlParseException: Unknown parser error: Scanner 2147500037.
Here is code.
<Application
x:Class="MyProject.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:vm="clr-namespace:MyProject.ViewModels;assembly=MyProject.ViewModels"
xmlns:resources="clr-namespace:MyProject.Resources;assembly=MyProject.Resources">
<Application.Resources>
<ResourceDictionary>
<resources:LocalizedStrings x:Key="LocalizedStrings"/>
<vm:ViewModelLocator x:Key="Locator"/>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="styles/globalstyles.xaml"/>
<ResourceDictionary Source="styles/UserStyles.xaml"/>
<ResourceDictionary Source="styles/DialogStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
<Application.ApplicationLifetimeObjects>
<shell:PhoneApplicationService
Launching="Application_Launching" Closing="Application_Closing"
Activated="Application_Activated" Deactivated="Application_Deactivated"/>
</Application.ApplicationLifetimeObjects></Application>
Resolve this issue by creating project MyProject.LocalizedResources instead of MyProject.Resources
xmlns:resources="clr-namespace:MyProject.LocalizedResources;assembly=MyProject.LocalizedResources"
This works well now.
Single word Resources in project name leads to the error! :(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With