diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index b1e069515..5a20e1a25 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -42,6 +42,7 @@ jobs: mkdir -p build/output/addons/counterstrikesharp/dotnet curl -s -L https://download.visualstudio.microsoft.com/download/pr/02f4c6c2-c137-448d-a189-9ee3a3f6f99f/192f2c750089fa0194f04f5a805bd21e/aspnetcore-runtime-8.0.0-rc.1.23421.29-linux-x64.tar.gz \ | tar xvz -C build/output/addons/counterstrikesharp/dotnet + mv build/output/addons/counterstrikesharp/dotnet/shared/Microsoft.NETCore.App/7.0.11/* build/output/addons/counterstrikesharp/dotnet/shared/Microsoft.NETCore.App/ - uses: actions/upload-artifact@v3 with: diff --git a/src/scripting/dotnet_host.cpp b/src/scripting/dotnet_host.cpp index 962beaeb9..18fc80309 100644 --- a/src/scripting/dotnet_host.cpp +++ b/src/scripting/dotnet_host.cpp @@ -78,7 +78,7 @@ bool load_hostfxr() { std::string baseDir = counterstrikesharp::utils::PluginDirectory(); - std::string buffer = std::string(baseDir + "/dotnet/host/fxr/8.0.0-rc.1.23419.4/libhostfxr.so"); + std::string buffer = std::string(baseDir + "/dotnet/host/fxr/7.0.11/libhostfxr.so"); CSSHARP_CORE_TRACE("Loading hostfxr from {0}", buffer.c_str()); @@ -135,7 +135,8 @@ bool CDotNetManager::Initialize() return false; } - /* + CSSHARP_CORE_INFO(".NET Runtime Initialised."); + std::string wideStr = std::string((baseDir + "/api/CounterStrikeSharp.API.runtimeconfig.json").c_str()); load_assembly_and_get_function_pointer_fn load_assembly_and_get_function_pointer = nullptr; @@ -148,9 +149,8 @@ bool CDotNetManager::Initialize() typedef int(CORECLR_DELEGATE_CALLTYPE * custom_entry_point_fn)(); custom_entry_point_fn entry_point = nullptr; - int rc = - load_assembly_and_get_function_pointer(dotnetlib_path.c_str(), dotnet_type, "LoadAllPlugins", - UNMANAGEDCALLERSONLY_METHOD, nullptr, (void **)&entry_point); + int rc = load_assembly_and_get_function_pointer(dotnetlib_path.c_str(), dotnet_type, "LoadAllPlugins", + UNMANAGEDCALLERSONLY_METHOD, nullptr, (void **)&entry_point); assert(rc == 0 && entry_point != nullptr && "Failure: load_assembly_and_get_function_pointer()"); const bool success = entry_point(); @@ -159,9 +159,8 @@ bool CDotNetManager::Initialize() CSSHARP_CORE_ERROR("Failed to initialize .NET"); return false; } - */ - CSSHARP_CORE_INFO(".NET Initialized."); + CSSHARP_CORE_INFO("CounterStrikeSharp.API Loaded Successfully."); return true; }