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

System.DllNotFoundException: Unable to load DLL 'raylib' #55

Closed
Shadowblitz16 opened this issue Jun 6, 2020 · 15 comments
Closed

System.DllNotFoundException: Unable to load DLL 'raylib' #55

Shadowblitz16 opened this issue Jun 6, 2020 · 15 comments

Comments

@Shadowblitz16
Copy link

image

this needs to be fixed.
I followed the instructions in the readme and it doesn't work.

If we need to copy the native library to the root of the project it should say so it the readme's nuget section

@chrisdill
Copy link
Owner

The library only needs to be copied if you are installing manually so the readme is fine. If you installed the nuget package and it fails to load raylib then that is a bug.

@Shadowblitz16
Copy link
Author

its a bug then

@630Studios
Copy link

I have also installed the nugget package, and have this problem.

@9ParsonsB
Copy link
Collaborator

@Shadowblitz16 Are you using the NuGet package? If you are using the NuGet package then this is a duplicate of #43

Where did you put the native library?

@Shadowblitz16
Copy link
Author

@9ParsonsB I put it in the root of the project and then marked its as copy to output 'always'

@9ParsonsB
Copy link
Collaborator

@Shadowblitz16 Can you see raylib.dll in the output directory? (Generally in /Debug/Bin/)
What architecture of the raylib dll did you download, the x86 or x64? and was it the msvc version?

@Shadowblitz16
Copy link
Author

Shadowblitz16 commented Jul 23, 2020

I'm pretty sure it was in /Debug/Bin/ because I used other native libraries before and they have worked
I downloaded the msvc version I beleave

@chrisdill
Copy link
Owner

@9ParsonsB It seems 3.1.8-pre and 3.1.8-pre2 do not include the native runtimes as expected meaning users could not find the native library when they install the package.

I did not find the issue as I had a system version installed which it found instead. I am surprised I did not find this sooner. Clearly more testing should of been done to prevent this. Currently github actions only builds the C# code. It does not verify the native libraries exist on the target platforms.

@chrisdill
Copy link
Owner

chrisdill commented Aug 12, 2020

I updated the README install command to use the version 3.1.5 which is the latest stable release. There was a version for 3.1.6 but that was unlisted due to bugs. Running dotnet add package Raylib-cs for me sets the version to 3.1.6. I expected it to install 3.1.5 which is the latest stable and public version. I am not sure if this is intended or not.

@630Studios
Copy link

The instructions provided only work for a .net core project.
Using the provided instructions on a .netstandard 2.0 or framework 4.7.2+ does not work.

@ayousuf23
Copy link

ayousuf23 commented Oct 11, 2021

I got this error:

Unhandled exception. System.DllNotFoundException: Unable to load shared library 'raylib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libraylib, 1): image not found
   at Raylib_cs.Raylib.InitWindow(Int32 width, Int32 height, String title)

I am using Apple Silicon (osx-arm64).

@9ParsonsB
Copy link
Collaborator

@ayousuf23 arm platforms are not yet supported. Please ensure you are running in Rosetta 2 or open a separate issue regarding ARM platforms.

@chrisdill
Copy link
Owner

The nuget package for Raylib-cs uses netstandard2.1 and the runtimes for the supported platforms should load as expected.

@drum445
Copy link

drum445 commented Dec 27, 2022

Sorry to post late, but I am also getting this issue, was a solution found?

@9ParsonsB
Copy link
Collaborator

Sorry to post late, but I am also getting this issue, was a solution found?

@drum445
This issue relates to the NuGet package and has since been fixed.

Please provide more details on your setup & problem (Platform, architecture, raylib version, error message, etc.) or join the raylib discord server (raylib-cs channel) for support

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

No branches or pull requests

6 participants