[MonoDevelop] Resource IDs

Todd Berman tberman@off.net
Wed, 20 Apr 2005 18:54:46 -0700

On Thu, 2005-04-21 at 02:29 +0200, Andras Biczo wrote:
> Hi,
> currently the resource ID of an embedded resource will be it's filename 
> in MD (at least for c# projects, I haven't checked the others).
> This is different from what Visual Studio does. What VS does is 
> explained here:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbgrffileswithoutembeddedcultureinfostrings.asp
> I think this is a better way of assigning the IDs because currently in 
> MD it can cause problems if you have two resources with the same 
> filename (e.g. res/small/logo.png, res/big/logo.png). Besides this, it 
> makes life easier for people that use MD and VS to work on the same project.
> The patch I attached modifies the way MD assigns embedded resources' IDs 
> (only for c# projects). It works as follows:
> 1. If the resource file is "inside" the project base directory then its 
> ID will be its relative path with the directory separator character 
> replaced with '.'.
> 2. Otherwise it gets the same ID as before.
> Would anyone please review the patch?

The patch itself looks alright, however.

We would like to see the ability to set resource ids. I wouldn't have
(personally) any issues with the default resource id being the method
you described here, but it would be nice if you could say 'this file
goes in with this resource id'. You can use the new project format and
solution tree pad stuff to give this functionality.

Does that make more sense?