You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Is there a way (or are there any plans) to support loading view components (both the controller and the view) from an ASP.NET class library? I also noticed that at the moment one can add a project reference from one MVC application to another within the same solution. Is this expected behavior? What is the potential scenario that is covered by such a reference? I am asking as this would work perfectly for me if the views from the referenced MVC application would be discoverable by the rendering engine. Thanks!
The text was updated successfully, but these errors were encountered:
I am also looking for such a feature. Being able to have views discoverable when they reside in class libraries would be a fantastic addition to the framework. Currently controllers are no issue at all, but having to 'split' views from controllers seems a bit unfinished.
It turns out that you are able to load views from a referenced class library using the EmbeddedFileProvider. The limitation of this approach is that all your views would have to be loaded from one class library. There is currently a pull request out (aspnet/FileSystem#142) to add a CombinedFileProvider which would allow you to combine the default PhysicalFileProvider with one or more EmbeddedFileProviders. There is still an on-going issue with packaging and extracting static files from a class library but that is currently discussed in dotnet/aspnetcore#651.
Is there a way (or are there any plans) to support loading view components (both the controller and the view) from an ASP.NET class library? I also noticed that at the moment one can add a project reference from one MVC application to another within the same solution. Is this expected behavior? What is the potential scenario that is covered by such a reference? I am asking as this would work perfectly for me if the views from the referenced MVC application would be discoverable by the rendering engine. Thanks!
The text was updated successfully, but these errors were encountered: