We're trying to connect to a MySQL database through .NET Core. Everything works local but on our server where gitlab-ci is running it fails building. Therefore failing the build.
The error thrown: error NU1001: The dependency MySql.Data >= 7.0.6-IR31 could not be resolved.
This is weird since it works on our local machines, but not on the CI running within docker.
running dotnet restore
and dotnet run
locally works. dotnet restore
works also on the server and you can see the MySql.Data package is installed. Yet when running the unittests it breaks because the dependency could not be resolved. Maybe not linux compatible?
What are we doing wrong?
the project.json file:
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0",
"type": "platform"
},
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0",
"Microsoft.Extensions.Configuration": "1.0.0",
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0",
"Microsoft.Extensions.Configuration.Binder": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Microsoft.EntityFrameworkCore": "1.0.0",
"DotNetAirbrake": "1.0.33",
"Geitenbelang.AnimalManager.Api.Models": "1.0.0-*",
"Geitenbelang.AnimalManager.Api.Database": "1.0.0-*",
"AutoMapper": "5.1.1",
"MySql.Data.EntityFrameworkCore": "7.0.6-IR31"
},
"frameworks": {
"netcoreapp1.0": {}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"Views",
"Areas/**/Views",
"appsettings.json",
"web.config"
]
}
}