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

Add Native AOT deployment #192

Closed
climblinne opened this issue Sep 30, 2024 · 3 comments · Fixed by #193
Closed

Add Native AOT deployment #192

climblinne opened this issue Sep 30, 2024 · 3 comments · Fixed by #193
Labels
enhancement New feature or request

Comments

@climblinne
Copy link
Contributor

Hello,

with .NET 8.0/9.0 the Native AOT deployment seems to work quite fine.
I would like to use it, because we have an "old" c-application, which uses multiple Native Export libraries (generated by DNNE).
Unluckily some are still based on .NET 5.0. Now my driver library updated to .NET 6.0 and the system crashes, because two version of .NET framework are not allowed.
When I use for my library the Native AOT deployment it works fine.

As I see, the export with

<PropertyGroup>
    <PublishAot>true</PublishAot>
</PropertyGroup>

works fine. Build automatically a lib file. Now only the header file is missing.
And this would be great, to just take it from DNNE.

So my idea would be to recognize the "PublishAOT" flag and generate the header file as usual (may be without the "SOURCE" part and file name without "NE").

Good idea? Regards Jan

@AaronRobinsonMSFT
Copy link
Owner

AaronRobinsonMSFT commented Oct 1, 2024

@climblinne This isn't unreasonable. Other people have also asked for something similar - @Sergio0694.

It looks like there is a bug in the props with DnneGenerateExports and DnneBuildExports. My intent with DnneBuildExports was to be able to set to false and perform the scenario you describe. I don't think triggering off of PublishAOT is a good idea and so it isn't something I'm inclined to implement. However, your project should be free to set DnneBuildExports to false and get the desired output.

As I mentioned there is currently a bug that I need to fix, but I should be able to put out a new package this week.

@AaronRobinsonMSFT
Copy link
Owner

AaronRobinsonMSFT commented Oct 8, 2024

@climblinne Updated - https://www.nuget.org/packages/DNNE/2.0.7

Set <DnneBuildExports>false</DnneBuildExports> in your .csproj to generate a header file, but not build.

@AaronRobinsonMSFT
Copy link
Owner

/cc @jkotas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants