When debugging UWP app from Visual Studio I get: System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.ApplicationServices

itnifl
itnifl used Ask the Experts™
on
I have a .Net Framework (4.6.1) class library project (call it A).
Then I have a UWP app (call it B), and I want to use the code in A by referencing to A from B. But that is not possible. UWP apps are .Net Core and not compatible with .Net Framework.

So I created a .Netstandard 2.0.3 class library project (call it C), to be a proxy between A and B. I now reference from A (the UWP app) to C (the .Netstandard class library), and then from C to B (the .Net framework class library).

Everything compiles now, but when I run/debug the UWP app in Visual Studio I get the following error originating from the code in A:

System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.'

System.Web.ApplicationServices is a .Net Framework reference in A, and is not compatible with B. I was hoping to get around this by using .Net standard and C as a proxy between A and B.

Any suggestions on how to fix this?

Code examples won't help here, the code works fine, but not the integration between the various technologies.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
you need A to be running as a service and have B send an api call and then retrieve the data from A to B

The way you are doing it all you are doing is moving the error from B to C

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial