c# - Ambiguous Call Between Same Library? -
i attempting upgrade asp.net 5 project beta7 beta8. got runtime , switched various packages in project.json
over. compiling, except i'm getting few errors have been unable resolve.
in particular, 1 has me stumped , preventing me going forward:
dnx,version=v4.5.1 error cs0121: call ambiguous between following methods or properties: 'microsoft.data.entity.sqlserverdbcontextoptionsextensions.usesqlserver(microsoft.data.entity.dbcontextoptionsbuilder, string)' , 'microsoft.data.entity.sqlserverdbcontextoptionsextensions.usesqlserver(microsoft.data.entity.dbcontextoptionsbuilder, string)'
at line of code in startup.cs
services.addentityframework() .addsqlserver() .adddbcontext<mycontext>(options => options.usesqlserver(configuration["data:defaultconnection:connectionstring"]));
i know in past, typically appears version of library in gac. however, don't believe case on osx. did check ~/.dnx/packages/ folder see if jumped out @ me, nothing there either.
here project.json reference (some parts trimmed):
{ "webroot": "wwwroot", "version": "1.0.0", "dependencies": { "entityframework.commands": "7.0.0-beta8", "entityframework.microsoftsqlserver": "7.0.0-beta8", "htmlsanitizer": "2.0.5623.30465", "imageprocessor": "2.3.0.0", "microsoft.aspnet.antiforgery": "1.0.0-beta8", "microsoft.aspnet.authorization": "1.0.0-beta8", "microsoft.aspnet.diagnostics": "1.0.0-beta8", "microsoft.aspnet.identity.entityframework": "3.0.0-beta8", "microsoft.aspnet.mvc": "6.0.0-beta8", "microsoft.aspnet.mvc.dataannotations": "6.0.0-beta8", "microsoft.aspnet.mvc.taghelpers": "6.0.0-beta8", "microsoft.aspnet.server.kestrel": "1.0.0-beta8", "microsoft.aspnet.staticfiles": "1.0.0-beta8", "microsoft.aspnet.tooling.razor": "1.0.0-beta8", "microsoft.dnx.runtime": "1.0.0-beta8", "microsoft.extensions.codegenerators.mvc": "1.0.0-beta8", "microsoft.extensions.configuration.commandline": "1.0.0-beta8", "microsoft.extensions.configuration.environmentvariables": "1.0.0-beta8", "microsoft.extensions.configuration.json": "1.0.0-beta8", "microsoft.extensions.logging.console": "1.0.0-beta8", "system.net.http": "4.0.1-beta-23225" }, "commands": { "ef": "entityframework.commands", "kestrel": "microsoft.aspnet.hosting --server microsoft.aspnet.server.kestrel --server.urls http://localhost:5000 --aspnet_env development" }, "frameworks": { "dnx451": { "frameworkassemblies": { "system.drawing": "4.0.0.0", "system.runtime.serialization": "4.0.0.0" } } }, trimmed here }
update seeing 1 set of warnings in dnu build
might indicate possible problem.
/users/jasoncavett/projects/web-cemeteries/obituaries/project.json(7,43): warning nu1007: dependency specified entityframework.microsoftsqlserver >= 7.0.0-beta8 ended entityframework.microsoftsqlserver 7.0.0-rc1-15945. /users/jasoncavett/projects/web-cemeteries/obituaries/project.json(21,48): warning nu1007: dependency specified microsoft.extensions.codegenerators.mvc >= 1.0.0-beta8 ended microsoft.extensions.codegenerators.mvc 1.0.0-rc1-15824. /users/jasoncavett/projects/web-cemeteries/obituaries/project.json(25,45): warning nu1007: dependency specified microsoft.extensions.logging.console >= 1.0.0-beta8 ended microsoft.extensions.logging.console 1.0.0-rc1-15673.
check if nuget feed release , not develop branch (most problem) don't need feed
https://www.myget.org/f/aspnetcidev/api/v3/index.json
but think miss feed
https://www.myget.org/f/aspnetrelease/api/v3/index.json
check global.json beta8
"sdk": { "version": "1.0.0-beta8" }
check dnvm if set active dnx running beta8 before using dnu restore.
c:\git\dbc>dnvm list
active version runtime architecture operatingsystem alias ------ ------- ------- ------------ --------------- ----- 1.0.0-beta4 clr x86 win 1.0.0-beta7 clr x64 win 1.0.0-beta7 clr x86 win b7 1.0.0-beta7 coreclr x64 win 1.0.0-beta7 coreclr x86 win 1.0.0-beta8 clr x64 win * 1.0.0-beta8 clr x86 win aa, b8 1.0.0-beta8 coreclr x64 win 1.0.0-beta8 coreclr x86 win 1.0.0-rc1-15838 clr x86 win rc1a
if has still has problems check invalid reference project.json.
Comments
Post a Comment