YoutubeExtractor not working when release folder is moved to a different directory
YoutubeExtractor works fine for me when I open up my program in C# in Start Debugging mode. It downloads video's perfectly fine. However, after I copy the .exe and .dll files from the Release folder into a separate folder (Youtubeextractor.dll and Newtonsoft.Json.dll) it will not download anything.
I am using the same youtube.com links and have also included the .xml files. It still does not work. Any help or suggestions would be appreciated, I am not sure what I am doing wrong or missing. Thanks.
Edit: I am getting "Could not load file or assembly 'Newtonsoft.Json, Version 4.5.0.0'" ... or one of its dependencies. My project is using .NET version 4.0. How do I fix this?
UPDATE: OK I figured this problem out after trying all of the solutions posted on different message boards none of them worked. I tried the uninstalling Newtonsoft.Json and reinstalling it, did not work. I tried the editing the app.config and packages.config files for at least an hour, did not work. I updated Nuget, did not work. I tried the "Get-Project -All | Add-BindingRedirect" did not work. Finally, I decided to downgrade the Newtonsoft.Json.dll file to an old version and it worked! I downgraded Newtonsoft.JSon to version 4.5 and I just randomly chose a build for that version. You can find old versions of Newtonsoft.Json at https://json.codeplex.com/releases/view/598599 if the above fixes do not work for you either. Hopefully this saves someone some time one day.
My App.Config was changed to <.dependentAssembly.> <.assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral". /> <.bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" /> <./dependentAssembly.>
Packages.Config <.package id="Newtonsoft.Json" version="4.5.11" targetFramework="net40" ./>
Newtonsoft.Json version 4.5 and 11 is the build that I downloaded
[NOTE THE PERIODS IN THE TAGS!!! WOULD NOT DISPLAY PROPERLY AFTER COMMENT!!!]