Solution4.Create(String, String) Methode

Definition

Erstellt eine leere Projektmappe mit dem angegebenen Namen im angegebenen Verzeichnis.

public:
 void Create(System::String ^ Destination, System::String ^ Name);
public:
 void Create(Platform::String ^ Destination, Platform::String ^ Name);
void Create(std::wstring const & Destination, std::wstring const & Name);
[System.Runtime.InteropServices.DispId(40)]
public void Create (string Destination, string Name);
[<System.Runtime.InteropServices.DispId(40)>]
abstract member Create : string * string -> unit
Public Sub Create (Destination As String, Name As String)

Parameter

Destination
String

Erforderlich. Das Verzeichnis, in dem die SLN- und SUO (Projektmappen)-Dateien erstellt werden sollen.

Name
String

Erforderlich. Der Name, der in Projektmappen-Explorer angezeigt werden soll. Es handelt sich hierbei auch um den Basisnamen der SLN- und SUO-Dateien.

Implementiert

Attribute

Beispiele

Sub CreateExample(ByVal dte As DTE2)  
    ' Create a  solution.  
    Try  
        Dim soln As Solution4 =  _  
        CType(_applicationObject.Solution, Solution4)  
        MsgBox("Creating a new solution ")  
        ' Make sure that the file path below exists on your computer.  
        ' You can modify the path.  
        soln.Create("c:\temp2", "ANewSoln.sln")  
    Catch ex As System.Exception  
        MsgBox(ex.ToString)  
    End Try  
End Sub  
using System.Windows.Forms;  
public void CreateExample(DTE2 dte)  
{  
    // Create a solution.  
    try  
    {  
        Solution4 soln = (Solution4)_applicationObject.Solution;  
        MessageBox.Show("Creating a  solution ");  
        // Make sure that the file path below exists on your computer.  
        // You can modify the path.  
        soln.Create("c:\temp2", "ANewSoln2.sln");  
    }  
    catch(SystemException ex)  
    {  
    MessageBox.Show("ERROR: " + ex);  
    }  
}  

Gilt für