You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm doing some MSBuild & NuGet acrobatics by packaging native library binaries and build files to make the consuming project use those binaries.
Until the static-linking part in NativeAOT. My idea was to add to NativeLibrary in a target, because I have to get the path from $(Configuration), which only exists in-msbuild-process.
Excerpt:
<!--- Package.targets file, which should be imported via generated '*.nuget.g.targets' -->
...
<TargetName="NativeFilesToCopy"
DependsOnTargets="PrepareNativeProps"
BeforeTargets="BeforeBuild">
<ItemGroup>
<DirectPInvokeInclude="package" />
<NativeLibraryInclude="$(NativeFilesPath)\package.lib" />
</ItemGroup>
...
The linker doesn't see the NativeLibrary inclusion and It's not finding the library file to link.
It seems like the package's build files are not used, only the project file.
Or am I hooking into the wrong target?
I tried #108981 (comment) (hooking after Build target) except added in the Package.targets, but it didn't work.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm doing some MSBuild & NuGet acrobatics by packaging native library binaries and build files to make the consuming project use those binaries.
Until the static-linking part in NativeAOT. My idea was to add to
NativeLibraryin a target, because I have to get the path from$(Configuration), which only exists in-msbuild-process.Excerpt:
The linker doesn't see the
NativeLibraryinclusion and It's not finding the library file to link.It seems like the package's build files are not used, only the project file.
Or am I hooking into the wrong target?
I tried #108981 (comment) (hooking after
Buildtarget) except added in thePackage.targets, but it didn't work.Beta Was this translation helpful? Give feedback.
All reactions