This documentation is archived and is not being maintained.

BuildAction Property (Visual Basic and C# ProjectItem Object)

Visual Studio .NET 2003

Returns or sets the build action to perform with the file. This value determines what the project system does with a project item during a build.

[Visual Basic .NET]
Public Property BuildAction() As prjBuildAction
[Visual Basic 6]
Property Get BuildAction() As prjBuildAction
Property Let BuildAction( _
   ByVal NewValue As String _
HRESULT __stdcall get_ BuildAction(
   /* [out, retval] */ prjBuildAction * retVal
HRESULT __stdcall put_ BuildAction(
   /* [in] */ prjBuildAction NewValue
prjBuildAction BuildAction {get; set;}
[JScript .NET]
public function get BuildAction() : prjBuildAction
public function set BuildAction(
   NewValue : prjBuildAction


The new SubType value.

Return Value



A project may contain many project items, not all of which are code files. A code file would probably have this field set to the prjBuildActionCompile enumeration value, which would direct the system to compile the file. A text file containing programmer notes might have this field set to prjBuildActionContent to indicate that the system should not compile this file, but should deploy it as content.

The possible values of the BuildAction property are contained in the prjBuildAction enumeration.

See Also

Properties Property (General Extensibility) | ProjectItem Object | prjBuildAction Enumeration

Applies To: Properties Property (Visual Basic and C# ProjectItem Object)