By Luke Kolin 837789
#536241 I've started work on a vPilot plugin (thanks for the info Ross), but I don't think it's being invoked properly. I've got some debug code in it, but it doesn't appear in the vPilot console. How do I know if my plugin is being loaded successfully?

Cheers!

Luke
By Ross Carlson 887155
#536243 If you add the /dbgwin command line argument, the debug console will open immediately on startup, and you should then see an entry in the console indicating that vPilot has found your plugin. Looks like this:

Code: Select all[13:48:39.237] Found plugin: Metacraft.Vatsim.Vpilot.TestPlugin.TestPlugin


When you say you've got some debug code in it, what do you mean?
By Luke Kolin 837789
#536252
Ross Carlson 887155 wrote:If you add the /dbgwin command line argument, the debug console will open immediately on startup, and you should then see an entry in the console indicating that vPilot has found your plugin. When you say you've got some debug code in it, what do you mean?


You're awesome! I'm calling PostDebugMessage() on the Broker. Looks like it's not loading the plugin; it's built using .NET 4.0 but it claims it's a "new runtime". I'll back it down to 2.0 and see what happens.

Cheers!

Luke
By Luke Kolin 837789
#536253 Drat - can't do Memory mapped files in .NET 2.0. :(

Luke
By Ross Carlson 887155
#536262 In preparation for the AFV launch, I have had to move to targetting .net 4.7. The main vPilot assembly now targets 4.7, but the plugins assembly still targets 3.5. Would this allow you to use your 4.0 version? You can try it out by downloading 2.3.0 which is in the Beta updates channel. Let me know if it still complains and I can update the plugins assembly to 4.7 as well.
By Luke Kolin 837789
#536263 I'll need at least 4.0 - that seems to be where a lot of stuff got added. It's not a big deal (I managed to do it via P/Invoke) but I think targeting 4.0 would be a lot better than 3.5, unless it breaks something that already exists.

Cheers!

Luke
By Luke Kolin 837789
#536273
Ross Carlson 887155 wrote:Give 2.3.0 a try, that should let you load a plugin built on the 4.0 runtime.


Works like a charm. Thanks!

Luke
By Markus Ristl 820387
#538416 Hi Ross,

maybe this is the same issue that the Prosim Utils vpilot plugin is not working any more with v 2.4.0? The plugin does not get called during startup when I deleted the config.xml.

with /dbgwin the error states:
Code: Select all[21:08:13.433] Error loading plugin from file "C:\Users\Markus\AppData\Local\vPilot\Plugins\PSU.vPilot2.dll": Could not load file or assembly 'file:///C:\Users\Markus\AppData\Local\vPilot\Plugins\PSU.vPilot2.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
Last edited by Markus Ristl 820387 on Tue Oct 22, 2019 7:09 pm, edited 1 time in total.
By Markus Ristl 820387
#538423
Ross Carlson 887155 wrote:No, older plugins still work fine with 2.4.0. I am in contact with Humberto about it.


Ok. Than its in good hands.
Hopefully fixed before the CTP event on saturday. *fingerscrossed*