Comments (3)
Can this library work as Plugin Loader
yes, but you may want to use DotnetCorePlugins
because this project is in slow development and for reseach purpose currently (no officol release on nuget.org)
but this have bug in razor that your library solves
well, there are only two ways to acrchve plugins, 1). Assembly.Load
and use MemeoryStream
or byte[]
2) AssemblyLoadContext
aka ALC
. the problem that razor happed is that the razor is load to Default
ALC in "hard code" way (ps: .net 6 + Source Generator should fixed this because now the razor files are generat .g.cs in your project obj
folder and there are no additional assembly need to be load).
and (for below .net 6 ) this project fix it in a very simple way , it add a fallback method to the default ALC and forward it to the plugin ALC.
LazyMan.ModularLoader/test/SubAppTest/HostApp/Startup.cs
Lines 47 to 78 in cb805ed
and that means you can not make a razor dll's assembly name as same as other plugins (because the way that razor add to Default ALC
is not compatiable with the "Plugin architecture" )
from lazyman.modularloader.
be notice that unloadable ALC have many limit as #1 meation ,
for example :
- unloadable ALC must not use dynamic proxy
- all asp.net core assembly must in "plugin host"
- only work with "framework dependend publish" (all because the 2nd issue, you must very careful to not add any host used asembly in your plugin, otherwise the Type mismatch as I meation in dotnet/runtime#37576)
and thats why this project no active develop.
from lazyman.modularloader.
ok, so i will try to do this in net 6 but i am also ready to wait till net 7 if that's going to solve these issues that you have pointed out.
i am very careful about point 2 as all development follow one common project as reference assembly holder+host & plugin folders only use specific refernces when/if required and not available in main project.
from lazyman.modularloader.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lazyman.modularloader.