views:

41

answers:

1

I am trying to remove a massive amount of cruft from a .NET 3.5, VS2008 project and I am somewhat confused as to what gets compiled into an EXE and what isn't.

So for instance, if I double click on my Resources.Resx file, i get the following:

alt text

As you can see it states that this bitmap is "Linked at compile time". However, when I go to the path of the file in the Solution Explorer, it says that the Build Action is set to None - thus, from what I understand, the bitmap won't be linked into the EXE.

alt text

But at the same time, there is an entry in the Resources.resx. Anyway, I am confused. Would appreciate some clarity on the topic.

+2  A: 

Even though you can see the files in your solution (because they have to exist somewhere first), when you compile your code, resource files are automatically embedded into the assembly manifest. Thus, they are part of the .dll or .exe

Josh
So if I just drop a blah.png into my solution, but do not add it to resources and BuildAction is None, then it will NOT be compiled into the EXE?
AngryHacker
@AngryHacker -- Correct
Josh