Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

The dependency MySql.Data >= 7.0.6-ir31 could not be resolved

$
0
0

I tried to deploy my asp.net core web api to nginx, the web api project reference a class library. The class library installed MySql.Data package from nuget. After copied the whole project to ubuntu and executed "dotnet restore" command, all works well in this step. But when I execute 'dotnet publish' command, I got an error:

Compiling App.DAL.Core for .NETStandard, Version=v1.6 /home/.../project.json: error NU1001: The dependency MySql.Data >= 7.0.6-ir31 could not be resolved

I have check this thread in stackoverflow, 

http://stackoverflow.com/questions/41303685/mysql-net-core-dependency-error-mysql-data

Changed IR to ir, but still not work. Please see my project.json files

DAL.Core Porject.json

{"version": "1.0.0-*","dependencies": {"MySql.Data": "7.0.6-IR31","NETStandard.Library": "1.6.0"
  },"frameworks": {"netstandard1.6": {"imports": "dnxcore50"
    }
  }
}

Web API Project.json

{"dependencies": {"Microsoft.ApplicationInsights.AspNetCore": "1.0.0","Microsoft.AspNetCore.Mvc": "1.0.0","Microsoft.AspNetCore.Server.IISIntegration": "1.0.0","Microsoft.AspNetCore.Server.Kestrel": "1.0.0","Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0","Microsoft.Extensions.Configuration.FileExtensions": "1.0.0","Microsoft.Extensions.Configuration.Json": "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","log4net": "2.0.7","Newtonsoft.Json": "9.0.1","App.DAL.Core": "1.0.0-*","MySql.Data": "7.0.6-ir31","Microsoft.AspNetCore.Mvc.WebApiCompatShim": "1.0.0","System.Net.Http": "4.1.0","System.Text.Encoding": "4.3.0","Microsoft.AspNetCore.Mvc.Core": "1.0.0","System.Net.Requests": "4.0.11","Microsoft.NETCore.App": "1.0.0"
  },"tools": {"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
  },"frameworks": {"netcoreapp1.0": {"imports": ["dotnet5.6","portable-net45+win8"
      ]
    }
  },"buildOptions": {"emitEntryPoint": true,"preserveCompilationContext": true
  },"runtimeOptions": {"configProperties": {"System.GC.Server": true
    }
  },"publishOptions": {"include": ["wwwroot","Views","Areas/**/Views","appsettings.json","web.config"
    ]
  },"scripts": {"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  },"runtimes": {"ubuntu.14.04-x64": {}
  }
}

Anyone can help?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>