views:

336

answers:

1

Hi

When I'm adding an image to a .resx resources file in Visual Studio 2008 (C# project), VS always decides to add the file itself to the solution (in a Resources folder) and set its Persistence property to "Linked at compile time".

The behaviour I want is for the source image file contents to be added to the .resx file, the Persistence property to be set to "Embedded in .resx", and the image to NOT be added to the .csproj.

Anyone aware of any way to accomplish this? At the moment it's a manual step for every resource, and I will have to do this several hundred times shortly.

Kind regards

Tom

A: 

You might be able to write a macro to do this. The project system is pretty well covered by the API.

Richard
Hmmm, while I agree that this is quite possibly possible, I'm quite surprised that this isn't a built-in feature or option somewhere.
tomfanning