-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
c# adding [DllExport] feature #1013
Comments
Currently we need to decompile library, add .export directive and compile it back again. It is quite annoying |
This would be an interesting feature. I've only somewhat messed around with exporting methods like this from an assembly. If I recall this method was fraught with caveats concerning how and when the framework is loaded, and it also produces unverifiable assemblies. We ended up going with exporting COM-callable classes instead. |
Even IL have this feature. Why c# doesn't? If nobody will do it, ill do it by myself, this is not hard |
@Eugen1344 If you prepare a pull request, please call it to my attention and I will shepherd it. |
I'd love this as well. While there is a NuGet package that does this https://www.nuget.org/packages/UnmanagedExports, this is not cross-platform. If this was in the DotNet Compiler, it would thereby work on multiple OSes. Since most code on 'nix platforms are primarily in C or C++, having this functionality added to the DotNet Core would greatly increase the flexibility and adoption on non-windows OSes. With DLLExport, for example, one should be able to write plugins for existing Linux applications and have them be agnostic of the fact it was written in C#. Since C# is a ton easier to program in than C or C++, this should greatly increase its use on those platforms. |
Any movement on this issue? |
ping. |
Hey, @jaredpar, do you mind indicating why this was closed? was the feature implemented/discarded/etc? Thanks! |
I'm in the process of going through our issue backlog and closing out stale issues. This has been largely inactive for 3+ years now and there doesn't seem to be a clear plan for it moving forward. |
Thanks for clearing that up. It's understandable, as currently there's not enough demand to move forward with such a feature. bit of a bummer though, still a feature I'd like to see implemented. |
🔗 See also dotnet/csharplang#308 |
I am sure that c# need [DllExport("Foo")] attribute that will compile to .export [1] as Foo in IL code. So we will be able to export functions to unmanaged code to make posibility to write libraries for c++ for example.
The text was updated successfully, but these errors were encountered: