The name "LocalizedStrings" does not exist in the namespace
Asked Answered
P

4

12

I'm suddenly getting this error in my WP8 project, which seems to originate from generated code. I have a previous working version and the App.xaml is identical.

<Application.Resources>
    <local:LocalizedStrings xmlns:local="clr-namespace:Bins" x:Key="LocalizedStrings"/>
</Application.Resources>

and the LocalisedStrings.vb file is intact.

Any ideas?

Phytoplankton answered 5/3, 2013 at 14:18 Comment(0)
P
19

I had the same problem when compiling the standard Windows Phone Databound App template. Following steps worked for me:

  • close all Visual Studio instances
  • if your Region settings in the control panel mismatch the Windows Phone SDK's language (e.g. German), set the Format in the Region settings to English (United States)
  • in your windows explorer, navigate to %LOCALAPPDATA%\Microsoft\Phone Tools\CoreCon\ and delete the contents of the folders 10.0 and 11.0
  • reopen Visual Studio and rebuild your project
Plebs answered 20/3, 2013 at 11:27 Comment(2)
This also worked for me, as I had the same problem just after upgradind my wp7 app to wp8.Trenchant
As a variation, i tried it the other way 'round: Setting my project locales to the same as my system (i did not want to change my system's region settings). My approach did NOT work.Sarsenet
H
1

I also faced this issue. the root cause for my problem is as below.

1) I referenced below in my code. but i haven't added the library( System.Xml.Serialization.xml). Add Reference and select System.Xml.Serialization.xml to include the dll.

System.Xml.Serialization 

2) I use an usercontrol called FileList.xaml in the mainwindow

FileList.xaml

<AM:time2str x:Key="time2str"/>

But i didnt add the class which inherits from IMultiValueConverter

MainWindow.xaml.cs(I missed the following code)

public class time2str : IMultiValueConverter
{

    public object Convert(object[] values, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
        ********************
    }

    public object[] ConvertBack(object value, System.Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
    {
        throw new System.NotImplementedException();
    }
}
Hon answered 12/2, 2014 at 6:37 Comment(0)
M
0

In my case I had this error after downloading and installing a fresh Visual Studio 2012 (the initial release version) and trying to build the default blank Windows Phone template project straight out of the box - it was only resolved by updating Visual Studio 2012 Express to Update 5.

Message answered 19/2, 2016 at 2:42 Comment(0)
M
0

I had this message when the mobile project platform was "ARM", I changed to "any CPU".

Go to:

  • Solution Project / Properties
  • Configuration Properties / configuration
  • Click in mobile project / Platform / "Any CPU".
  • Clean the project and run again
Mongrel answered 13/10, 2016 at 14:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.