Could not load file or assembly ...... The system cannot find the file specified (after upgrade to dotnet 8)

Yedija Budiono 0 Reputation points
2024-12-10T11:35:42.2233333+00:00

Hi,

I got an issue after upgrading our batch application from dotnet 3.1 to 8.

Could not load file or assembly ...... The system cannot find the file specified.

In the project itself, we specify all dependency projects, and during the testing, everything is okay and there are no issues, but this issue occurs many times after going to production.

The flow is a .cmd file called a .exe batch file, so it's an ad-hoc basis.

I don't have a clue of what's happening. What could cause the batch not to load the assembly file?

It's because of the dotnet 8? or servers?

User's image

User's image

User's image

dotNet runtimes = 8.0.8
Windows Server 2016

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,009 questions
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
340 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jiachen Li-MSFT 32,961 Reputation points Microsoft Vendor
    2024-12-11T06:06:34.9066667+00:00

    Hi @Yedija Budiono ,

    After upgrading your batch application from dotnet 3.1 to 8, ensure the correct version of RabbitMQ.Client.dll is used.

    Explicitly set the working directory to the location of the .exe in the script.

    Best Regards.

    Jiachen Li


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.