- 868
- 2
- 14
- 25
I'm running a .NET application inside a Windows-based Docker container. The app uses OCCT.NET, and although all the required OCCT .NETnative DLLs and native OCCT .dll filesNET DLLs are present inside the image at, under the specified directoryapp's bin/Debug/net9.0 folder.
The app runs fine when executed from an IDE like Visual Studio Code, but when trying to make a Windows-based Docker image the runtime throws error "Could not load file or assembly 'C:\app\Occt.NET.dll'. The specified module could not be found.." . What I'm doing is building a .NET application that performs certain functionality and also manually putting the OCCT.NET files inside the bin/Debug/net9.0. The application is running fine when executed from a IDE like VS Code but when trying to make a Docker Image (Windows based), it shows the above error.
I have tried docker execthe DOCKER EXEC command to verify that the files are indeed in the specified directory, and I also installed vc_redistthe X64 VC_REDIST.x64EXE in the image. Also initially
I also tried with Linux-based dockerDocker images then switchedbefore switching to Windows-based, as I thought this can be some issue due tomaybe the code not compatiblewas incompatible with Linux OS. What
Now I have come to conclusion is thatthink the issue is likely related to manually using/puttingplacing the external OCCT files/libraries and libraries in the bin folder, as normal. Normal .NET application's dockerapp Docker images are running fine and I'm having, but I have a similar problem with my other .NET application where the .NET application isapp that also dependentdepends on external libraries.
I'm running a .NET application inside a Windows-based Docker container. The app uses OCCT.NET, and although all required OCCT .NET DLLs and native OCCT .dll files are present inside the image at the specified directory, the runtime throws error "Could not load file or assembly 'C:\app\Occt.NET.dll'. The specified module could not be found.." . What I'm doing is building a .NET application that performs certain functionality and also manually putting the OCCT.NET files inside the bin/Debug/net9.0. The application is running fine when executed from a IDE like VS Code but when trying to make a Docker Image (Windows based), it shows the above error.
I have tried docker exec command to verify that the files are indeed in specified directory and also installed vc_redist.x64 in the image. Also initially tried with Linux-based docker images then switched to Windows-based, as I thought this can be some issue due to code not compatible with Linux OS. What I have come to conclusion is that the issue is likely related to manually using/putting external OCCT files/libraries in bin folder, as normal .NET application's docker images are running fine and I'm having similar problem with my other .NET application where the .NET application is also dependent on external libraries.
I'm running a .NET application inside a Windows-based Docker container. The app uses OCCT.NET, and all the required OCCT native DLLs and OCCT .NET DLLs are present inside the image, under the app's bin/Debug/net9.0 folder.
The app runs fine when executed from an IDE like Visual Studio Code, but when trying to make a Windows-based Docker image the runtime throws error "Could not load file or assembly 'C:\app\Occt.NET.dll'. The specified module could not be found."
I have tried the DOCKER EXEC command to verify that the files are indeed in the specified directory, and I also installed the X64 VC_REDIST.EXE in the image.
I also tried with Linux-based Docker images before switching to Windows-based, as I thought maybe the code was incompatible with Linux.
Now I think the issue is likely related to manually placing the external OCCT files and libraries in the bin folder. Normal .NET app Docker images are running fine, but I have a similar problem with my other .NET app that also depends on external libraries.
OCCT.NET DLL not loading inside Docker container — Could not load file or assembly 'C:\app\Occt.NET.dll'. The specified module could not be found
I'm running a .NET application inside a Windows-based Docker container. The app uses OCCT.NET, and although all required OCCT .NET DLLs and native OCCT .dll files are present inside the image at the specified directory, the runtime throws error "Could not load file or assembly 'C:\app\Occt.NET.dll'. The specified module could not be found.." . What I'm doing is building a .NET application that performs certain functionality and also manually putting the OCCT.NET files inside the bin/Debug/net9.0. The application is running fine when executed from a IDE like VS Code but when trying to make a Docker Image (Windows based), it shows the above error.
I have tried docker exec command to verify that the files are indeed in specified directory and also installed vc_redist.x64 in the image. Also initially tried with Linux-based docker images then switched to Windows-based, as I thought this can be some issue due to code not compatible with Linux OS. What I have come to conclusion is that the issue is likely related to manually using/putting external OCCT files/libraries in bin folder, as normal .NET application's docker images are running fine and I'm having similar problem with my other .NET application where the .NET application is also dependent on external libraries.