Solution4.Create(String, String) Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Cria uma solução vazia no diretório especificado com o nome especificado.
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)
Parâmetros
- Destination
- String
Obrigatórios. O diretório no qual criar os arquivos. sln e. suo (solução).
- Name
- String
Obrigatórios. O nome a ser exibido no Gerenciador de soluções. Esse também é o nome base dos arquivos. sln e. suo.
Implementações
- Atributos
Exemplos
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);
}
}