genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
387 stars 154 forks source link

1.3 to 1.4 C# functionality missing #474

Open guytpetj opened 3 days ago

guytpetj commented 3 days ago

I'm currently rewriting my swimming pool controller code from version 1.3 to version 1.4. Unfortunately, I'm running into a problem with 1,4 that some of the critical code is not supported.

WebRequest request = WebRequest.Create(NetServer+"99");
WebResponse webresponse = request.GetResponse();
Stream dataStream = webresponse.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
NetStatus = reader.ReadToEnd();

The code above worked fine in version 1.3. This code is used where NetStatus = Net.WebService(NetServer+"99").GetData(); is giving the incorrect response.

This is mission critical to me, how can I get this code working?

This is the error message given: The type name 'WebRequest' could not be found in the namespace 'System.Net'. This type has been forwarded to assembly 'System.Net.Requests, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Consider adding a reference to that assembly.