Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting the Razor templates in a class library

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?

like image 942
jgauffin Avatar asked Jan 23 '12 10:01

jgauffin


1 Answers

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>
like image 77
Darin Dimitrov Avatar answered Oct 06 '22 03:10

Darin Dimitrov