MSBuild is annoying and this is required to build incrementally. MSBuild will compare the oldest output to the newest input by default, and dnne.h from the nuget package is always going to be older than the generated header, so it'll never build incrementally. We need to create a 1:1 mapping from input item to output item, but this can ONLY be done when the output property is a transformation of the input https://github.com/dotnet/msbuild/issues/7021.
All of the output filenames are the same except for DnneGeneratedSourceFile. If we change that to $(DnneNativeExportsBinaryName).h (binaryname.h) instead of $(DnneGeneratedOutputPath)/$(TargetName).g.c we could make it a bit simpler by avoiding the extra "OutputFileName" metadata.
@jtschuster I fixed the workflows so the CI would work. Seems like there are some issues with these changes. Let me know if you want some help investigating them.
MSBuild is annoying and this is required to build incrementally. MSBuild will compare the oldest output to the newest input by default, and
dnne.h
from the nuget package is always going to be older than the generated header, so it'll never build incrementally. We need to create a 1:1 mapping from input item to output item, but this can ONLY be done when the output property is a transformation of the input https://github.com/dotnet/msbuild/issues/7021.All of the output filenames are the same except for
DnneGeneratedSourceFile
. If we change that to$(DnneNativeExportsBinaryName).h
(binaryname.h) instead of$(DnneGeneratedOutputPath)/$(TargetName).g.c
we could make it a bit simpler by avoiding the extra "OutputFileName" metadata.