I have an intermitted build issues related to LibVLCSharp and the bin\Debug outputs.
When I build a Solution containing a LibVLCSharp Project, I can see the libvlc.dll in the final win-x64 output folder, but when I start debugging, the following files get deleted, and the application fails with :
LibVLCSharp.Shared.VLCException: 'Failed to load required native libraries.
Have you installed the latest LibVLC package from nuget for your target platform?
The only only files that get deleted are:
It's an intermitted issues and seems to get resolved when I reboot.
Under what conditions would files in the Solution output folder get purged at Debug Startup?
bin\Debug\net5.0-windows\libvlc\win-x64\
I can manually get around this by copying the files back, but I'm trying to understand why this is happening.
There are no pre or post build steps in the Solution.
The LibVLC-nuget project is meant to be refereced directly in the startup project.
This is because we embed target files in the NuGet packages that creates a Task that executes BeforeBuild, and I'm not sure how that would work in referenced projects. You can see it there : https://github.com/mfkl/libvlc-nuget/blob/56178d3d4fd4d5b4874d41e5e9de07116be4cb64/build/VideoLAN.LibVLC.Windows.targets#L16
I'm pretty sure msbuild does not rebuild your dependent project every time, thus not catching the conditional "Content" files.
We do this, because otherwise the visual studio project tree would be filled with every .dll files from the plugins folder, which would slow down the visual studio process.