Default Build Action Generator for Visual Studio 2010


This tool generates a pkgdef file that can be used to change the default build-action for specific file types in Visual Studio, freeing you from the need to change the build action manually all the time. This can e.g. be useful when adding 3rd party view files in ASP.NET MVC applications (Spark, Brail). Without the proper build action, those files are not considered for deployment by the integrated publishing tool.


  1. Enter extensions of the file types you want to define the default build action for, with or without a leading dot. Separate (up to ten) multiple entries by comma. For example: spark,brail,.less
  2. Choose the default build action: None, Content, Compile or EmbeddedResource
  3. Choose project types for which the settings apply. Click on "Show all project types" to show less common project types as well.
  4. Click on generate.
  5. Save the downloaded file to %PROGRAMFILES(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\Extensions (64-bit systems) or %PROGRAMFILES%\Microsoft Visual Studio 10.0\Common7\IDE\Extensions (32-bit systems) respectively. Note: this needs elevated rights.
  6. (Re-)Start Visual Studio
  7. Add files with the extensions entered in step 1 and check that the build action has the expected value.

Related blog article

Show all project types

© 2010 Andre Loker
Provided "as is" with no express or implied warranty. Use at your own risk.