This documentation is archived and is not being maintained.

IVsSolution.CanCreateNewProjectAtLocation Method

Determines whether a new project can be created at a given location.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in

int CanCreateNewProjectAtLocation (
	[InAttribute] int fCreateNewSolution,
	[InAttribute] string pszFullProjectFilePath,
	out int pfCanCreate
int CanCreateNewProjectAtLocation (
	/** @attribute InAttribute() */ int fCreateNewSolution, 
	/** @attribute InAttribute() */ String pszFullProjectFilePath, 
	/** @attribute OutAttribute() */ /** @ref */ int pfCanCreate
JScript does not support passing value-type arguments by reference.



[in] If true, then a new solution will be created.


[in] Project path (including file name and extension) of the location to create the new project.


[out] If true, then a new project of a given name can be created at the specified location. If false, then a project of the same name already exists at the specified location.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

COM Signature

From vsshell.idl:

HRESULT IVsSolution::CanCreateNewProjectAtLocation(
   [in] BOOL fCreateNewSolution,
   [in] LPCOLESTR pszFullProjectFilePath,
   [out] BOOL *pfCanCreate

This method determines whether a new project with the given name can be created at the given location. Used primarily for wizards.