I am confused on the basics of using a library. I understand that there is a library called FFMpeg and a wrapper called FFMpegCore so we can use FFMpeg with C#, correct? I downloaded both FFMpeg and FFMpegCore and I have them in my project's folder. Although I didn't perceive any class named FFMpegOptions in either of the file's folders.
I am stuck on how to actually set it up so I can use it in my little project, I never downloaded someone's library before. Can somebody please walk me though the motions of connecting the three of them together?
So far I experimented with:
Add a reference to my project, but there doesn't seem to be any .dll, .tlb, .olb, .ocx or .exe files to add
Add an existing project to my solution. There is a project called FFMpegCore.csproj but adding it raises a missing SDK error. Weirdly enough, opening the same project as a standalone doesn't raise any issues which makes me thing the operation I am trying is inadequate.
I am sure this is a silly and easy setup to perform but I just don't know enough to find a solution.
First you must download and install ffmpeg on your machine, (to test that it is working correctly, open a CMD and execute "ffmpeg", it will return the installed version.
Second, create a new project, (I recommend .NETFramework) once your project is created, it is necessary to install the package from NuGet, this function is found in tools> NuGet Package Manager> Manage packages for solutions...>
Then search for FFmpegCore and install it in your project,
The necessary dependencies will be added, now you can start programming with this Framework,
I recommend the FFMpeg.cs class as an example of the documentation, to start with.
Good Luck.
Related
For the application that I am making, I need to make use of the Pdfiumviewer package, which in turn requires you to add Pdfium itself, which is made available by Google. There is a "tutorial" on how to add pdfium on the official site but I haven't been able to decipher what exactly it is that I need to do.
At first glance, it appeared that you can get Pdfium via de Nuget Package Manager but it quickly became apparent that nuget doesn't add the actual dll to the project, and simply adding it as a reference doesn't work either. (throws 'reference could not be added' error).
After this, I attempted to move the Pdfium dll to the bin/debug folder, but that still gives the same error. After doing some research, I found out that this dll is not supported by visual studio and you have to build/integrate it using the command line.
There are instructions on how to achieve this provided on
https://pdfium.googlesource.com/pdfium/
https://github.com/pvginkel/PdfiumViewer/wiki/Building-PDFium
but after a few days of reading into it, I still have no clue what exactly I should and shouldn't do in the tutorial provided by google.
Therefor, I would like to kindly ask if anyone is either able to explain in plain english how to run through these steps, or if anyone knows a more user friendly tutorial to follow.
Many thanks in advance!
~Melvin
In case anyone still needs help with this, I was having the same problem and solved it using #Jack 's comment on #Paddy 's solution:
Install PdfiumViewer NuGet package
Install PdfiumViewer.Native.x86.v8-xfa NuGet package
Install PdfiumViewer.Native.x86_64.v8-xfa NuGet package
After installing all 3 packages, I published the application (my application is ClickOnce) and executed it, and it worked just fine!
I assume you're using Winforms?
To get the pdfRenderer control in a WinForm: Add the PdfiumViewer NuGet package to the project; open the projects packages folder in Windows Explorer and drag the PdfiumViewer.dll file onto the Toolbox window; A control called PdfRenderer will be available to add:
I had tremendous grief with this missing dll, until I found the easiest way I found was to go to Nuget Package Manager and install the PDFium.Windows package.
Trying to work on a C# project https://github.com/cliftonm/FlowSharp on my Mac (El Capitan 10.11.6). Install Rider, install mono connect to project and everything seems fine, but the project won't build.
Lots of stuff defined in the Services directory are not found (show up broken in References). File names in error messages actually exist (.csproj files from the project's local git workspace) and are readable.
Must be something basic, but help seems hard to find. Are there better tools for me? What do I need to make these tools work. New to C# and mono, but not to software.
i got some troubles to display a pdf using pdfium using c#. I read this other question:
Read a stored PDF from memory stream
i downloaded the pdfiumViewer package, but when i compile it, it says that it can't find the pdfium library. So, I downloaded the package "pdfium.net SDK" so it's working but it's not free, it's limited version. what i was wondering is : do we must have the package "pdfium.net SDK" to have the "pdfiumViewer" working" ?
thx !
The SDK you found, which I guess is Patagames's Pdfium.Net SDK, which is indeed a paid solution.
PdfiumViewer is free, but you have to have pdfium built, which is pretty thoroughly documented.
Pdfium.dll is already integrated into PdfiumViewer. But for it to be loaded, you need when building your project, to copy this file next to your application, either in the root or the x86 or x64 sub directory. The easiest way to accomplish this is by changing the properties of that file, changing the Copy to Output Directory setting to Copy always.
Try the NuGet package "PdfiumViewer". Works like a charm!
In my case*, I needed the NuGet Package PdfiumViewer.Native.x86.v8-xfa, which adds the needed DLL.
Got it running after 10 minutes with this code.
*) Visual Studio 2019 Pro, Windows 10 x64 Pro
After copying the project to another laptop/ PC, when I want to open the solution, VS2010 shows the error "One or more project was not loaded properly". I have tried running visual studio in admin mode but that did not solve the problem.
This is usually a result of an inconsistency in your solution or projects. Open the solution file in an external editor (such as notepad) and check that the path it has to the projects is available and did not change. There shouldn't be any absolute paths in the solution file.
Maybe because the project from where you copied was configured with IIS configurations and you are trying to run the project in visual studio's default environment.
you have to right click on your project and set as a start up project after that you have run your project,
I seem to have found unloaded project, after noticing there's one missing by manually counting and comparing it to the number of projects the solution explorer reported. It was deep inside another folder in the solution explorer that I never used and assumed that had nothing worthwhile.
It's a familiar issue. Looks like the project you are trying to open was created in higher version than what you have. If the project is in MVC, make sure you have installed MVC OR Make sure you have appropriate version of .NET installed in your system.
I work with NopCommerce and a couple of times I downloaded new version and got same error message. It goes away once I install the dependencies.
Because you tagged it ASP.NET make sure you have all the ASP.NET components installed. Those are not part of .net framework but might be necessary in your project.
I'm trying to install a custom test adapter via NuGet, but it seems like VS isn't recognizing it. I've looked through the code in Microsoft.VisualStudio.TestWindow.VsAdapters.UnitTestExtensionDiscoverer, so I've realized the dll has to end with *.TestAdapter.dll. Using that name makes vstest.console work for me when I specify /TestAdapterPath, so I'm not sure why the VS2013 test window isn't showing my tests.
The adapter does work when installed by copying the relevant files to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions.
Are there any other path or filename conventions I need to follow for VS2013 to load my test adapter? Without any logging or error messages I'm really not sure how to gather more information to debug this.
The issue seems to have been that I was trying to debug by overwriting my dlls in the packages directory. This doesn't work because VS copies your package directory to something like:
%TEMP%\VisualStudioTestExplorerExtensions\My.TestAdapter.1.0.0.23
essentially caching it with the key being the version number. If you copy the file into the project packages directory VS won't copy it because the folder number didn't change. So, to update your extension you have to keep publishing NuGet packages.
At least that's how I understand it.
Edit: I've also noticed that when you upgrade your test adapter through NuGet, it won't start using the new version until you restart VS, or kill vstest.*