Project Subtypes

Dec 29, 2009 at 9:04 AM


Is MPF for Projects the best place to start implementing a project subtype for VS 2010 Beta 2?

I can't find any instructional documentation on project subtyping, nor can I find videos or relevant forums posts.  I've just downloaded MPF from here but it seems the documentation makes no reference at all to subtyping.

If MPF is not the correct tool for creating project subtypes, then can you please recommend good starting resources?

I've already found the following documentation but it doesn't appear to be updated for VS 2010 yet and also it seems to be geared more for C++ than for C#.  Furthermore, it's not a guide - it's more like very high-level conceptual material.

The only sample of which I'm aware is for VS 2005:

What I'm looking for, just to start with, is the simplest way in VS 2010 to subtype the C# Class Library project.  Then at least getting one of the following to work properly in VS 2010 would be a step in the right direction:

  • Add a custom tab to the project Properties window, similar to Code Contracts and Code Analysis tabs.
    • Persist configuration-dependant settings in MSBuild.
  • Add additional MSBuild items and tasks to the project by referencing a custom .targets file.
  • Add special project folders, similar to how the Properties folder has a unique icon and a special action when it's double-clicked.
  • Control the items displayed in the Add Item dialog.

Once I have a solution I may abstract it into a compiled assembly, if possible, so that making these types of extensions will be very easy for anyone attempting to do so in the future.  For example, my goal is to be able to create a new package, reference some helper library, derive from a few required abstract classes, implement the necessary abstract members, implement any custom extensions using available services and/or DTE, add the appropriate attributes to the package and then build.  (Yea, don't laugh :D - but I think that's the expectation of most devs when attempting to extend VS and it would be great if it was a reality for at least the most common tasks listed above.)


Mar 31, 2010 at 7:46 AM


I found the FlavoredProject class.

According to the docs, it represents "a project that is a subtype or flavor of an inner project".  Sounds like what I need.

The MPF offers ProjectNode; however, it does not derive from FlavoredProject.  Does this mean that project sub-typing isn't supported by the MPF or does ProjectNode replace FlavoredProject entirely?

Basically, I just want to subtype a C# class library project.  And if that works, I'd like to subtype a C# Web Application project.  A push in the right direction would be great.


Mar 31, 2010 at 6:06 PM

Dear Dave,

if I understand correctly, you like to create a project flavor rather than a new project system. MPFproj is mainly a sample that shows how to create a new project system. I suggest you to create a project flavor and then apply it to different projects (class library, WebApp, etc), please use the following documentation


Mar 31, 2010 at 9:01 PM
Edited Mar 31, 2010 at 9:01 PM

Hi Selma,

Thanks for your response.

Your understanding is correct.  But the documentation that you cited is the same that I linked to in my original post.  The problems with it are noted as well : )

I guess there aren't any plans to provide an MPF for Project Flavors so that I can quickly create project subtypes using C#?