type System.Net.IPAddress not assignable to type System.Net.IPAddress

71 views Asked by At

Im writing a PCL in .net-standard to be used for both android and IOS.

Currently im writing a UDP multicast listener for device discovery.

however when i do

IPAddress multicastaddress = IPAddress.Parse("239.1.1.1");
client.JoinMulticastGroup(multicastaddress);

It will sort of error but still compile, the error is

Argument type 'System.Net.IPAddress [System.Net.Primitives, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]' is not assignable to parameter type 'System.Net.IPAddress [System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]'

My usings are as follows

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

my package.json is as follows

{
  "supports": {},
  "dependencies": {
    "Microsoft.NETCore.Portable.Compatibility": "1.0.1",
    "NETStandard.Library": "1.6.1",
    "System.ComponentModel.EventBasedAsync": "4.3.0",
    "System.Diagnostics.Process": "4.3.0",
    "System.Net.Http": "4.3.1",
    "System.Net.Sockets": "4.3.0",
    "System.Threading.Thread": "4.3.0"
  },
  "frameworks": {
    "netstandard1.5": {}
  }
}

Im really quite lost as to how to resolve this issue which i think may be causing issues down the line for me. Any help would be appreciated.

0

There are 0 answers