My project is built in Azure Pipelines
using SDK 3.1.101
, without any errors/warnings, but after deployment to the host (Ubuntu 18.04
), I'm getting error:
Error:
An assembly specified in the application dependencies manifest (MyApp.deps.json) was not found:
package: 'Microsoft.Data.SqlClient', version: '1.0.19269.1'
path: 'runtimes/unix/lib/netcoreapp2.1/Microsoft.Data.SqlClient.dll'
Little bit of investigation pointed me that problem comes from Microsoft.EntityFrameworkCore.SqlServer
which references Microsoft.Data.SqlClient
.
Looks like it tries to find library from v2.1, somehow strange to me - but it's LST, so maybe...
Initially on the hosting had only aspnetcore-runtime-3.1
, so, I thought that by installing v2.1 may fix the problem, and installed aspnetcore-runtime-2.1
, then SDKs for both versions but nothing helped so far :(
Any thoughts how to fix it?
Found a way to fix it!
By looking into my project's ./bin/Debug/netcoreapp3.1/
directory, fount that, even if I build it on Windows, it still creates runtimes/unix
directory and puts there that DLLs that were missed in Ubuntu
.
So, by manually upload all from runtimes/unix
to the deployment machine, into CONTENT_ROOT
of my application - solved it.
P.S.
Still have no idea why it wasn't uploaded during deployment process.
But this is another story ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With