microsoft / windows-admin-center-sdk

SDK including documentation and sample code for developing extensions for Windows Admin Center (previously Project Honolulu)
Other
119 stars 51 forks source link

Gateway plugin example fails when built with .Net 472 #166

Closed donatwork closed 3 years ago

donatwork commented 3 years ago

I've been able to get the Gateway Plugin example working but due to some other dependencies in my extension I require a minimum of .Net 472. When I build the plugin to target net472 the previously working extension now fails with the following error:

{"error":{"code":"TypeLoadException","message":"Method 'Process' in type 'MyPlugin.SampleHttpPlugIn' from assembly 'MyPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation."}}

I'm using the web browser to access the endpoint. Running WAC 1.3.2103.01006.

Has anyone run into this? Is net452 the only target allowed?

All one needs to do to reproduce is to change the target framework to net472 and access the plugin service via a browser.

donatwork commented 3 years ago

I ended up figuring it out, the build of WAC seems to be targeted for net462 so I was able to set that as the target for my gateway extension and dependencies. The error message could have been a bit clearer IMHO.