Click here to Skip to main content
16,015,652 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: help in code Pin
Dave Kreskowiak23-Jan-06 15:46
mveDave Kreskowiak23-Jan-06 15:46 
GeneralRe: help in code Pin
akyriako7823-Jan-06 21:42
akyriako7823-Jan-06 21:42 
AnswerRe: help in code Pin
Mekong River23-Jan-06 16:54
Mekong River23-Jan-06 16:54 
Questionc++ to vb.net Pin
vertig073023-Jan-06 6:22
vertig073023-Jan-06 6:22 
AnswerRe: c++ to vb.net Pin
Fu Manchu23-Jan-06 12:02
Fu Manchu23-Jan-06 12:02 
GeneralRe: c++ to vb.net Pin
vertig073023-Jan-06 12:45
vertig073023-Jan-06 12:45 
GeneralRe: c++ to vb.net Pin
Fu Manchu25-Jan-06 3:13
Fu Manchu25-Jan-06 3:13 
Question[VB.NET ]Multiple projects Pin
Kim Mostinckx23-Jan-06 5:33
Kim Mostinckx23-Jan-06 5:33 
Hi,

I am creating a visual studio add-in.

And I want to add 2 projects to a solution.
But I'm having a problem...

If I try to edit the following MSDN code:

<br />
Sub SolutionExample(ByVal dte As DTE2) <br />
    ' This function creates a solution and adds a Visual C# Console <br />
    ' project to it. <br />
    Try <br />
        Dim soln As Solution2 = CType(DTE.Solution, Solution2) <br />
        Dim csTemplatePath As String <br />
        ' This path must exist on your computer. <br />
        ' Replace <file path> below with an actual path. <br />
        Dim csPrjPath As String = "<file path>" <br />
        MsgBox("starting") <br />
        ' Get the project template path for a C# console project. <br />
        csTemplatePath = soln.GetProjectTemplate _ <br />
        ("ConsoleApplication.zip", "CSharp") <br />
        ' Create a new C# Console project using the template obtained <br />
        ' above. <br />
        soln.AddFromTemplate(csTemplatePath, csPrjPath, _ <br />
        "New CSharp Console Project", False) <br />
        MsgBox("done") <br />
    Catch ex As System.Exception <br />
        MsgBox(ex.ToString) <br />
    End Try <br />
End Sub <br />


like this:



<br />
Sub SolutionExample(ByVal dte As DTE2) <br />
    ' This function creates a solution and adds a Visual C# Console <br />
    ' project to it. <br />
    Try <br />
        Dim soln As Solution2 = CType(DTE.Solution, Solution2) <br />
        Dim csTemplatePath As String <br />
        ' This path must exist on your computer. <br />
        ' Replace <file path> below with an actual path. <br />
        Dim csPrjPath As String = "<file path>" <br />
        MsgBox("starting") <br />
        ' Get the project template path for a C# console project. <br />
        csTemplatePath = soln.GetProjectTemplate _ <br />
        ("ConsoleApplication.zip", "CSharp") <br />
        ' Create a new C# Console project using the template obtained <br />
        ' above. <br />
        soln.AddFromTemplate(csTemplatePath, csPrjPath, _ <br />
        "New CSharp Console Project", False) <br />
        MsgBox("done 1ste project") <br />
<br />
        soln.AddFromTemplate(csTemplatePath, csPrjPath, _ <br />
        "New CSharp Console Project 2", False) <br />
        MsgBox("done 2de project") <br />
<br />
    Catch ex As System.Exception <br />
        MsgBox(ex.ToString) <br />
    End Try <br />
End Sub <br />


it doesn't work, Visual studio says that the solution already exists...

Is there a possibilty to dynamically add 2 class libraries to a solution?

Tx


-- modified at 11:33 Monday 23rd January, 2006
GeneralRe: [VB.NET ]Multiple projects Pin
bskirkman23-Jan-06 13:49
bskirkman23-Jan-06 13:49 
GeneralRe: [VB.NET ]Multiple projects Pin
Kim Mostinckx23-Jan-06 22:58
Kim Mostinckx23-Jan-06 22:58 
QuestionConvert VB.NET sources into VB6 Pin
marsup5423-Jan-06 5:18
marsup5423-Jan-06 5:18 
AnswerRe: Convert VB.NET sources into VB6 Pin
Dave Kreskowiak23-Jan-06 5:31
mveDave Kreskowiak23-Jan-06 5:31 
GeneralRe: Convert VB.NET sources into VB6 Pin
marsup5423-Jan-06 5:43
marsup5423-Jan-06 5:43 
AnswerRe: Convert VB.NET sources into VB6 Pin
Joshua Quick23-Jan-06 7:13
Joshua Quick23-Jan-06 7:13 
GeneralRe: Convert VB.NET sources into VB6 Pin
marsup5424-Jan-06 0:08
marsup5424-Jan-06 0:08 
GeneralRe: Convert VB.NET sources into VB6 Pin
marsup5424-Jan-06 0:41
marsup5424-Jan-06 0:41 
GeneralRe: Convert VB.NET sources into VB6 Pin
Joshua Quick24-Jan-06 6:56
Joshua Quick24-Jan-06 6:56 
AnswerRe: Convert VB.NET sources into VB6 Pin
Mekong River23-Jan-06 16:59
Mekong River23-Jan-06 16:59 
AnswerRe: Convert VB.NET sources into VB6 Pin
Kedar Potdar1-Feb-06 1:44
Kedar Potdar1-Feb-06 1:44 
GeneralRe: Convert VB.NET sources into VB6 Pin
marsup542-Feb-06 7:29
marsup542-Feb-06 7:29 
QuestionVB.NET , Grab networked drive name Pin
natdoggy223-Jan-06 4:41
natdoggy223-Jan-06 4:41 
AnswerRe: VB.NET , Grab networked drive name Pin
progload23-Jan-06 12:12
progload23-Jan-06 12:12 
GeneralRe: VB.NET , Grab networked drive name Pin
topski11-Sep-08 4:35
topski11-Sep-08 4:35 
QuestionVB6 TreeView: how to prevent expand all Pin
Pete Burgess23-Jan-06 3:28
Pete Burgess23-Jan-06 3:28 
AnswerRe: VB6 TreeView: how to prevent expand all Pin
Mekong River23-Jan-06 17:10
Mekong River23-Jan-06 17:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.