Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hello,

In VC++.net 2010 project, I have imported few win forms (ie .h, .cpp. resx files). After building the project their corresponding .resources files are created.

As per the default setting in 2010 .resources file is created with name format as “NamespaceName.ClassName.resources”.

Since, in the project I have placed .h & .cpp files in some directories. Due to this .resource file is created with name format as “NamespaceName.Dir1.Dir2.ClassName.resources”.

This name format inconsistency cause’s design time error.
Error: -“Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "NamespaceName.ClassName.resources" was correctly embedded or linked into assembly "ProjectName" at compile time, or that all the satellite assemblies required are loadable and fully signed”.

I have tried changing the Managed Resource settings to match format “NamespaceName.ClassName.resources”.

Is there any way that I can change the setting to create .resources file with proper naming format?

Thanks
Kedar
Posted

1 solution

XML
You can set the logical name in the .vcxproj project file by adding LogicalName to the EmbeddedResource, like


        <EmbeddedResource Include="Dir1/Dir2/ClassName.resx">
          ....
          <LogicalName>NamespaceName.ClassName.resources</LogicalName>
        </EmbeddedResource>
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900