CounterStrikeSharp icon indicating copy to clipboard operation
CounterStrikeSharp copied to clipboard

[Bug]: Not Possible to Use the Package without Runtime

Open ENDlezZenith opened this issue 5 months ago • 3 comments

When using the package without runtime, getting the following error, dotnet info is also provided as follow.

Log

[16:39:54.594] CSSharp: Current root directory: D:\Server\steamcmd\steamapps\common\Counter-Strike Global Offensive\game\csgo/addons/counterstrikesharp
[16:39:54.595] CSSharp: CoreConfig loaded.
[16:39:54.595] CSSharp: AutoUpdate enabled, checking for gamedata updates from http://gamedata.cssharp.dev
[16:39:55.470] CSSharp: Gamedata is up to date, ETag: "b763ab6226d77804a838e8e44c66c388"
[16:39:55.514] CSSharp: Copying bytes from disk for D:/Server/steamcmd/steamapps/common/Counter-Strike Global Offensive/game/bin/win64/engine2.dll
[16:39:55.724] CSSharp: Copying bytes from disk for D:/Server/steamcmd/steamapps/common/Counter-Strike Global Offensive/game/csgo/bin/win64/server.dll
[16:39:55.808] CSSharp: Globals loaded.
RTTI Type Descriptor RVA: 0x0000000001D71978
[16:39:55.894] CSSharp: Initialized GameSystem.
[16:39:55.894] CSSharp: Loading .NET runtime...
[16:39:55.894] CSSharp: Loading hostfxr from D:\Server\steamcmd\steamapps\common\Counter-Strike Global Offensive\game\csgo/addons/counterstrikesharp\dotnet\host\fxr\10.0.3\hostfxr.dll
[16:39:55.895] CSSharp: unable to get export function: "hostfxr_initialize_for_runtime_config"
[16:39:55.895] CSSharp: Failed to initialize .NET runtime.
[16:39:55.895] CSSharp: Failed to initialize .NET runtime
[16:39:55.895] CSSharp: Hooks added.

dotnet --info

Host:
  Version:      10.0.9
  Architecture: x64
  Commit:       901ca94124
  RID:          win-x64

.NET SDKs installed:
  No SDKs were found.

.NET runtimes installed:
  Microsoft.NETCore.App 8.0.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 10.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 8.0.28 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 10.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

ENDlezZenith avatar Jun 28 '26 08:06 ENDlezZenith

Not familiar with this project, but seems like css is trying to read some hard-written path "Loading hostfxr from D:\Server\steamcmd\steamapps\common\Counter-Strike Global Offensive\game\csgo/addons/counterstrikesharp\dotnet\host\fxr\10.0.3\hostfxr.dll", while the dotnet directory is a path only exist in the package with runtime bundled. So probably css is not reading the dotnet runtime in the environment anyway.

ENDlezZenith avatar Jun 28 '26 08:06 ENDlezZenith

This is not a bug and by design; the with runtime version is required for the first installation. The without runtime archive is provided as a convenience to reduce download size on subsequent updates.

roflmuffin avatar Jun 28 '26 22:06 roflmuffin

I see.

ENDlezZenith avatar Jun 29 '26 05:06 ENDlezZenith