IVsSolutionBuildManager.set_StartupProject Method
Sets the startup project that will be run when the F5 key is pressed.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function set_StartupProject ( _
pHierarchy As IVsHierarchy _
) As Integer
int set_StartupProject(
IVsHierarchy pHierarchy
)
int set_StartupProject(
[InAttribute] IVsHierarchy^ pHierarchy
)
abstract set_StartupProject :
pHierarchy:IVsHierarchy -> int
function set_StartupProject(
pHierarchy : IVsHierarchy
) : int
Parameters
pHierarchy
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy[in] Pointer to a hierarchy object.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsSolutionBuildManager::set_StartupProject(
[in] IVsHierarchy *pHierarchy
);
Normally, the environment uses the settings in the Solution Configuration property pages for the startup project started when DebugLaunch is called. You can programmatically get and set the startup project using get_StartupProject and set_StartupProject.
Note
get_StartupProject and set_StartupProject only have the ability to set a single startup project. If you want to set multiple startup projects, you should use the Solution Configuration property pages or go through the automation model, specifically, DTE.Solution.SolutionBuild.StartupProjects. For more information, see Automation Model.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.