The buildaction function specifies how a file or set of files should be treated during the compilation process. It is usually paired with a configuration filter to select a file set. If no build action is specified for a file a default action will be used, based on the file's extension.
buildaction ("action")
Build actions are currently only supported for .NET projects, and not for C or C++.
Applies To
Solutions, projects, and configurations.
Parameters
action is one of:
- Compile
- Treat the file as source code; compile and link it.
- Embed
- Embed the file into the target binary as a resource.
- Copy
- Copy the file to the target directory.
- None
- Do nothing with this file.
Examples
Embed all PNG image files into the target binary.
configuration "**.png" buildaction "Embed"



I have tried adding this line to my premake4.lua, but when i run "premake4 vs2005 --dotnet=mono" it doesn't make any difference in the .csproj that is generated.
I am tell premake how to bundle my PNGs, so that the resulting .csproj will have entries like:
Common\Resources\Icons\MyIcon.png
Which is currently in the .csproj. What am I doing wrong here?