Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8801561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:52:02+00:00 2026-06-14T00:52:02+00:00

I would like to create a multi-project template for Visual Studio 2008 which contains

  • 0

I would like to create a multi-project template for Visual Studio 2008 which contains two projects that access the same source files (single source for mobile and desktop development). The following multi-project template:

<TemplateContent>
    <ProjectCollection>
        <ProjectTemplateLink ProjectName="Client.CF">Client\Template.CF.vstemplate</ProjectTemplateLink>
        <ProjectTemplateLink ProjectName="Client.FF">Client\Template.FF.vstemplate</ProjectTemplateLink>
        <!-- some other projects -->
    </ProjectCollection>
</TemplateContent>

will create this structure:

Solution folder
  - Client.CF
    - Client.CF.csproj
    - Other project files
  - Client.FF
    - Client.FF.csproj
    - Other project files

For single source the following structure is required:

Solution folder
  - Client
    - Client.CF.csproj
    - Client.FF.csproj
    - Other project files

After some playing around with the template XML I doubt that it is possible to create such a template. Has anyone already achieved this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:52:03+00:00Added an answer on June 14, 2026 at 12:52 am

    edit by OP…

    Do Not Do This – It Won’t Work.

    subtitle:

    can I have my week back pleez?

    Why? Well, many files in projects have relationships with each other. Blindly wild-card linking to them will include them in a build but the relationships will be lost.

    Even ignoring that fundamental flaw, the range of possibilities of files to include and exclude is …well, a lot. Don’t build fragility and technical debt into your project before it starts.

    Using Multiple build configs in a single project is a better Solution (pun intended). See https://stackoverflow.com/a/4457508/492 for the sort of thing I am talking about.

    I’ll leave this wrong answer here just in case it saves you a trip down a blind alley, or at least raises your awareness of this issue. Hey, just think of it as practice. Hey, at least I’m learning. Sometimes.

    as an aside, wild-card linking things like commonly-used utility classes such as extension methods can be a good thing. Just be aware of the implications.

    .
    .

    the original story….

    I just did this to build 6 (yes – SIX) versions of the same app. AutoCAD – they love to break the API every 3 years. Don’t get me started. I’m also building for other compatible apps so AutoCAD is only 3 versions. I digress.

    Here is how I did it. I had an extra project called zSourceCode which has – the source code. Duh. I also has the AssemblyInfoForAllProjects.cs file. Each project also has an additional AssemblyInfo.cs project with the attributes AssemblyTitle & AssemblyDescription, only because I wanted to identify the build version in the name and description.

    The other projects linked to the zSourceCode project files like so…

    <Compile Include="..\zSourceCode\**\*.*" Exclude="..\zSourceCode\Properties\AssemblyInfo.cs;..\zSourceCode\bin\**\*.*;..\zSourceCode\obj\**\*.*;..\zSourceCode\**\*.csproj;..\zSourceCode\**\*.user;..\zSourceCode\**\*.vstemplate;..\zSourceCode\readme.txt;..\zSourceCode\**\*.lsp;..\zSourceCode\**\*.scr;..\zSourceCode\**\*.ico;;..\zSourceCode\**\*.txt">
    <Link>Src\%(RecursiveDir)%(Filename)%(Extension)</Link>
    </Compile>

    Ignoring the fact that I doubled up on readme.txt (with *.txt), and you probably won’t have any LISP (*.lsp) nor startup scripts for AutoCAD (*.scr), that’s the gist of it.

    Using this wildcard syntax, you can add files and folders to the source project and they will propagate to all your build projects. You can add any code specific to a project within that project itself.

    I added Extension methods to patch the behavior changes between the versions. These live outside the Solution, in a central place so I can patch all my AutoCAD-related stuff-ups in one place. This was tricky because I wanted to reference it by an absolute path. The only way to get VS to generate the absolute paths in the compile links was to put that stuff on another drive (or map a folder to another drive letter).

    The rest of Multi-project templates is as per http://msdn.microsoft.com/en-us/library/ms185308.aspx which is probably where you got the first chunk of code from.

    Look out for this rather annoying problem with getting a surprise layer of folders between the solution & the projects: http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/11d7da1d-40cf-4b5c-ac27-d7fe504062a8/ . You can solve that by writing an Iwizard implementation but that has to go in the GAC and blahblahblah. I just manually shuffle them and edit the .sln file in Notepad++. NP++ is handy for editing project files too. VS just reloads the projects when you change them, unless you break them. Did I mention source control?

    Also, the first time you generate the solution, you’ll have to close it and re-open it to see the links in the Solution Explorer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a multi-dimensional array with two variables but don't know
I have a JSON file that I would like to create an multi-dimensional array
i would like create a array of structure which have a dynamic array :
I would like to create a c++ type that mimic the build-in type exactly.
I would like to create a class that runs something (a runnable) at regular
I would like to create an application which can learn to classify a sequence
I have a multi module maven project and I would like to use versions
I would like to create a function that returns a numpy array if one
I have a multi-module Maven project, and I would like to assemble together artifacts
I would like to create a multi-step form for entry and editing of student

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.