Skip to content
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

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

Open
ahmad12331233 opened this issue Feb 1, 2024 · 5 comments
Open

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

ahmad12331233 opened this issue Feb 1, 2024 · 5 comments

Comments

@ahmad12331233
Copy link

ahmad12331233 commented Feb 1, 2024

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
Copy link
Member

Please take a screenshot the photo of the screen is unreadable

@Calinou
Copy link
Member

Calinou commented Feb 6, 2024

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
Copy link
Member

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 adamscott changed the title godot c# doesn't work offline Can't compile C# files without an (initial) internet access Feb 6, 2024
@adamscott
Copy link
Member

adamscott commented Feb 6, 2024

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:

  • add this tip to the documentation; or
  • we add an entry inside the C# tools to install the nuget source path; or
  • we make this automatic if we don't see the nuget package installed.

@paulloz
Copy link
Member

paulloz commented Feb 6, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants