Thread: Visual Studio Solution Template

  1. #1
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130

    Visual Studio Solution Template

    I'm building a Visual Studio solution template. That's a template that you can select when you chose "New Project" that will build the default solution with multiple projects in it. Sadly, there's little support for this, file and project templates are easy, multi-project templates are a lot of "Notepadding" obscure config files and rezipping them into installers. Anyway...

    My problem is that my solution builds fine, but all my projects are put into an extra folder:

    Solution1
    + Solution1.sln
    + Solution1
    +--Project1
    +--Project2
    +--Project3

    What I would like to have is:

    Solution1
    + Solution1.sln
    + Project1
    + Project2
    + Project3

    What I can chose when creating a new solution is the top folder. But the projects will always be put into this subfolder. This does not happen with normal templates, like creating ConsoleApplication1. Those will look like the second example.

    I already tried all "create new folder" options on both solution and project templates but that changed nothing. Googling for "solution folder visual studio template" yields tons of stuff, but nothing helpful.

    Any clues, links, suggestions will be appreciated
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    Found "a" solution. Although I can image the "wtf" face of the next guy looking into this project...
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    When creating a new solution and project manually, there is a check box in the project type selection dialog that says "Create directory for solution". I believe you need to be unchecking this check box (I don't know how to do that with a template but maybe this gives you a hint).

    Honestly, I like the symmetry of all the projects in the solution having their own folder, and not having one "special" one that for some reason lives at the root.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  4. #4
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    If you uncheck this checkbox, you just get rid of the top folder and end up with this:

    Solution1.sln
    Solution1
    +-Project1
    +-Project2
    +-Project3

    Which is even worse However, the solution was to do exactly that and then move the solution file into the Solution1 folder, which then has the structure I want... as I said, I hope nobody looks into it again.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Is it possible for you to share the template, nvoigt?
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Visual Studio DLL and Visual Basic
    By mathguy in forum C Programming
    Replies: 18
    Last Post: 12-08-2011, 03:55 PM
  2. Visual C++ and Visual Studio 2010
    By 03jh01 in forum C++ Programming
    Replies: 5
    Last Post: 10-03-2010, 04:03 AM
  3. visual studio 6 and visual studio.net difference
    By gemini_shooter in forum Tech Board
    Replies: 5
    Last Post: 02-04-2006, 01:32 AM
  4. Replies: 1
    Last Post: 05-26-2004, 09:59 AM
  5. visual hardware solution
    By beely in forum Tech Board
    Replies: 4
    Last Post: 06-07-2003, 12:17 AM