MVC control libraries
-
Is it possible to write libraries that contain controls/markup for use by multiple MVC5 apps?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
Is it possible to write libraries that contain controls/markup for use by multiple MVC5 apps?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013Unfortunately, it seems only ASP.NET Core / .NET 5 supports this out of the box: Reusable Razor UI in class libraries with ASP.NET Core | Microsoft Docs[^] But you might be able to use RazorGenerator: GitHub - RazorGenerator/RazorGenerator: A Custom Tool for Visual Studio that allows processing Razor files at design time instead of runtime, allowing them to be built into an assembly for simpler reuse and distribution.[^] Reusable ASP.NET MVC components in dll like ASP.NET WebControls - Stack Overflow[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Unfortunately, it seems only ASP.NET Core / .NET 5 supports this out of the box: Reusable Razor UI in class libraries with ASP.NET Core | Microsoft Docs[^] But you might be able to use RazorGenerator: GitHub - RazorGenerator/RazorGenerator: A Custom Tool for Visual Studio that allows processing Razor files at design time instead of runtime, allowing them to be built into an assembly for simpler reuse and distribution.[^] Reusable ASP.NET MVC components in dll like ASP.NET WebControls - Stack Overflow[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
We're not using Core
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
We're not using Core
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013I know - that's why I suggested RazorGenerator.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Unfortunately, it seems only ASP.NET Core / .NET 5 supports this out of the box: Reusable Razor UI in class libraries with ASP.NET Core | Microsoft Docs[^] But you might be able to use RazorGenerator: GitHub - RazorGenerator/RazorGenerator: A Custom Tool for Visual Studio that allows processing Razor files at design time instead of runtime, allowing them to be built into an assembly for simpler reuse and distribution.[^] Reusable ASP.NET MVC components in dll like ASP.NET WebControls - Stack Overflow[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Well, I installed it and finally figured out how to get it working (the docs aren't exactly forthcoming - or complete). In any case, it looks like this is my only choice if I want to try doing what I need, so I 5'd you., Thanks for the info. :)
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
Unfortunately, it seems only ASP.NET Core / .NET 5 supports this out of the box: Reusable Razor UI in class libraries with ASP.NET Core | Microsoft Docs[^] But you might be able to use RazorGenerator: GitHub - RazorGenerator/RazorGenerator: A Custom Tool for Visual Studio that allows processing Razor files at design time instead of runtime, allowing them to be built into an assembly for simpler reuse and distribution.[^] Reusable ASP.NET MVC components in dll like ASP.NET WebControls - Stack Overflow[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
I am dismayed to find no tangible examples of its usage - nothing but casual mentions of what people did to make it work.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013