6

I got a plugin based architecture (using areas) in my solution which works fine.

The problem is that the plugin projects are class libraries and the Add View wizard is therefore not visible when I right-click on the views folder.

Are there a way to get that wizard on the class library? Or are there another way to get scaffolding in the class library project?

Paolo Moretti
  • 54,162
  • 23
  • 101
  • 92
jgauffin
  • 99,844
  • 45
  • 235
  • 372

1 Answers1

8

Are there a way to get that wizard on the class library?

Yes, in the .csproj file of your class library add the following to the first <PropertyGroup> node:

<ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
  • It will also convert the entire project to a WebApp (so that a devserver is started each time I run the project. 20 plugins = 20 dev servers running). Makes it hard to test the actual application. – jgauffin Jan 23 '12 at 10:53
  • @jgauffin, yeap, made a mistake. You should only include 2 Guids. I have updated my answer. Should work now. – Darin Dimitrov Jan 23 '12 at 11:02
  • 2
    To bring this good answer up-to-date: The "E53..." guid is for MVC3. For e.g. MVC5, use `{349C5851-65DF-11DA-9384-00065B846F21}` - you can see a complete list of projecttypeguids here: http://www.codeproject.com/Reference/720512/List-of-Visual-Studio-Project-Type-GUIDs. Just put all needed guids there in curly-braces, separated by semicolon. – Frederik Struck-Schøning Aug 11 '16 at 10:43