Getting Razor Templates in the Class Library

In my solution, which works fine, I got an architecture with plugins (using scopes).

The problem is that plugin projects are class libraries, so the Add View wizard does not appear when I right-click on the views folder.

Is there any way to get this wizard in the class library? Or is there another way to get scaffolding in a class library project?

+6
source share
1 answer

Is there any way to get this wizard in 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> 
+7
source

Source: https://habr.com/ru/post/906644/


All Articles