Could not find any resources appropriate for the specified culture or the neutral culture

后端 未结 30 1525
旧巷少年郎
旧巷少年郎 2020-11-28 20:15

I have two ASP.NET Web projects (ProjectA and ProjectB). When class in ProjectA is instantiating a class of ProjectB which uses a resource file Blah.resx, I get this error:

30条回答
  •  一向
    一向 (楼主)
    2020-11-28 21:21

    I have a WinForms application with a single project in the solution.
    Targeting .NET Framework 4.0
    Using SharpDevelop 4.3 as my IDE

    Sounds silly, but I happened to have the Logical Name property set to "Resources" on my "Resources.resx" file. Once I cleared that property, all works hunky-dory.

    Normally, when you add random files as EmbeddedResource, you generally want to set the Logical Name to something reasonable, for some reason, I did the same on the Resources.resx file and that screwed it all up...

    Hope this helps someone.

提交回复
热议问题