Skip to content
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

Closed
Eugen1344 opened this issue Mar 4, 2015 · 11 comments
Closed

c# adding [DllExport] feature #1013

Eugen1344 opened this issue Mar 4, 2015 · 11 comments

Comments

@Eugen1344
Copy link

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.

@Eugen1344
Copy link
Author

Currently we need to decompile library, add .export directive and compile it back again. It is quite annoying

@Eugen1344 Eugen1344 reopened this Mar 4, 2015
@theoy theoy added this to the Unknown milestone Mar 5, 2015
@HaloFour
Copy link

HaloFour commented Mar 8, 2015

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.

@Eugen1344
Copy link
Author

Even IL have this feature. Why c# doesn't? If nobody will do it, ill do it by myself, this is not hard

@gafter
Copy link
Member

gafter commented Mar 11, 2015

@Eugen1344 If you prepare a pull request, please call it to my attention and I will shepherd it.

@securityvoid
Copy link

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.

@bazzilic
Copy link

Any movement on this issue?

@jcouv jcouv modified the milestones: Unknown, 16.0 Oct 23, 2017
@WillFM
Copy link

WillFM commented Feb 17, 2018

ping.

@WillFM
Copy link

WillFM commented Jul 17, 2018

Hey, @jaredpar, do you mind indicating why this was closed? was the feature implemented/discarded/etc?

Thanks!

@jaredpar
Copy link
Member

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.

@WillFM
Copy link

WillFM commented Jul 17, 2018

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.

@sharwell
Copy link
Member

🔗 See also dotnet/csharplang#308

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

10 participants