Prism Template Pack for Visual Studio 2010


Now that we have Release Candidate versions of Visual Studio 2010, as well as WPF and Silverlight 4.0, I’ve updated the Prism Templates so that you can more easily develop Prism applications that target these latest releases.

The templates themselves are similar to those I released a while back – there are templates for Shell and Module projects, as well as ‘QuickStart Solution’ templates that provide a complete, pre-configured, multi-module solution that you can use as a starting point for a complete Prism application. All templates are available for both WPF and Silverlight. They are all in C# at the moment. I’ll work on VB.NET versions soon…

I’ve modified the templates a little to use some of the features that have been introduced since Silverlight 2.0. In particular, I updated the QuickStart Solution to use the Silverlight PagedCollectionView class so that the ViewModel can keep track of the current selection automatically.

The biggest change, though, is that the templates now come in a VSIX package and use the Visual Studio 2010 Extension Manager. This dramatically simplifies the installation and management of the templates!! You can download the VSIX package herenote that you will have to change the file extension from .zip to .vsix in order to install it – or you can find it in the Visual Studio Code Gallery. You can also read the Getting Started release notes here.

You can install the VSIX package by simply double-clicking it (once you’ve changed the file extension to .vsix). You’ll be prompted to accept the license but two clicks is pretty much all it takes. When you run Visual Studio 2010 and open the Extension Manager (from the Tools menu) you’ll see the Prism Template Pack is installed. You can uninstall it or disable it from here too.

ExtensionManager

The templates show up in the Visual Studio 2010 New Project dialog under the Prism category. There are Shell and Module project templates, as well as the QuickStart Solution templates, for Silverlight and WPF.

NewProject

Once you’ve created a project using the templates, a ReadMe file will be shown that details the remaining steps you will need to take before the solution will compile and run. This mainly involves updating the project’s references to point to the Prism assemblies on your system. In some cases, you might also have to add Silverlight App References to the Web project so that the projects are linked together properly. I haven’t yet figured out how to do this automatically without requiring some kind of complicated Visual Studio automation but I’m still working on it…

These templates target the Release Candidate versions of Visual Studio 2010, and WPF and Silverlight 4.0. Once they are fully released, I will update the templates with any changes that are required. I’m also hoping that templates like these will be included ‘in the box’ for Prism 4.0.

In the meantime, I hope you find them useful. Let me know what you think!

Comments (16)

  1. kjones16 says:

    Just a request for VB.NET templates. Thanks.

  2. dvdeva says:

    HI ,

    i am trying to install , but am getting following error

    This VSIX package is invalid because does not contain the file extension.vsixmanifest at the root

    I tried lot, but its gives same error.

    Any idea on this?

    Regards,

    Deva

  3. pmarwa says:

    Hi David,

    Any chance you’ll be updating the templates soon, now that VS 2010 is released?

    Thanks for your great work!

    Priya

  4. geedsen says:

    Installed the VSIX, can see it in the extension manager but I cannot find any ‘new project item’ related to it when I do a ‘New Project’

    Does it work in the trial or only in the RC?

    Tnx

     Ben

  5. geedsen says:

    Missed the ‘Prism’ category, it’s there allright RTFM I guess. Sorry

  6. worldlifesite says:

    You are most excellent.  This is a great start.

  7. GregDobbs says:

    I second the motion requesting VB templates! Any timetable?

  8. gb says:

    Hi,

    Great stuff,however I have a problem.

    I have installed your templates and when I run them I get

    "The file properties designer.cs could not be found within the project templates.

    Has anybody actually had it work on VS 2010 RTM .

    I guess there is something missing within the template.

    I would be grateful for your help.

    dotnet@devnet247.com

  9. Tim says:

    Hi All,

    For some reason the Prism Quick start for Silverlight does not appear on some developer machines.. Only seems random , i've seen this on VS 2010 beta to VS2010 final.

    Any suggestions out there?

  10. Gabriel says:

    Hi

    First of all

    very grateful about these templates.

    Learning prism and I would definetely find them useful to get me started

    I have installed the vs2010 templates on VS2010 RTM but I keep getting errors.

    1) Not all templates are installed

    2) I get this error

    The file propertiesResources.designer.cs  could not be found within the project templates.

    Any ideas.

    Thanks a lot

  11. John says:

    Hi

    Once installed where are the templates located in both winXP and Window7 Cannot find them

    Thanks

  12. DarrenC says:

    Hi,

    When I install the templates I only get one template ("Prism WPF 4.0 (RC) Shell") showing up in the Prism list. I'm running Visual Studio 2010 Ultimate Version 10.0.30319.1 RTMRel.

    Any ideas?

    Last but not least -thanks for the templates!

    D.

  13. I've also had the same problems but I think I have figured it out. Have a look at this solution:

    silverlightdude.wordpress.com/…/installing-the-prism-template-pack-for-visual-studio-2010

    David, maybe you could change the package to shorten the paths a little.

    Cheers 🙂

  14. ramadevi bapatla says:

    Installed the prism on vs 2010 ultimate and it installed only two templates shell and module not other templates. when I try to open models or shell , throwing the following errors.

    The file enterpriselibrarylogger.cs could not be found and bunch ot other errors.

  15. Bapatla says:

    Hi All: Close all the vs ide sessions and copy  all the prism zip files to

    C:Documents and Settingsbapatia.RADSMy DocumentsVisual Studio 2010TemplatesItemTemplatesVisual C#Prism1033

    and

    C:Documents and Settingsbapatia.RADSMy DocumentsVisual Studio 2010TemplatesProjectTemplatesVisual C#

    Sriman

  16. Bapatla says:

    Hi All: Close all the vs ide sessions and copy  all the prism zip files to

    C:Documents and Settingsbapatia.RADSMy DocumentsVisual Studio 2010TemplatesItemTemplatesVisual C#Prism1033

    and

    C:Documents and Settingsbapatia.RADSMy DocumentsVisual Studio 2010TemplatesProjectTemplatesVisual C#

    Sriman