Hi,
Testing our plug-ins against latest Milestone release - 2021 R2 I noticed that GetOtherRecordingServersWithMedia server task method is missing in VideoOS.Platform.dll. When calling the method from my plug-ins - both Management and Smart client I get MissingMethod exception. Was this method deprecated forever or has some equivalent function we can use to detect hardware has been moved across recording servers.
Thanks in advance,
Nikolay.
We tried to do a small test..
For us this still works:
Camera cam = new Camera(_camera.FQID);
var serverTaskCollection = cam.GetOtherRecordingServersWithMedia();
This might be a wild guess on my part but the missing methods exception could be something else, if you build a plugin with MIP SDK 2021R2, then load it in a Smart Client older than 2021R2, it can cause the plugin not to load, but in that case you can replace the Smart Client’s VideoOS.Platform.dll with the new VideoOS.Platform.dll from your MIP SDK.
https://developer.milestonesys.com/s/article/XProtect-Smart-Client-cannot-load-your-MIP-plugin
Similar for Management Client:
https://developer.milestonesys.com/s/article/XProtect-Management-Client-cannot-load-MIP-plugin
If my wild guess does not fit please elaborate on how you build and debug, we might be able to figure out what goes on if we have more information.
Thanks for fast response,
Yes the issue is exactly you described but in our case the plug-in is built with older MIP SDK. I built it using latest VideoOS.Platform.dll (NuGet) and it works with 2021 R2 BUT same exception is thrown when running against older Smart/Management clients. Replacing the VideoOS.Platform.dll in the Milestone installation folders doesn’t work for us.
Was wondering whether there is alternative of GetOtherRecordingServersWithMedia() method which will work in all Milestone versions.
Note: I’ve checked methods in both old and new VideoOS.Platform.dll and noticed the return type is changed for this method - was ServerTask, now is ClassCollectionServerTask. Because of this depending on MIP SDK version the plug-in is compiled I see this error.
I have tried also the following code:
Camera camera = new Camera(FQID);
ServerTask task = camera.ExecuteMethod("GetOtherRecordingServersWithMedia");
but still not working with latest Milestone.
Regards,
Nikolay.
I have reported your observation with Milestone Development. I will get back with feedback..
You are right that this is a breaking change. Unfortunately, the type should have been ClassCollectionServerTask from the start, and as we - incorrectly
- didn’t realize that changing return type to a subclass would be breaking, we thought it would be the best to fix this.
As a work-around for making a version that works on all versions of the VMS, you should be able to use ExecuteMethod as you mention. I just tried and it works fine for me, so not sure what you exactly mean by it not working?
Just be aware that with ExecuteMethod you will often have to do two executions (if first result is an InvokeInfo), which is the case here, so you’ll need to do the following:
var res2 = cam.ExecuteMethod("GetOtherRecordingServersWithMedia");
var res3 = res2.ExecuteDefault();
We are sorry for the inconvenience this is causing you.
Thanks Peter,
You are right - this is working. The thing I was missed was usage of ExecuteDefault() method second time (I missed the type of the first server task is InvokeInfo, NOT InvokeResult). I have tried this against older and latest VMS versions (2021 R1/R2) and is working fine.
Thanks again,
Nikolay.