VS 2010 templates

Topics: Prism v4 - Silverlight 4, Prism v4 - WPF 4
Nov 21, 2010 at 2:45 PM

One of the items hoped for in v4.0 were some simple VS2010 Templates for creating applications, modules, etc. 

While it is not that difficult to create the project items by hand, I was wondering if there had been any new templates published.



Nov 23, 2010 at 2:56 PM
Edited Nov 23, 2010 at 3:03 PM


As of today, there are no Visual Studio templates to build Prism v4.0 applications available. You can, however, take the necessary code from a quickstart, so that you don't have to create the projects entirely by hand.

Another possibility would be to use David Hill’s Prism 2.2 templates and adapt the generated projects to Prism v4.0 (using the code from the quickstarts as reference).

Hope you find this helpful.

Guido Leandro Maliandi

Nov 23, 2010 at 3:31 PM

To add to Guido's comments, creating template was on the backlog and we really did want to do them. Unfortunately, a few other higher priority features took longer than expected, leading us to cut these templates from the scope of Prism4.

We have had a few discussions around taking David's templates and updating them for v4, but doing so "out of band" ( between releases). Keep an eye out on both David Hill's blog and Karl Shifflet's blog. If we can get this done, the templates will most likely be posted or mentioned there.

I do have a follow up question, though.  What are the top three project templates you would want to see us build?


Nov 23, 2010 at 6:12 PM

it would be great if we can have a MVVM template which includes also modularity & all the essential utilities(boostrapper, shell & such)

Kind regards

Nov 24, 2010 at 1:22 PM


I am not looking for the full SCSF GAT framework, but something small and targetted to be usable by the 90th percentile of users.  Too much, and we end up deleteing half of what was created to make it fit into our development patterns.   One helper that creates everything IMO would be against the direction that you have gone to create composable parts into a whole.   It is also nice to have helpers that can be used throughout the life of an application, not just at the creation of it.  Too many times in the old SCSF world, you would use it to create the initial solution, delete a bunch of it, and then not be able to use the helpers anymore because they would rip appart the patterns you were using. 

Use Code Snippets for stuff that doesnt create projects or files or add references.   They can be smaller and very targetted to simple patterns.

I would like to see simple project and file helpers to create:

  • A Shell Project
    • These would need to be able to create either a MEF or Unity Bootstrapper, a  simple view, add the appropriate Prism references and that is pretty much it.
  • A Module Project
    • Same thing, these would need to be able to create either a MEF or Unity loaded module.cs file, add the references, etc.  This same helper could be used to create a service module or a module that contains views.
  • Add a View
    • Need a couple of these to fit the various patterns you have.  One for each would be nice.  Presenter first?  View First?  No Presenter?  Controller?  Etc.
  • Add a View Model?
  • Add a Controller?
  • Add an Event?  ( event and content files )

Everything else IMO should be code snippets.  Things like Publish or Subscribe to an Event,  add a command, etc. 

Be targetted in what you create so that you are replicating a simple pattern that you have described in the documentation, but not the entire implementation of a solution. 

If you want to go to the level of the SCSF helpers to add things like Async Services, Login / Authorization patterns,  and other things that allow Prism to integrate with other MS solutions, IMO another Codeplex project, or another area here for those would be called for.  Allow the user community to help with some of those, but have you guys vet them as to which can be included or referenced by the Prism app.

Thanks for listening




Nov 25, 2010 at 12:50 AM
Edited Nov 25, 2010 at 12:52 AM

Hey guys,

I am in the process of putting together the necessary files for Project Templates / Item Templates.  At the present, I have the Shell Application Project created.  Next to put together are the Item Templates.  The whole package will available on the VS Gallery when i am done, in VSIX format.  I am hoping it will be just the basics for now and add some stuff over time.  Pretty much got tired of having to create everything from scratch and based on what VS2010 can do with these items it relatively easy to do.

@pmont: don't know at present that I will include all of the requests on the first iteration.  As for Presenters/View First/No Pesenter/Controller that is up to the developer.  The templates will focus on MVVM.  I will put together the Pub/Subs for IEventAggregator in some snippets to include.  On the note of MVVM, the included ViewModel by the P & P guys will be used for simplicity, more advanced options can be substituted in.