Code Monkey home page Code Monkey logo

Comments (5)

natemcmaster avatar natemcmaster commented on July 30, 2024

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.

adospace avatar adospace commented on July 30, 2024

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.

natemcmaster avatar natemcmaster commented on July 30, 2024

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.

adospace avatar adospace commented on July 30, 2024

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.

natemcmaster avatar natemcmaster commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.