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

后端 未结 30 1480
旧巷少年郎
旧巷少年郎 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 20:56

    I resolved this by going to the project where my resources file was saved, scrolling down to its ItemGroup and adding a logical name that corresponded to the path the compiler expected.

    My EmbeddedResource looked like this:

       
        
          PublicResXFileCodeGenerator
          TextResources.Designer.cs
        
      
    

    Now it looks like this

      
        
          PublicResXFileCodeGenerator
          TextResources.Designer.cs
          MyProject.Properties.Resources.resources
        
      
    

提交回复
热议问题