-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NetStandard 2.1 support #339
Comments
From #315:
There isn't enough information about .NET 5 yet for me to make any decision on it. |
I've been developing in .NET for more than 15 years now, and greatly prefer GDScript to Mono, because of 1) MUCH faster startup, and 2) .csproj file regeneration after adding a script through Godot UI, which is a major PITA (exactly like in was/is in Unity). Dropping Mono in favor of .NET Core would deal with 2) at the very least. |
@dioptryk The csproj is not regenerated like in Unity. We just add the new include without touching anything else. |
I love that Godot isn't touching the sln file. I'm able to add class library projects to the solution without Godot overriding my changes. (Unity owns the solution file, which is really annoying.) One small improvement though would be to be able to change the path of the sln file :) |
From issue
@neikeq To get a glimpse of .NET 5 and how mono will be shaped along with it, I recommend Miguel de Icaza's recent Sep2019 talk that "the .NET future he wishes for many years is finally here" If I am not wrong, MONO will be split to TWO development track under .NET 5
Currently, I am blocked like @yigitgursoy ->
Please let us know what are you concern and I will try to lobby people to help. I know my limited skills :-) |
switching to .NET Standard 2.1 wouldn't mean moving to .NET Core, or .Net 5. @neikeq regarding .NET 2.1 support, isn't Godot already on Mono 6.4 and the new MSBuild? If so, then I would hope that switching from I also am semi-blocked by this. .Net Standard 2.1 represents a pretty big API change, see here: https://devblogs.microsoft.com/dotnet/announcing-net-standard-2-1/ Specifically, there is a lot of performance enhancements ( |
I did some more research, and from a development standpoint, you can use a lot of nuget packages to emulate .NS2.1 features such as Span and ValueTask (though some, like SIMD can not). Still, there may be some heavy refactoring to convert your code to .NS2.1 once godot upgrades. also, in case anyone is curious, Unity is still 2+ years out from upgrading, due to their heavy reliance on a .NET Framework 4 based codebase. |
@jasonswearingen I think the team has decided to upgrade to SDK project format and adopt .NETStandard 2.0 or 2.1 once the 3.2 is done. A few days back, there were 300+ issues. Now only less than 200 issues in 3.2 We need to start gathering developers who are keen on this .NETStandard We may need to identify them through discord platform as well. I am sure it is a question of WHEN. The team is interested with good performance WebAssembly through mono 6.6 and this is the focus of .NET5 with AOT Mono. FYI Before NOV 2020, we will keep using .NET Core 3.1, there is separation of Mono from .NET Core. By Nov 2020, .NET5 is expected to be official. There is no more .NET Core or Mono with AOT as both are merged into .NET 5. As long as Godot depends on Mono and the goal of developing high performance AOT webassembly. .N2.1 and SDK project is inevitable. It is only a question of WHEN! I think the team needs us to keep the discussion so the information serves as a good feedback. So keep up with your research. :-) |
@jasonswearingen can you please check if I am correct. .netstandard2.1 is supported by mono 6.4 and above BUT not supported by any .NET framework So the godot csharp projects under mono may need to be upgraded from .NETFramework 4.5 to non .NETFramework (e.g. .NET Core 3.1) |
correct regarding
|
@jasonswearingen Here are the cSharp projects for DLL need to be in [GodotMono.exe-RootDir]\GodotSharp\Tools Please check, perhaps I am wrong |
All associated dependencies would need to be built using .NS2.1, you can't link a .NF4.5 library from a .NS2.1 project. Sorry I don't have a godot build (I'm just using the prebuilt binaries) so I can't play with recompiling. |
==> netstandard2.0 Log -- It crashes and I am trying to figure out WHY. Prepared to set up assembly 'GodotSharp' (C:\godot\bin/GodotSharp/Api/Debug/GodotSharp.dll) (in domain Mono, info) |
@GeorgeS2019 any progress on this? From your last comment, FYI everything needs to be switched to .NS2.1. Anything referencing mono 4.5 is going to fail. .net (any version) only supports up to .NS2.0. The last line "netstandard.dll facade) is a .NS2.0 facade used by the .NF |
@jasonswearingen please see candidate-godot-3-2-rc-3 in particularly Mono: Default to net47 for new projects (GH-35473) by @neikeq It seems according the neikeq, only 6 files need to be modified moving from net4.5 to net4.7 I have tried changing to net4.7.2 to support .netstandard2.0 according to the link below
|
That change is really just cosmetic. you could always change your game's project to .NF4.7 manually, and everything would work. (That's what I did) From a runtime perspective, there isn't much difference between libraries that are .NS2.0 .NF4.7. They all will run the same. However, there is a huge difference between a .NS2.0 and a .NS2.1 library. They are runtime incompatible due to a completely rebuilt BCL (core standard library) |
@neikeq is there any work being done to move to .Net Standard 2.1, or if not, could you please outline any known challenges such an attempt would face? I wouldn't mind giving this a try, but if theres already a roadmap for it in place I would rather not duplicate the effort. |
I plan to make this happen after 3.2 stable is released. Right now, I'm focusing on my current roadmap tasks and fixing the remaining 3.2 issues. |
@jasonswearingen It is great you are pushing .NET standard 2.1 and certainly it is too of high priority from my side and I believe too for many c# developers.. Could you share any thinking from your side what is needed to plan a path towards .NET standard 2.1? We may be able to move faster if we pool our thinking hats together and learning from each other. |
Have you check how [mono 6.4 and above ] (used by Godot3.2) support .NETStandard2.1? |
The main benefit that .NS2.1 provides is Span support integral to the .net core API's. Span is basically a struct wrapping an IntPtr, Type, and length. So to take advantage of it godot would need to support workflows previously considered "Unsafe", allowing c# users to pass/get Span for high performance @neikeq the following paragraph might be useful to think about (?? sorry to blah blah so much, I know you have a lot on your plate....) Span based api's
@GeorgeS2019 Honestly I have been too busy learning gamedev+godot basics over the last few weeks, things like writing a basic camera and shaders. I want to get a credible tech demo working before I "demand" c# runtime /api improvements :) |
@jasonswearingen Please just keep on feedback whatever you think could be of interest, no matter how small it is. Every feedback keeps the godot community "food for thought" how to improve. I had a brief chat with @neikeq and he gave me good tips. |
FYI Will Unity3D support .NETStandard 2.1 status Oct2019 I will not be surprise that the challenges faced Unity3D to support .NETStandard 2.1 may not be too different from us :-) because there are a few moving parts that needed to be sorted out first. It will be great to have SDK style project with this feature. |
I just ran into this as a new user unfamiliar with the .net ecosystem. I found a nuget package I'd like to use with Godot but it requires .NETStandard 2.1. Is this something where most nuget packages aren't going to work with Godot until an upgrade happens or is it only a small subset of things that won't work? If lots/most nuget packages won't work maybe it's worth adding a note about this to the docs? |
@AndrewMorsillo This pages recommends to target .NET Standard 2.0 for the best compatibility. I don't know the real stats though. |
@neikeq @Calinou @AndrewMorsillo With the recent merging of Visual Studio 2019 as an external IDE for 3.2.3 by neikeq, it is now possible to test many C# and .NET concepts not so easy before. Currently, I am evaluating how to implement the .NETStandard 2.1 and the .NET5 SDK style project. It is early stage. Good for learning GodotSharp Tools environment Immediately, we need to ask if there is interest for the VS Solution to support more than ONE csproj projects and how we are going to arrange the Csharp files within the Godot projects. Ideally, we have all csproj files within a root folder (e.g. Scripts). Within this Script directory, we have one folder for each of the csproj project. Within each csproj folder, we can then implement the SDK style csproj without listing all the csharp files associated with the SDK style csproj, to achieve one of the benefits of the SDK style projects. REF Godot Proposal: Support multiple .NET5 SDK style projects per godot project |
Describe the project you are working on:
A game project which uses gRPC client-server communication
Describe the problem or limitation you are having in your project:
I'm unable to use NuGet packages that require .NETStandard 2.1 compatibility such as Grpc.Net.Client. Godot currently is compatible with .NETFramework,Version=v4.5. which is unable to support this version.
.NETStandard compatibility is key to having a good c# ecosystem.
Describe how this feature / enhancement will help you overcome this problem or limitation:
Mono 6.4 comes with .NETStandard 2.1 compatibility. A better option would be to use .Net Core 3.0 which also supports .NETStandard 2.1. Unity is planning to switch to .NET 5 when it comes out next year. Having .Net Core 3.0 support would make this kind of upgrade easier for Godot.
Show a mock-up screenshots/video or a flow diagram explaining how your proposal will work:
Describe implementation detail for your proposal (in code), if possible:
N/A
If this enhancement will not be used often, can it be worked around with a few lines of script?:
There isn't a workaround that I know of.
Is there a reason why this should be core and not an add-on in the asset library?:
This is a proposal to upgrade core functionality.
The text was updated successfully, but these errors were encountered: