System.Runtime Error when attempting to run application dll

Lewis 6 Reputation points
2021-04-11T21:08:40.807+00:00
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

I get a 404 when attempting to view my deployed app service, and the above error when trying to get more details by running the dll in the kudu console. For context I am trying to deploy a VueJS/NetCore App from a DevOps pipeline.

Thanks!

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,119 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,865 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Adam Jachocki 46 Reputation points
    2021-09-09T09:57:07.477+00:00

    FileNotFound exception tells you that there is no required dll. I mean, your dll requires another one to run, but cannot find it. You have to check out what dll it looks for.
    It may also be explicitily trying to load some other file, that is not present. Then just simple debug should work.


  2. CT CHANG 1 Reputation point
    2022-08-21T03:56:13.127+00:00

    I have the same problem on my function app on Azure function app host (windows). My app csprof have target framework set to netcappapp3.1 and AzureFuctionversion to V3. Everything work perfect on local development machine. But encounter error of missing System.Runtime version 4.2.2.0 when deployed to Azure. Notice the System.Runtime 4.2.2.0 isfrom .NetCoreApp framework... No idea how to resolve this...

    0 comments No comments