visual-studiobuildresourcesembedded-resource

Can Someone explain the Purpose of the different Build Actions in VS 2008?


At first I was just looking for the difference between Resource and Embedded Resource; then I noticed all these other Build Action types: Compile, Content, Embedded Resource, ApplicationDefinition, Page, Resource, SplashScreen, and EntityDeploy.

I understand some of these but some are more vague and a clearcut definition would be helpful in addition to some examples of when you might use each.


Solution

  • Compile: Pretty self explanatory. Visual studio should try to compile the code. (cs, vb code files)
    Content: Required file for deployment. (ASPX, ASCX pages, Readme files etc.)
    Embedded Resource: Embeds the file into the assembly DLL. (nHibernate mappings typically, any sort of content that you don't want to be separated from the assembly)