Since yesterday Microsoft announced the first .NET 6 preview it might be time to open this thread.
Announcement:
The biggest thing is that might be good for unity is that the mono runtime will be integrated into .NET and so TFMs will be available for window, android, ios, maccatalyst, macos, tvos.
Do you have any public roadmap for upgrading to .NET 6?
Do you have any plan on integrating with the standard .NET toolchain? Csproj files not auto generated, can be put under version control, nuget support, etc (this would also mean replacing asmdef?)?
net6.0-unity as workload please ?designs/accepted/2020/workloads/workloads.md at main · dotnet/designs · GitHub
Thanks in advance for @JoshPeterson for answering people’s obvious questions about it.
From Blog:
We’ve been watching the Xamarin team innovate with the XAML Hot Reload experience over the last couple years and started to imagine enabling hot reload as a general .NET capability, and not just for XAML, but C#/IL. We’re defining a new hot code reload model that we can offer for all app types. It’s likely at least some of this feature will be implemented in the runtime, and we’re committed to doing that with both CoreCLR and Mono. We want to enable a very fast build, and even faster operations for code changes that can skip the build entirely, as a new standard feature of .NET.
No, nothing public to report yet. I can say that we are actively working now toward the goal of .NET 5/.NET 6 class library support in Unity. Since .NET 6 will be a long term support release from Microsoft, we will likely target .NET 6 instead of .NET 5 for the first .NET Core-based release of Unity, but that is still uncertain.
This is a bit outside of the area my team supports, so I’m not as sure about these questions. I know there have been some discussions about moving to .csproj files from .asmdef, but I don’t think there is any active work here yet. I doubt that Unity will have built-in support for nuget soon.
I don’t expect this to happen. From a class library perspective, I think Unity will support .NET FW (probably version 4.8), .NET Standard 2.1, and .NET 5/6 in the future. Although Unity has a pretty large C# API, I don’t expect us to try to publish a TFM now. In essence, that means the Unity API would only be available in Unity, and not via nuget, for example. That would still allow parity with the current approach Unity has. So although have a Unity TFM would be interesting, not having one doesn’t loose anything.
I’d love to have more details to share, but we’re not ready to announce roadmaps publicly at this time.
We’re not ready to add .NET 6 support in Unity yet. But we are working toward that. There is a pretty in-depth discussion about our future .NET plans that we keep up to date here: https://discussions.unity.com/t/836646
.net 6.0 is the only version that seems to work with VSCode on M1 Macs btw. Opening unity projects with that setup makes omnisharp not work, meaning you don’t get any good intellisense
Omnisharp only seems to work with .NET 6 in VSCode. Unity creates projects that target framework v4.7.1, which does not exist in .NET 6, so vscode (omnisharp) spits out an error like:
[fail]: OmniSharp.MSBuild.ProjectLoader
This project targets .NET version that requires reference assemblies that do not ship with OmniSharp out of the box (e.g. .NET Framework). The most common solution is to make sure Mono is installed on your machine (https://mono-project.com/download/) and that OmniSharp is started with that Mono installation (e.g. "omnisharp.useGlobalMono":"always" in C# Extension for VS Code).
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file 'XXXX.csproj'.
If I install .NET 5 on my mac M1, vscode tells me it is not installed (because, from what I can tell, .NET 5 does not support M1)
So unfortunately, it seems like I cannot use VSCode for development on a mac M1. I have to use Visual Studio for Mac instead.
This isn’t a unity issue for sure, it’s likely a vscode/omnisharp issue, but I posted here to give another reason to support NET 6
OmniSharp on macOS/Linux uses Mono and contains a bundled version of Mono that is not compatible with Unity. I don’t think it matters what version of .Net you have installed.
We don’t have a release schedule yet, although we are working on it. See the large thread here with lots of details: https://discussions.unity.com/t/836646 unread