Resource file generated from Tools–> Generate Local Resources creates respective keys having the suffix “Resource1”.
Is there a way to get rid of the suffix “Resource1” and make it use the exact control name for the resource key?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s described in this issue. The Resource suffix is to help prevent name clashes between controls. Without it, it would break in some circumstances.
Is it purely the code generation you want to customize? You could always use a
Custom Resource Managerto remap the resource keys to your own convention (without suffix). It does mean creating your own implementation to pull out the resources created fromRESX, but I’ve done it this in the past with some help (copy/paste) from reflector.It would allow you to use shortcuts (no suffix) in your syntax when referring to resources, but it wouldn’t affect the code gen side of things. A find and replace fixes that, or a custom tool.