次の方法で共有


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

  • Anonymous
    April 08, 2010
    Just a request for VB.NET templates. Thanks.

  • Anonymous
    April 12, 2010
    The comment has been removed

  • Anonymous
    April 19, 2010
    Hi David, Any chance you'll be updating the templates soon, now that VS 2010 is released? Thanks for your great work! Priya

  • Anonymous
    April 21, 2010
    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

  • Anonymous
    April 21, 2010
    The comment has been removed

  • Anonymous
    April 27, 2010
    You are most excellent.  This is a great start.

  • Anonymous
    May 10, 2010
    I second the motion requesting VB templates! Any timetable?

  • Anonymous
    May 25, 2010
    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

  • Anonymous
    May 25, 2010
    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?

  • Anonymous
    May 29, 2010
    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
  • Anonymous
    May 30, 2010
    Hi Once installed where are the templates located in both winXP and Window7 Cannot find them Thanks

  • Anonymous
    June 03, 2010
    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.

  • Anonymous
    June 06, 2010
    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 :)

  • Anonymous
    June 07, 2010
    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.

  • Anonymous
    June 07, 2010
    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

  • Anonymous
    June 07, 2010
    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