Andrei Ivanov
Andrei Ivanov

Reputation: 115

.net core project cannot load assemblies in linux docker container

I have the following issue: I have one project which loads another project using Assembly.LoadFile(). Everything works fine on windows but when i try to run it using docker it fails, saying Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly '/app/HellowWorldProject.dll'. The system cannot find the file specified.

My findings are that the .dll file i'm searching for is in the same directory it is searched but something fails somewhere. On the image you can see that the file exists in /app directory in the docker container. The code i execute and the dockerfile can be found in my github: https://github.com/andre197/DebugDotNetCoreInDockerTest . Can anyone help me with that issue? enter image description here

Upvotes: 0

Views: 1445

Answers (1)

Afshin
Afshin

Reputation: 1509

When you publish your project from windows to Linux containers , you should pay attention to path because in Linux based operating systems, case sensitiveness of path to file is important.
Absolutley if you have mismatch in your path to file, you got file not found error

Upvotes: 2

Related Questions