AaronRobinsonMSFT / DNNE

Prototype native exports for a .NET Assembly.
MIT License
406 stars 41 forks source link

DocFx: error : Generated source file(s) .... not found #159

Closed tvogel-nid closed 1 year ago

tvogel-nid commented 1 year ago

I'm actually run DocFx over a couple of projects and one of them uses DNNE to generate and build native libs. I use the way DocFx from csproj and from the description I read that

When the file extension is .csproj, .vbproj or .sln, docfx uses MSBuildWorkspace to perform a design-time build of the projects before generating API docs.

If I understand the DNNE.targets file correctly than the target:

<Target
    Name="DnneGenerateNativeExports"
    Condition="('$(DesignTimeBuild)' != 'true' OR '$(BuildingProject)' == 'true') AND '$(DnneSupportedTFM)' == 'true' AND '$(DnneBuildExports)' == 'true'"

checks for DesignTimeBuild and doesn't create the NativeExports, the following

  <Target
    Name="DnneBuildNativeExports"
    Condition="'$(DnneBuildExports)' == 'true'"

only checks for DnneBuildExports and therefor fails the copy step.

So I'd like to ask whether the check for DesignTimeBuild can be added here as well?

Thanks a lot Thomas

AaronRobinsonMSFT commented 1 year ago

@tvogel-nid Yep. That was done in https://github.com/AaronRobinsonMSFT/DNNE/pull/158. Updating to 2.0.1 will get you those changes.