Comments (22)
Are you using a Sdk-style vbproj format or a legacy format?
I think that we only support SDK-style project files, or at least only the new PackageReference system (and not the packages.config file).
Can you send us a project reproducing the issue on a github repository?
from libvlc-nuget.
I haven't been able to replicate the exact same problem. I have made this very quickly but this does not exclude the files I have set in the project file.
I am very sure that I am doing this wrong. I created the app, used Nuget package manager to get libvlc and dotnet.vlc.forms then I added the lines into the project file and built the solution. It just ignores my lines and adds everything to the debug folder.
I guess I am using legacy style if I have a packages config file.
I really only need the files for streaming a rtsp feed, so no sound, gui or anything else.
https://github.com/ShemJM/WindowsApp1/tree/master/WindowsApp1
from libvlc-nuget.
Your PropertyGroup and ItemGroup sections must be directly under the <Project>
tag, not under the <Target>
.
Yes, you are using the legacy project format, but maybe that will work anyway. Just keep in mind that VisualStudio does what it wants in that files.
I guess that it's what happened, it replaced the target content with what it read from the packages.
from libvlc-nuget.
I have migrated to a package reference style. It seems to be working better because the exclude/include lines are not being removed. The problem is that when I load my project the files mentioned in those lines whether they are excluded or included are being placed in to my solution explorer.
<ItemGroup>
<VlcWindowsX86IncludeFiles Include="libvlc.dll;libvlccore.dll" />
</ItemGroup>
UPDATE:
Just after writing this message, I reloaded the project and the lines were gone. It seems if I delete the files from the solution explorer, the lines are removed from the project file.
from libvlc-nuget.
If you remove them from Visual studio, of course it does remove the lines in your project file.
However, those file should not appear in your solution explorer and I'm still wondering why they do...
EDIT: Please update your github repo so that we can try locally.
from libvlc-nuget.
I have made this repo where the same issue is occurring.
https://github.com/ShemJM/WindowsApp1
It is just an example project because the project I am working on where I had the original issue is not public. I am not sure how helpful the repo will be. Perhaps it would be easier to follow my steps and see if you experience the same issue.
- Create new visual basic winforms application
- Use nuget package manager to download vlc.dotnet.forms and VideoLAN.LibVLC.Windows.
- Unload the project.
- Add the exclude lines to the vbproj file. Save.
- Reload project. Files are now in the solution explorer.
I should add that my app is working I can use the vlc control to play videos. I just want to cherry pick the files so I can get the install size down.
from libvlc-nuget.
It seems that because you are not using the SDK-style projects, VS displays the items this way.
Can you try wrapping your ItemGroup in a
<Target Name="LibVlcWindowsCherryPick" BeforeTargets="CollectVlcFilesToCopyWindows">
</Target>
That should work.
(note: you can pick whatever Name you want, but don't touch the BeforeTargets, it's defined here
from libvlc-nuget.
Yes, that works, thank you.
<Target Name="LibVlcWindowsCherryPick" BeforeTargets="CollectVlcFilesToCopyWindows">
<ItemGroup>
<VlcWindowsX86ExcludeFiles Include="hrtfs\%2A%2A;
lua\%2A%2A;
locale\%2A%2A;
plugins\audio_filter\%2A;
plugins\audio_mixer\%2A;
plugins\audio_output\%2A;
plugins\access_output\%2A;
plugins\control\%2A;
plugins\d3d9\%2A;
plugins\d3d11\%2A;
plugins\demux\%2A;
plugins\gui\%2A;
plugins\keystore\%2A;
plugins\logger\%2A;
plugins\lua\%2A;
plugins\meta_engine\%2A;
plugins\mux\%2A;
plugins\text_renderer\%2A;
plugins\visualization\%2A;
plugins\video_chroma\%2A;
" />
</ItemGroup>
</Target>
from libvlc-nuget.
Feel free to close this if you got your question answered ;-)
from libvlc-nuget.
plugins\d3d11%2A;
I wouldn't recommend you to disable those, you won't get any hw acceleration if you do
plugins\demux%2A;
Did you test that one? I'm not sure that would work without any demuxer.
plugins\access_output%2A;
I had crashes if I didn't include at least mmdevice on windows... don't know if this has been fixed since then.
from libvlc-nuget.
I am only using this for a rtsp stream from our IP cameras. It seems to work fine without those files. I don't know much about the different options. I was just trying to use the bare minimum because by adding LibVLC my project size has gone from 12MB to 63MB. That is after cherry picking because at first it was 320MB.
from libvlc-nuget.
I think you can shrink it further by including only what you need. in codec, you could try with only libavcodec... you will also probably need only rtsp and rtp access.
from libvlc-nuget.
but I would keep d3d libs for hardware acceleration
from libvlc-nuget.
I was going to ask for advice on how to shrink it further, so thank you again. I will try without those.
from libvlc-nuget.
Sorry, one more question. I have managed to find the small amount of files I actually need. Is there a way for me to just write lines to include those rather than lines that exclude everything else?
from libvlc-nuget.
Yes, that was what I suggested : https://github.com/mfkl/libvlc-nuget/blob/master/cherry-picking.md#cherry-pick-the-files-you-need
from libvlc-nuget.
I did try an inclusive strategy but it just included every file. That is why I moved to exclusive.
from libvlc-nuget.
That shouldn't be, please share a sample
from libvlc-nuget.
Well I just copied from your example
<Target Name="LibVlcWindowsCherryPick" BeforeTargets="CollectVlcFilesToCopyWindows">
<ItemGroup>
<VlcWindowsX86IncludeFiles Include="libvlc.dll" />
</ItemGroup>
</Target>
Something like that, but that would include every file still
from libvlc-nuget.
Use
<Target Name="LibVlcWindowsCherryPick" BeforeTargets="CollectVlcFilesToCopyWindows">
<ItemGroup>
<VlcWindowsX86IncludeFiles Remove="@(VlcWindowsX86IncludeFiles)" />
<VlcWindowsX86IncludeFiles Include="libvlc.dll" />
</ItemGroup>
</Target>
Since you are using a target, your "Include" adds an item to the list that has already populated here :
You thus need to remove the default items.
from libvlc-nuget.
I see, that makes sense. I will try it out tomorrow when I am at work. Thanks again :D
from libvlc-nuget.
Works perfectly.
from libvlc-nuget.
Related Issues (20)
- Unhandled exception when launching sample HOT 5
- Provide many dynamically linked dylibs instead of 1 .framework to enable plugin cherry picking HOT 2
- Problem when using together with SkiaSharp - iOS - only real device HOT 10
- I'm trying to use libVLCSharp.Forms nugut for displaying video from an UDP stream but it just doesn't seem to work. HOT 15
- System.DllNotFoundException: libvlc HOT 9
- Finish Android packaging script
- Add ARM64 support to LibVLC UWP nuget
- Fix icon packaging for nuget
- Add support for packaging when giving local path when vlc is built locally
- Is there libvlc version for samsung tizen? HOT 1
- VideoLAN.LibVLC.Mac for version 4 pre-release channel? HOT 2
- How to fully exclude x86? HOT 3
- Can you fix the bug that gets stuck when playing some videos? HOT 2
- LibVLCSharp.Forms.WPF MediaPlayer plays Media in a seperate window HOT 1
- Support decode flv with hevc(h265) codec HOT 2
- Can this be consumed from C#? HOT 3
- .targets file not including libvlc on Android sometimes HOT 1
- UWP packaging HOT 3
- Add tvOS libvlc build on nuget HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libvlc-nuget.