Remote publish of ASP.NET Core 6 app to IIS via Visual Studio: ERROR_SMO_NEEDED_FOR_SQL_PROVIDER

Evan 0 Reputation points
2023-01-11T05:37:45.6033333+00:00

I am attempting to publish my ASP.NET Core 6 Web API app to an IIS server via Visual Studio. The app works perfectly when I run it locally and also runs fine when published manually and started on the server through a dotnet command.

Note that I am not using an SQL Server, I am connecting to a remote MySQL server.

My error message:
(The SQL provider cannot run because of a missing dependency. Please make sure that Microsoft SQL Server Management Objects (Version 10 or higher) is installed. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SMO_NEEDED_FOR_SQL_PROVIDER. Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SMO_NEEDED_FOR_SQL_PROVIDER.)

My publish settings:

Configuration: Debug

Target Framework: net 6.0

Deployment mode: Framework-dependent (Tried self-contained with same results)

Target runtime: win-x64 (Tried portable with same results)

File publish options: None selected

Databases: Provide the same string that works normally, similar to:

Server=server,3306;User ID=userid;Password=password;Database=database

Entity framework migrations:
Apply on publish

Same connection string as above

Fixes attempted:

I have attempted to manually install SMO by running:

Install-Package Microsoft.SqlServer.SqlManagementObjects -Source (locally downloaded nuget package)

And received the error:

Install-Package : Unable to find dependent package(s) (Azure.Core)

I am not (to my knowledge) using anything at all related to Azure. This is hosted on an AWS EC2 instance running Windows Server 2022 Datacenter 64-bit and IIS version 10.0.20348.1

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,581 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
8,213 questions
Internet Information Services
{count} votes