VS2010: "Select Resource" dialog & resx location

Posted by Dav on Stack Overflow See other posts from Stack Overflow or by Dav
Published on 2010-05-28T15:54:26Z Indexed on 2010/05/31 7:22 UTC
Read the original article Hit count: 330

Got two issues with the VS2010 / VS2008 select resource dialog - the one that appears when you want to add an image to a button in a WinForms app for example.

Give me my files back!

It only seems to see the default project resources file (Properties\Resources.resx), and resx files in project root (say MyProject\famfamfam.resx).

We have quite a few icons all over the app, and because some of them come from different icon sets (like famfamfam), and some are related to this project only we'd like to keep them separate. For that same reason (keeping solution neat & tidy) we want to store these extra resource files in the Resources folder (eg. Resources\famfamfam.resx).

However, we'd also like to keep using the Select Resource dialog :-) Because it does not see the 'extra' resource files, we're having to select a 'fake' icon now (from the global Resources.resx file) and then manually change that to reference the right icon in .Designer.cs. As you can imagine, this is a pain.

Stop modifying my files!

Second issue is a bit more annoying. We use the excellent MultiLang add-in for Visual Studio to globalize our app. It stores its translations in MultiLang.resx & MultiLang.XY.resx files in the project root, where XY is a language code, eg. .cs.resx for Czech. These have to be set to No code generation access modifier. What Select Resource seems to be doing is set all .resx files it can find to Internal.

Exec summary

  • Is there a way to convince Select Resource dialog to look for extra .resx files anywhere besides the project root?
  • Is there any way to stop it from modifying the access modifier of the resources it does see (other than file a bug with MS)?

Thanks in advance for any suggestions!

© Stack Overflow or respective owner

Related posts about c#

Related posts about visual-studio