dotnet / dotnet/aspnetcore

Loading cshtml views from external dlls

Open
#50,620 1 comment 0 reactions 0 assignees View on GitHub
area-mvc
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

Hi,

I'm converting a .net framework 4.7.2 MVC application, and the main application has views (cshtml) that can load partial views from external mvc projects using @Html.Partial().

It does this using a custom razor engine which dumps all the views into one location and then reads them from disk.

Is there a native way of doing this using asp.net core? I've been trying various options such as custom ControllerFeatureProvider that allows the controllers to be found in external dlls, but it does not work with views, I've also been having a look at EmbeddedFileProvider but it doesn't seem to like that.

I haven't seen anything in the documentation that allows the code to search in external dlls for cshtml files bases on viewpath.

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.