I am compiling a solution using Visual Studio 2019. This solution has two projects, we can call them Common and Program. Program depends on Common and Common depends on the NuGet packages LibVLCSharp
, LibVLCSharp.WPF
and VideoLAN.LibVLC.Windows
.
If I clean and then build Program, everything is fine: the dlls are correctly copied in bin/Debug
or bin/Release
. But if I make any change to Program and compile it without cleaning it, the dlls relative to VLC disappear.
What can be the reason for the dlls to disappear? In the visual studio UI I do not see the commands it is running when I compile the project. How can I debug it?
It seems that you are referencing VideoLAN.LibVLC.Windows
on your Common
project rather than in your Program
project. This is not a scenario that we support.
I wrote this explanation about which project you should install LibVLC in.
In short, you should install the LibVLC
package only into your application project, because we insert a build step that copies the files to the Output Folder of your project.
If you reference the LibVLC project in the Common
project, there is no way we can copy the files to the Program
project, because it is not known by MSBuild. You would then have to tell MSBuild to copy those files from Common/bin/...
to Project/bin/...
, but trust me, you don't want to mess with MSBuild.
EDIT: That doesn't mean that you can't use LibVLCSharp in your Common project. You can reference the LibVLCSharp packages in your Common
project, because it only depends on VideoLAN.LibVLC.Windows
at runtime.