WebSocket4Net icon indicating copy to clipboard operation
WebSocket4Net copied to clipboard

.NET Standard 2.0

Open breyed opened this issue 7 years ago • 11 comments

Currently, adding the WebSocket4Net NuGet package to a project running on the .NET Framework causes several System.*.dll files to be created in the output directory. These files are redundant with the similar files in the GAC. They are slower because they must be deployed, are not pre-jitted, and are not likely to be already loaded into memory by another process.

Updating the DLL and NuGet package to target .NET Standard 2.0 would avoid these problems. The package would continue to work on downlevel platforms, such as .NET 4.5, as long as no dependencies on features specific to later releases are introduced.

breyed avatar Apr 09 '18 13:04 breyed

Great, I'll work on it.

kerryjiang avatar Apr 09 '18 15:04 kerryjiang

Which version of .NET Framework do you use?

I don't have this problem if I set .NET 4.6 as my project's target.

Probably multiple targets cause this problem?

kerryjiang avatar Apr 10 '18 04:04 kerryjiang

I'm using a new-style project (initial element is <Project Sdk="Microsoft.NET.Sdk">), with <TargetFramework>net46</TargetFramework>. It references WebSocket4Net with this:

<PackageReference Include="WebSocket4Net" Version="0.15.2" />

Some of the other assemblies that the project depends on (not related to WebSocket4Net) have <TargetFrameworks>netstandard2.0;net46</TargetFrameworks>.

breyed avatar Apr 10 '18 11:04 breyed

Any updates on this topic?

wollkopf avatar Aug 14 '18 13:08 wollkopf

Me too following the topic. Can't wait to see the support for .NET Standard 2.0!

lorenzo93 avatar Sep 07 '18 10:09 lorenzo93

Any updates on this?

yiev avatar May 08 '19 08:05 yiev

It is on the way: https://github.com/kerryjiang/SuperSocket/tree/master/src/SuperSocket.WebSocket

WebSocket4Net should be base on SuperSocket.WebSocket. That means server side and client side share the same protocol implementation.

kerryjiang avatar May 08 '19 16:05 kerryjiang

Any update on supporting Net Standard 2.0? I want to include it in my Core 2.2 project

sasaman91 avatar Oct 28 '19 13:10 sasaman91

Actually there is already a .net core version in NuGet: https://www.nuget.org/packages/WebSocket4Net/0.15.2

Which targets .netstandard 1.3 which is compatible with .NET Core 2.2 and .net standard 2.0.

The one I mentioned base on SuperSocket.WebSocket is a complete brand new implementation.

kerryjiang avatar Oct 28 '19 16:10 kerryjiang

Net Core 2.0 and 2.2 are only compatible with Net standard 2.0.

This project targets Net Standard 1.3 only, it's only compatible with Net core 1.0

Correct me if I wrong.

https://docs.microsoft.com/en-us/dotnet/standard/net-standard

sasaman91 avatar Oct 28 '19 17:10 sasaman91

I don't think so. The project targets high standard can reference the libraries which target to lower .netstandard.

.NET implementation support The following table lists the minimum platform versions that support each .NET Standard version. That means that later versions of a listed platform also support the corresponding .NET Standard version. For example, .NET Core 2.2 supports .NET Standard 2.0 and earlier.

kerryjiang avatar Oct 28 '19 17:10 kerryjiang