Skip to content

Project Startup, missing DLL on using MYSQLConnector and deployment #4927

Description

@itg-assistant

Shahbaz Ahmad asked 2026-01-03 11:25:43 UTC

Hello,

I've started developing a website using .Netframework 4.8.1 and .NET Core 9.00 but problem with using both frameworks when adding MySQLConnector libraries from Nuget Package manager, the application doesn't run, complaining about missing dependent DLL like System.Memory but this works fine if I only select .NET core 9.0 so not sure what I'm doing wrong.

I've deployed an application to IIS in a VPS server and with framework 4.8.1 it works fine but obviously missing DLL message is not letting me connect to the database.

If I select .Net core 9.0 to develop application then MySQLConnector is working fine but deployment got some issues, on deployment I've followed all the instructions and videos and install all the required SDKs required for .Netcore deployment but this way the website opens up but doesn't show the starting login page.

Looking at the server logs and log files getting different messages like this.

Last night, I was getting these error messages.
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\inetpub\wwwroot\wisej'.
Failed to run as a self-contained app.

  • The application was run as a self-contained app because 'C:\inetpub\wwwroot\wisej\WisejWebApplication6.runtimeconfig.json' was not found.
  • If this should be a framework-dependent app, add the 'C:\inetpub\wwwroot\wisej\WisejWebApplication6.runtimeconfig.json' file and specify the appropriate framework.
    A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\inetpub\wwwroot\wisej'.
    Failed to run as a self-contained app.
  • The application was run as a self-contained app because 'C:\inetpub\wwwroot\wisej\WisejWebApplication6.runtimeconfig.json' was not found.
  • If this should be a framework-dependent app, add the 'C:\inetpub\wwwroot\wisej\WisejWebApplication6.runtimeconfig.json' file and specify the appropriate framework.

** This morning I'm getting these, so not sure what I'm doing wrong.**
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\inetpub\wwwroot\wisej
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 GET http://wisejtesting.com/ - - -
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[6]
The file /Default.html was not modified
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/1.1 GET http://wisejtesting.com/Default.html - 304 - text/html 551.1396ms
info: Microsoft.Hosting.Lifetime[0]
Application is shutting down...

Metadata

Metadata

Assignees

No one assigned

    Labels

    New FeatureA capability that does not exist yet.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions