Failed to load the dll: hostfxr.dll - dotnet-ef

Rafał Głębocki 6 Reputation points
2022-05-19T12:00:49.93+00:00

Hello,

I'm running azure pipeline, that uses dotnet -ef framework to run some database migrations job.
When upgrading to NET 6 (version 6.0.3), I've got this error:

Failed to load the dll from [C:\agent_pool\agent1\_work\_tool\dotnet\host\fxr\6.0.5\hostfxr.dll], HRESULT: 0x800700C1
The library hostfxr.dll was found, but loading it from C:\agent_pool\agent1\_work\_tool\dotnet\host\fxr\6.0.5\hostfxr.dll failed
  - Installing .NET prerequisites might help resolve this problem.
     https://go.microsoft.com/fwlink/?linkid=798306

Agent is running on windows server 2022 version 21H2.
Run into this Github solution - https://github.com/dotnet/efcore/issues/27787#issuecomment-1110056806 - but it didn't solve the issue (command actually failed).

Thanks for help,
Rafal

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,127 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,247 questions
{count} votes