Comments (5)
Sorry -- can't do this one. The most important part of this project depends on an API System.Runtime.Loader.AssemblyLoadContext which is not supported in .NET Standard or .NET Framework. So, this project is intentionally only for .NET Core.
from dotnetcoreplugins.
Sorry, I don't want to bother, I want to just point out that System.Runtime.Loader.AssemblyLoadContext is available in a nuget package System.Runtime.Loader.
Just for test I've added that package:
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
and target netstandard:
<TargetFramework>netstandard2.0</TargetFramework>
Rebuilding all without errors, tests also succed.
Now I suppose that this won't work if this library is linked to a full .net project but at least in the above scenario I describe why not?
from dotnetcoreplugins.
It's a good question. You've found one of the more obscure mistakes in .NET Standard 1.x packaging. Checkout this thread https://github.com/dotnet/corefx/issues/22142#issuecomment-444583754. Even though things look okay to the C# compiler, when you run a .NET Framework app, it will always fail with an error like this: FileNotFoundException: Could not load file or assembly 'System.Runtime.Loader'
.
from dotnetcoreplugins.
Understand, I guess that under the full .NET framework one should use the classical Assembly.LoadFrom from Reflection API or just give up with a PlatformNotSupported exception (at least until .NET framework team fixes the issue).
I think is important to move this wonderful library to NET standard with its wider audience: if it's fine for you I can just pull a request.
from dotnetcoreplugins.
There is no equivalent API on .NET Framework, and I don't see any value in targeting .NET Standard. This project is intentionally designed for .NET Core only. Unless the .NET Framework team adds the AssemblyLoadContext feature (which is extremely unlikely), I'm not going to change the framework support on this library.
Just to be clear - you can still write plugins using .NET Standard. But the host which loads plugins must be written in .NET Core.
from dotnetcoreplugins.
Related Issues (20)
- Use WeakReference to check if unload is successful HOT 3
- [Question] What happened to AddDependencyContext? HOT 9
- Add hot-reload to ASP.NET Core sample HOT 2
- How do I "Unload" a plugin/dll HOT 1
- Error starting application when plugin controller decorating with [ApiController]
- How can i use Plugin DBContext ? HOT 2
- Docker file build problems HOT 3
- [Question] Diamond dependency & shared types doesn't work
- Diamond dependency & shared types doesn't work when using NuGet packages HOT 2
- Error on loading NuGet package HOT 2
- [Question] [Help Wanted] JSON Serialization problems; can assembly name or version be changed at load time? HOT 1
- [Question] Some questions about the state of the project HOT 8
- 支持卸载吗 HOT 2
- [Question] How to inject Logger or IConfiguration in Plugins ? I tried and failed HOT 1
- Using the library in MacOs project
- [Question] Capturing exceptions
- RobiniaDocs API Explorer
- [Question] System.Data.SqlClient could not be found on my plugin HOT 1
- [Question] Hot-reload managed assemblies using assembly file lock instead of through FileStream
- System.PlatformNotSupportedException on Android
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 dotnetcoreplugins.