PortableRest
PortableRest copied to clipboard
UWP (Windows 10) gives File Not Found on System.Net
was playing with upgrading a Windows Phone 8.1 (RT) project to UWP but when I run it i'm getting an error in the constructor of my inherited RestClient that it cannot find system.net (full error below).
I don't know enough about the changes between 8.1 and 10 to know what I'm doing wrong, if I had to guess I would say that there's a conflict between the library referenced in the original portable library (4.0) and UWP (I think 4.5?) can I perhaps do an assembly redirect?
Error message follows:
An exception of type 'System.IO.FileNotFoundException' occurred in MyApp.Core.dll but was not handled in user code
Additional information: Could not load file or assembly 'System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The system cannot find the file specified.
perhaps this is related to the issue reported here in the SignalR project: https://github.com/SignalR/SignalR/issues/3483
and also posted on StackOverflow: http://stackoverflow.com/questions/29992221/universal-windows-platform-and-signalr-could-not-load-file-or-assembly-system
a solution is posted here: http://dotnetbyexample.blogspot.com/2015/05/getting-signalr-clients-to-work-on.html
but I wasn't able to successfully translate this to work with PortableRest. I did clone the source and attempt to remove the Silverlight target, resulting in .NET profile 259 but this appears to be missing a lot of references required by PortableRest. Adding Silverlight 5 updates it to .NET Profile 344 and it will build, but I end up with the same error above when I reference it in my project...
obviously I have no idea what I am doing, but hope perhaps this might be helpful for anyone smarter than I who has this problem to find and share a fix, thanks