This is quickly getting outside my area of expertise 😢 Hopefully support can come up with something better. The way I understand it, it works roughly like this (take it with a huge pinch of salt):
1) When you execute a .Net task in VC, the excuting program is NETExecute40x86.exe, located in the VC installation folder C:\Program Files (x86)\VisualCron
2) It then checks the app.config file to see which assemblies to load. The way the .NET runtime searches for assemblies is described in this article below.
https://docs.microsoft.c...ntime-locates-assemblies 3) For strongly named assemblies, it will first look in the GAC (Global assembly cache), but this does not work for partially bound assemblies. So your Newtonsoft problem is easy to fix (it is strongly named). Just add to the GAC. If you don't do this, it will attempt to load the Newtonsoft library that VisualCron is using. This is a different major version from what you are using, and so it fails.
4) The other one, pledge.remote is the more tricky one, since it is partially bound. It won't look in the GAC, and just gives up as it cannot find it in C:\Program Files (x86)\VisualCron. That is why we have created a subfolder C:\Program Files (x86)\VisualCron\Assemblies where we place our assemblies. In the NETExecute40x86.exe.config we have added a probingPath, where we tell it to look in this folder for assemblies. Unfortunately this has to be a subfolder to the executing program, which kind of sucks. But this is outside the control of VC.
To load assemblies into the GAC, I like to use the GAC manager which is open source and free.
https://www.codeproject....-Manager-Utility-and-API . Just download, place it on the server, and do File => Add.
I believe you can also use the machine.config file to tell the runtime where to look for assemblies, but I have never tried this. Just note that this is not really a VC issue, it's just that working with dll's is a nightmare, and especially the partially bound ones. I would try very hard to avoid those type of assemblies (ie look for another library that is strongly named and does a similar job)
Edited by user
2018-02-16T13:41:24Z
|
Reason: Not specified