Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. [VB.NET ]Multiple projects

[VB.NET ]Multiple projects

Scheduled Pinned Locked Moved Visual Basic
csharpvisual-studiohelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kim Mostinckx
    wrote on last edited by
    #1

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

    B 1 Reply Last reply
    0
    • K Kim Mostinckx

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

      B Offline
      B Offline
      bskirkman
      wrote on last edited by
      #2

      Why do you need to add it dynamically?

      K 1 Reply Last reply
      0
      • B bskirkman

        Why do you need to add it dynamically?

        K Offline
        K Offline
        Kim Mostinckx
        wrote on last edited by
        #3

        Because I am making an automatic classgenerator. It automatically generates the classes from the selected SQL tables. So I need a class library for the autogenerated classes and I need another class library for the insert, update, delete ... statements. (I am programming 3 tier) It works fine for just one class library but when I dynamically add another class library, visual studio says that the solution already exists and he can't create a second class library...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups