Search code examples
wpfmvvmvisual-studio-2017nugetmvvm-light

MVVM Light templates not showing in "Add Item" menu (VS 2017)?


I've installed MVVM Light Toolkit through NuGet in VS 2017. The problem is that when I click "Add New Item" on any project, I don't see any MVVM templates that appear in MVVM Light tutorials.

They must look like this (but I don't see them in my project): http://prntscr.com/n9bs1q

I found similar questions about VS 2012. The answers advise to search for C:\Program Files (x86)\Laurent Bugnion (GalaSoft)\Mvvm Light Toolkit\Vsix

But I have no such folder not in Program Files (x86), neither in Program Files.

Help me please, what should I do for the templates to appear?


Solution

  • MVVM Light NuGet can only add related resources (assemblies/.cs files) into the project. It wont add Templates into Visual Studio. To get templates in Visual Studio, you have to install MVVM Light Visual Studio Extension by following the below steps.

    1. Open Visual Studio and go to Tools->Extensions and Updates.
    2. In the Extensions and Updates window lick Online in the left pane.
    3. In the search bar, type MVVM Light.
    4. In the search results find MVVM Light for VS2017. Click Download and accept license.

    Extension will be installed once Visual Studio gets restarted. Then you can get the templates.

    enter image description here

    UPDATE:

    They have stopped support of Item Templates for MVVM Light in Visual Studio 2017. Its been there up to VS 2015. So you can only get Project Templates (File->New Project) in VS 2017 extension. You can see similar queries here.

    enter image description here