godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.18k stars 21.2k forks source link

Can't compile C# files without an (initial) internet access #87806

Open ahmad12331233 opened 9 months ago

ahmad12331233 commented 9 months ago

Tested versions

its tested on all versions yea c# doesn't work offline even in godot 3

System information

linux godot 4.3 glcompatibility

Issue description

+the issue: c# doesn't work offline in godot mono i have to connect to the internet atleast once per project to be able to code thats without mentioning the exporting it also fails if im not connected the internet

+how i expect it to be: being able to use godot without internet just like gdscipt godot and also just like unity since it uses c# and it works offline

+possible solution?: this error sounds like a missing c# package that godot downloads every project so the solution could be adding a fallback to an offline package included in mono godot?

+error screenshot:

٢٠٢٤٠١٣١_١٠٣١٠١

i would love some help if possible

Steps to reproduce

just open mono godot while completely offline then create a new empty project then make any c# code and build it and you will get that error

Minimal reproduction project (MRP)

N/A

AThousandShips commented 9 months ago

Please take a screenshot the photo of the screen is unreadable

Calinou commented 9 months ago

Please take a screenshot the photo of the screen is unreadable

The tooltip reads:

Message: Unable to load the service index for source https://api.nuget.org/v3/index.json
  Resource temporarily unavailable (api.nuget.org:443)
  Resource temporarily unavailable
Type: error
File: /usr/share/dotnet/sdk/8.0.100/NuGet.targets
Line: 156
Column: 5
Project: /home/ahmad/wadaw/wadaw.sln
adamscott commented 9 months ago

I confirm the issue. Impossible to cold compile Godot C# files without an initial internal access to nuget.

image

Capture d’écran du 2024-02-06 13-27-10

adamscott commented 9 months ago

I tested out @paulloz's suggestion in the Godot Developers Chat and it works.

I don't have an easy way to make a fresh box without internet at the moment, but you might try dotnet nuget add source path/to/your/godot/folder/GodotSharp/Tools/nupkgs --name Godot and have it working

Either we:

paulloz commented 9 months ago

We used to manage a fallback folder automatically in early 4.x development. It was killed in #73984 AFAIK because it was planned to entirely stop distributing the nupkgs with the releases at some point (i.e. preparing for the editor unification).