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

Unable to find Dapper.dll in linux machine. #2076

Open
RanjiniRao14 opened this issue Apr 23, 2024 · 9 comments
Open

Unable to find Dapper.dll in linux machine. #2076

RanjiniRao14 opened this issue Apr 23, 2024 · 9 comments

Comments

@RanjiniRao14
Copy link

I have been using Dapper.dll (2.1.35) with system.data.odbc in windows with .net 8 ,however when I publish the same in linux box I'm seeing below issue when I run the application, though the dapper.dll is available in the bin directory where I'm executing.
Could not load file or assembly 'Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

Also tried changing to dapper.strongname , no luck with that as well.

Any help would be appreciated.

Thanks!

@mgravell
Copy link
Member

mgravell commented Apr 23, 2024

Not sure what I can say here; check your deployment - is the file there? We didn't write the build / publish system; from the perspective of a library author, we do need the library to be there, but how it gets there is the build system's problem.

@RanjiniRao14
Copy link
Author

yes the file exists with right version 2.1.35 but the error is pointing to 2.0.0.0 version.

@RanjiniRao14
Copy link
Author

I did publish the dlls from the windows and transferred manually to linux box

@RanjiniRao14
Copy link
Author

dapper

@mgravell
Copy link
Member

2.0.0.0 is the assembly version; that is correct - we pin that at 2.0.0.0 to prevent the problem of constantly having to update binding redirects (you can see this by looking at the assembly full name in NuGet package explorer, https://nuget.info/packages/Dapper/2.1.35)

Does manually adding the files make it work? Also, is your application using Dapper directly (i.e. does your exe have a <PackageReference> to Dapper), or is it transitive (i.e. your exe has a dependency of SomeOtherLib, and SomeOtherLib has a dependency on Dapper)? If transitive: try adding an explicit application-level package reference.

@RanjiniRao14
Copy link
Author

No manually adding files doesnt help either. Its not transitive dependency , its using directly with the connection object and I do have a reference in csproj file as shown below. This exe works perfectly fine in windows machine with .net 8 version.

@RanjiniRao14
Copy link
Author

No description provided.

@RanjiniRao14
Copy link
Author

@RanjiniRao14
Copy link
Author

dapper1

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

2 participants