Various Visual Studio BuildAction values for Silverlight files explained
Each file in a Silverlight project file has an associated BuildAction property that tells MSBuild what to do with it when your project is built. Here are the available choices as viewed in the Property Inspector of Visual Studio 2008.

Certain file types are given default values for the BuildAction which make the most (only!) sense for certain file types:
- “XAML type” files like UserControl and Page are given “Page” build action
- Code Files (.cs and .vb) have “Compile”
- App.XAML will has its BuildAction set to “Application Definition”. This defines the entry point of your application.
Although some values in the Build Action dropdown are not Silverlight related, they are not disabled, hidden or otherwise “grayed out” to prevent you form hurting yourself. You can set a bitmap resource file to “Entity Deploy” and all is fine – until you compile.
The “non-Silverlight” related BuildActions are:
- SplashScreen: is for WPF applications and is explained perfectly here.
- EntityDeploy: is used by the ADO.NET Entity Framework
- Embedded Resource: This is a classic gotcha in that Silverlight resources must always use “Resource”, not “Embedded Resource” which is WPF related and the file format used can’t be understood by Silverlight.
Your first meeting with the BuildAction property value will probably be in relation to resource files that you want to make available to your application. The Three Silverlight related Resource BuildAction values are:
- None: the resource file will not be a part of the application assembly or the XAP. It will be available on the server for specific access and use.
- Resource: the file is embedded into the application assembly
- Content: MSBuild will include the file in the application package without embedding it in the project assembly which is the choice if multiple assemblies need access to it.
Resource files and their related BuildAction alternatives are explained here. – Cheers!
[...] Original post: Various Visual Studio BuildAction values for Silverlight files explained [...]
[...] Various Visual Studio BuildAction values for Silverlight files explained [...]
[...] Source: Bob’s Blog [...]
[...] Various Visual Studio BuildAction values for Silverlight files explained [...]
[...] Various Visual Studio BuildAction values for Silverlight files explained [...]
[...] Various Visual Studio BuildAction values for Silverlight files explained [...]