Unity 2019.2 background exception when socket connects

No worries. Thanks a lot for the help @danim :+1:

I know what has happened and will explain in detail so it helps us resolve the issue faster next time. :slight_smile:

It appears that in Unity 2019.2 and above Unity have changed the default .NET profile. A .NET profile describes to the Roslyn compiler toolchain what collection of DLLs are available from the standard library. I don’t know whether this change was intended by them or a bug in the latest release of the game engine. It’s unclear from their release notes or online resources why they’ve made this change.

The result of it is that the System.Diagnostics.Tracing namespace is no longer available in the .NET profile which Unity uses. This affects how we trace the low level details in the socket libraries we use. The only solution I’ve found which resolves the issue fully so far is to strip out usages of that namespace. I’ll have to dig further in the new year to understand whether the change that Unity has made was intentional.

1 Like