mfkl / libvlc-nuget

NuGet packaging setup for LibVLC
GNU Lesser General Public License v2.1
61 stars 10 forks source link

Add support for .netcoreapp and net4x TFMs to LibVLC.Mac #15

Closed mfkl closed 5 years ago

mfkl commented 5 years ago

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....)

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

jeremyVignelles commented 5 years ago

Can you change the name of your PR?

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?