- Home /
Why does Unity3D build throw a reference rewriter exception when encountering System.Net.WebSockets.WebSocket in .NET Standard 2.0?
I tried to build an UWP edition of my Unity3D app. I set API compatibility to .NET Standard 2.0, .NET level to .NET 4.6 experimental, and imported my custom plugins (.NET standard 2.0 assemblies built in Visual Studio 2017 Enterprise) into my Assets folder.
I pressed build and saw this in the build log:
Reference rewriter: Error: type System.Net.WebSockets.WebSocket
doesn't exist in target framework. It is referenced from
I didn't have to reference any assembly to get the System.Net.WebSockets in my .NET Standard 2.0 project in Visual Studio.
Why am I getting this error then?
Answer by DerrickLau · Apr 16, 2018 at 04:30 AM
I tried changing API compatibility level to .NET 4.x but still got the error:
artScreen.DualSimTileContract.winmd;,Windows.UI.WebUI.Core.WebUICommandBarContract.winmd" "--ignore=System.IConvertible,mscorlib". Error: type System.Net.WebSockets.ClientWebSocket
doesn't exist in target framework.
Your answer
Follow this Question
Related Questions
Why is my managed plugin not being referenced. 1 Answer
How can I stop the variable values reverting to its default values after being built? 1 Answer
Error building Player: Extracting referenced dlls failed. 1 Answer
Error "UnityEditor.BuildPlayerWindow+BuildMethodException: 'x' errors" preventing project compiling 1 Answer
MonoDevelop DLL Build : Problem with default parameters 1 Answer