Facepunch / sbox-issues

177 stars 12 forks source link

Check for Missing SDKs #6948

Open Andrei15193 opened 5 days ago

Andrei15193 commented 5 days ago

Describe the bug

Somewhat of a bug, but not really. Upon launching S&Box in editor mode, Steam installs the runtime for dotnet 9 if its missing, but there's no specific error or check for the SDK.

To Reproduce

  1. Ensure dotnet 9 SDK is not installed
  2. Launch S&Box editor
  3. Create or open an existing project
  4. You get compilation errors or errors in the IDE

Expected behavior

An error is show detailing missing SDKs or a menu item is available to run this check manually. This is specific for the editor as it requires extra software to be installed.

Media/Files

Thankfully, we can easily check installed SDK versions for dotnet using their tooling, more info here: https://learn.microsoft.com/dotnet/core/install/how-to-detect-installed-versions

While probably not a high priority, it would be nice to have a check (even manual through the menu) for all relevant SDKs to be installed.

Additional context

I'm running on Windows 11 and using VS Code as my IDE, I don't have Visual Studio (classic) installed.

After installing the dotnet 9 SDK and then uninstalling it, the editor may still compile but VS code will start to show errors. Deleting the obj folder for the project code may also trigger this.

This is an example of what I was getting

The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.