diff --git a/ClientTest/ClientTest.csproj b/ClientTest/ClientTest.csproj
index 553a4783..1df0586a 100644
--- a/ClientTest/ClientTest.csproj
+++ b/ClientTest/ClientTest.csproj
@@ -21,7 +21,7 @@
-
+
diff --git a/Stardust.Data/Stardust.Data.csproj b/Stardust.Data/Stardust.Data.csproj
index e6200e7a..d8c663cb 100644
--- a/Stardust.Data/Stardust.Data.csproj
+++ b/Stardust.Data/Stardust.Data.csproj
@@ -39,7 +39,7 @@
-
+
diff --git a/Stardust.Server/Stardust.Server.csproj b/Stardust.Server/Stardust.Server.csproj
index 772d6f4b..6814f5d5 100644
--- a/Stardust.Server/Stardust.Server.csproj
+++ b/Stardust.Server/Stardust.Server.csproj
@@ -32,7 +32,7 @@
-
+
diff --git a/Stardust.Web/Stardust.Web.csproj b/Stardust.Web/Stardust.Web.csproj
index 0b2684a0..30f24e7d 100644
--- a/Stardust.Web/Stardust.Web.csproj
+++ b/Stardust.Web/Stardust.Web.csproj
@@ -42,8 +42,8 @@
-
-
+
+
diff --git a/Stardust/LocalStarClient.cs b/Stardust/LocalStarClient.cs
index 8465c018..fc83b528 100644
--- a/Stardust/LocalStarClient.cs
+++ b/Stardust/LocalStarClient.cs
@@ -447,19 +447,27 @@ public static IEnumerable Scan(AgentInfo local = null, Int32 timeout
var rs = new DefaultMessage();
IPEndPoint ep = null;
buf = udp.Receive(ref ep);
+#if NET40
if (buf != null && rs.Read(buf) && encoder.Decode(rs, out var action, out _, out var data))
{
- //ms = rs.Payload.GetStream();
- //var reader=new BinaryReader(ms);
- //var name=reader.ReadString();
- //var code = reader.ReadInt32();
- //var data=reader
-
var js = encoder.DecodeResult(action, data, rs);
var info = (AgentInfo)encoder.Convert(js, typeof(AgentInfo));
yield return info;
}
+#else
+ if (buf != null && rs.Read(buf))
+ {
+ var msg = encoder.Decode(rs);
+ if (msg != null)
+ {
+ var js = encoder.DecodeResult(msg.Action, msg.Data, rs);
+ var info = (AgentInfo)encoder.Convert(js, typeof(AgentInfo));
+
+ yield return info;
+ }
+ }
+#endif
}
}
#endregion
diff --git a/Stardust/Stardust.csproj b/Stardust/Stardust.csproj
index 63d49f70..de851bd2 100644
--- a/Stardust/Stardust.csproj
+++ b/Stardust/Stardust.csproj
@@ -86,8 +86,8 @@
-
-
+
+
diff --git a/Test/Test.csproj b/Test/Test.csproj
index b2ab66c1..f1507bbd 100644
--- a/Test/Test.csproj
+++ b/Test/Test.csproj
@@ -25,7 +25,7 @@
-
+