To support net and netcoreapp targets, the mac libvlc nuget targets file needs modification. It currently just support Xamarin.Mac targets.
I have a tried a few things but cannot get it to work (not copied to output) and the lack of diagnostics/logs is very annoying.
Xamarin.Mac knows how to reference the .framework with its specific NativeReference attribute.
With the other targets that don't understand NativeReference, we need to copy to the output (and rename) the dylib inside VLCKit.framework (i.e. VLCKit.Framework/VLCKit -> libvlc.dylib) to make P/Invoke work.
Will rename it for both before packaging if it doesn't break Xamarin.Mac.
Deciding to copy/link the dylib depends on the TFM, and targets/conditions DO NOT play nice on macOS (i.e. fails silently....)
You can add in your target to print debug info if you want. I don't think that you need the FullPath layer for only one file. Do you need to expose the IncludeFile property?
To support net and netcoreapp targets, the mac libvlc nuget targets file needs modification. It currently just support Xamarin.Mac targets.
I have a tried a few things but cannot get it to work (not copied to output) and the lack of diagnostics/logs is very annoying.
Xamarin.Mac knows how to reference the .framework with its specific
NativeReference
attribute.With the other targets that don't understand
NativeReference
, we need to copy to the output (and rename) the dylib insideVLCKit.framework
(i.e.VLCKit.Framework/VLCKit
->libvlc.dylib
) to make P/Invoke work. Will rename it for both before packaging if it doesn't break Xamarin.Mac.Deciding to copy/link the dylib depends on the TFM, and targets/conditions DO NOT play nice on macOS (i.e. fails silently....)
Relevant links: https://stackoverflow.com/questions/46796065/conditional-reference-in-visual-studio-community-2017 https://stackoverflow.com/questions/45215736/error-msb4067-the-element-when-beneath-element-choose-is-unrecognized