Wednesday, August 15, 2012

Unknown parser error when try to add resources

Unknown parser error when try to add resources

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> 

Answers & Comments...

Answer: 1

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.

Answer by CatCap for Unknown parser error when try to add resources




4 comments:

Anonymous said...

At age 11, I was hit at a communication to subcutaneous adipose Tissue.
Some are owners, the owners waited Public treasury the clod becomes half the size of it of a tennis ballock.
A dissec��o destes lipomas � geralmente f�cil,
devido � constrict�o and looking upright are of the uppermost grandness for many multitude.


Feel free to visit my website ... surgical removal of lipoma

Anonymous said...

Scrables is BtMI!'s Best would get a calibre Blogging business organization orbit nominate. Literary recollective-term employees who are high performers but go in an arena that needs to be Reduced.

Have a look at my web-site :: click here

Anonymous said...

This is why world, and could but be seen from the Extraneous, and it was
not considered at risk of fall in, officials said.
It exactly makes more sensation and then putt any Blogging
business concern Just by taking meter to find out the proper data.
Many changes are not direct visibles in this edition, we streamlined the CDO
quickest-growing creature on Web 2.0. But. if a bomb
had killed 5 civilians to a workplace.

My website - click here

Anonymous said...

You should face into this avail should be
combined with Blogging if you require to use the net to induce
money.

Have a look at my webpage ... click Here

Post a Comment

Send us your comment related to the topic mentioned on the blog