Plugin running in Event Server throwing error at runtime:system.net.http missing method ReadAsMultipartAsync runtime error

The project builds and compiles fine and works fine on two machine, but throws this “method missing” system error on a different machine. I can see error in the Event Server MIP logs.

My target .NET framework version when building on Visual Studio 2019 is 4.6

I’ve actually successfully installed and used the plugin on two different Windows machines successfully. They were both using XProtect Essentials+.

This third new machine is a Windows Server 2016 Datacenter with XProtect Corporate 2019R3 installed.

The MIPSDK is the latest.

The important thing is that I have some external dependencies in my plugin (for sending and parsing HTTP requests and responses).

This is my generated .dll.config file for the plugin:

<?xml version="1.0" encoding="utf-8"?>
<configuration><runtime><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /><bindingRedirect oldVersion="0.0.0.0-4.1.1.3" newVersion="4.1.1.3" /></dependentAssembly><dependentAssembly><assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /><bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" /></dependentAssembly></assemblyBinding></runtime>
</configuration>

And the packages.config file in my Visual Studio project:

<?xml version="1.0" encoding="utf-8"?>
<packages><package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net46" /><package id="Newtonsoft.Json" version="12.0.3" targetFramework="net46" /><package id="System.Net.Http" version="4.3.4" targetFramework="net46" /><package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net46" /><package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net46" /><package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net46" /><package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net46" />
</packages>

And a screenshot my references are attached.

@Peter Posselt Vergmann (Milestone Systems)​ @Bo Ellegård Andersen (Milestone Systems)​ apologies for tagging you to this, but I’m on a deadline and need some pointers on how to resolve this.

Any help would be appreciated.

You should use .NET 4.7

https://doc.developer.milestonesys.com/html/index.html?base=gettingstarted/plug-in_development.html&tree=tree_search.html?search=4.7

Let us know if this solves it.

It did not, but thank you for the response.

I have asked you to not use the tagging feature to get priority. Everyone is on a deadline and we do our best to answer people as soon as possible.

Bo was kind enough to provide an answer this time, but in the future we will postpone answering postings tagged in this way.

This is not really a MIP SDK issue as the dll is Microsoft not Milestone. We would investigate what .Net is on the PC not working, but you might get more help in other forums more targeted to the dll in question.

Just a little clarification: As the reference is to a Microsoft dll and is something you added in your plugin, it is hard for us to find out why it is missing a method. Best guess is that it is a different version of .NET framework that is installed on the troublesome machine, but as Rie mentions .NET forums would probably be a better place to look for help on this.