Skip to content

Publish NE .dll #204

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

Closed
wants to merge 3 commits into from
Closed

Conversation

jtschuster
Copy link
Contributor

The native exports library doesn't get copied to the publish folder by default, so this adds it to an itemgroup to do that.

Should the .c, .h, and .lib folders also be published?

<None Include="$(DnneGeneratedBinPath)/$(DnneNativeExportsBinaryName).pdb" Condition="$([MSBuild]::IsOsPlatform('Windows'))">
<PublishState>Included</PublishState>
</Content>
<None Include="$(DnneGeneratedBinPath)/$(DnneNativeExportsBinaryName).pdb" Condition="$([MSBuild]::IsOsPlatform('Windows')) AND '$(DnneBuildExports)' == 'true'">
Copy link
Owner

@AaronRobinsonMSFT AaronRobinsonMSFT May 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition is on the enclosing ItemGroup, is it also needed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed here, I just missed the condition on the ItemGroup.

What exactly are the semantics of DnneBuildNativeExports vs DnneGenerateExports vs DnneAddGeneratedBinaryToProject? I'd imagine the .c and .h files still be copied if DnneBuildNativeExports != true but DnneGenerateExport == true, but with the condition on the ItemGroup it looks like they won't be copied to the output folder.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DnneGenerateExports - Toggles if the .h and .c files should be generated based on the .NET assembly. It fails if there aren't any exports.
DnneBuildNativeExports - Toggles if the native binary with the exports are compiled.
DnneAddGeneratedBinaryToProject - Toggles if the native binary should flow with the project references.

@jtschuster jtschuster closed this May 12, 2025
@jtschuster
Copy link
Contributor Author

I misunderstood the flags and assumed something was wrong, but I just need to add DnneAddGeneratedBinaryToProject.

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

Successfully merging this pull request may close these issues.

2 participants