Expand Minimize
This topic has not yet been rated - Rate this topic

StartAction Property

Visual Studio .NET 2003

Indicates what item to run when the project is debugged.

[Visual Basic .NET]
Public Property StartAction() As prjStartAction
[Visual Basic 6]
Property Get StartAction() As prjStartAction
Property Let StartAction( _
   ByVal NewValue As prjStartAction _
) 
[C++]
HRESULT __stdcall get_StartAction(
   /* [out, retval] */ prjStartAction* retVal
);
HRESULT __stdcall put_StartAction(
   /* [in] */ prjStartAction NewValue
);
[C#]
prjStartAction StartAction {get; set;}
[JScript .NET]
public function get StartAction() : prjStartAction
public function set StartAction(
   NewValue : prjStartAction
)

Parameters

NewValue
A prjStartAction enumeration value.

Remarks

Indicates the item to start when the application is debugged.

Start action valueDescription
prjStartActionProjectIndicates that the executable file (for Windows Application and Console Application projects) or the Start Page (for Web projects) should be started when the application is debugged. Class library projects cannot be started directly. You must use prjStartActionProgram or prjStartActionURL action to debug them. For Web projects, the StartPage Property must also be specified.
prjStartActionProgramIndicates that a specific program should be started when the application is debugged. For example, you might run a previously compiled client that consumes your class library project. The StartProgram Property must also be specified when this start action value is used.
prjStartActionURLIndicates that a particular URL should be accessed when the application is debugged. For example, you might access the URL to a Web site that uses your class library project. The StartURL Property must also be specified when this start action value is used.
prjStartActionNoneIndicates that no project, program, or URL should be started when the application is debugged.

Example

' Macro Editor
' For a Web project, sets the Debug, .NET configuration to start with
' a particular page. 
Private Sub ConfigureWebProject(ByVal webProject As Project, _
   ByVal thePage As String)
        
   Dim configProps As Properties = _
      webproject.ConfigurationManager.Item("Debug", ".NET").Properties
        
   With configProps
      .Item("StartAction").Value = prjStartAction.prjStartActionProject
      .Item("StartPage").Value = thePage
      .Item("StartProgram").Value = ControlChars.NullChar
      .Item("StartURL").Value = ControlChars.NullChar
      .Item("StartArguments").Value = ""
      .Item("StartWithIE").Value = True
      .Item("StartWorkingDirectory").Value = "C:\WorkingDirectory"
   End With
End Sub

See Also

Debugging, Configuration Properties, <Projectname> Property Pages Dialog Box (Visual C#) | Debugging, Configuration Properties, <Projectname> Property Pages Dialog Box (Visual Basic)

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

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.