entity framework - ASPNET Core/EF Core App on Top of Net46 -


i have mvc6 website has run on top of full net framework because relies on various libraries have not been updated support net core.

i think may misconfiguring project.json file. here's have:

{   "dependencies": {     "microsoft.aspnetcore.authentication.cookies": "1.0.0",     "microsoft.aspnetcore.diagnostics": "1.0.0",     "microsoft.aspnetcore.diagnostics.entityframeworkcore": "1.0.0",     "microsoft.aspnetcore.identity.entityframeworkcore": "1.0.0",     "microsoft.aspnetcore.mvc": "1.0.1",     "microsoft.aspnetcore.razor.tools": {       "version": "1.0.0-preview2-final",       "type": "build"     },     "microsoft.aspnetcore.server.iisintegration": "1.0.0",     "microsoft.aspnetcore.server.kestrel": "1.0.1",     "microsoft.aspnetcore.staticfiles": "1.0.0",     "microsoft.entityframeworkcore.sqlserver": "1.0.1",     "microsoft.entityframeworkcore.sqlserver.design": "1.0.1",     "microsoft.entityframeworkcore.tools": {       "version": "1.0.0-preview2-final",       "type": "build"     },     "microsoft.extensions.caching.memory": "1.0.0",     "microsoft.extensions.configuration.environmentvariables": "1.0.0",     "microsoft.extensions.configuration.json": "1.0.0",     "microsoft.extensions.configuration.usersecrets": "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.visualstudio.web.browserlink.loader": "14.0.0",     "microsoft.visualstudio.web.codegeneration.tools": {       "version": "1.0.0-preview2-final",       "type": "build"     },     "microsoft.visualstudio.web.codegenerators.mvc": {       "version": "1.0.0-preview2-final",       "type": "build"     },     "serilog": "2.2.1",     "serilog.sinks.rollingfile": "3.0.1",     "serilog.sinks.literate": "2.0.0",     "serilog.extensions.logging": "1.2.0",     "automapper": "5.1.1",     "windowsazure.storage": "7.2.1",     "microsoft.azure.webjobs": "1.1.2",     "microsoft.windowsazure.configurationmanager": "3.2.1",     "uploadframework": "1.0.0-*",     "connelldatacore": "1.0.0-*",     "connelldata": "1.0.0-*",     "system.io.compression": "4.1.0",     "bundlerminifier.core": "2.2.281" },    "tools": {     "bundlerminifier.core": "2.0.238",     "microsoft.aspnetcore.razor.tools": "1.0.0-preview2-final",     "microsoft.aspnetcore.server.iisintegration.tools": "1.0.0-preview2-final",     "microsoft.entityframeworkcore.tools": "1.0.0-preview2-final",     "microsoft.extensions.secretmanager.tools": "1.0.0-preview2-final",     "microsoft.visualstudio.web.codegeneration.tools": {       "version": "1.0.0-preview2-final",       "imports": [         "portable-net45+win8"       ]     }   },    "frameworks": {     "net46": { }   },    "buildoptions": {     "emitentrypoint": true,     "preservecompilationcontext": true   },    "runtimeoptions": {     "configproperties": {       "system.gc.server": true     }   },    "publishoptions": {     "include": [       "wwwroot",       "views",       "areas/**/views",       "appsettings.json",       "web.config"     ]   },    "scripts": {     "prepublish": [ "bower install", "dotnet bundle" ],     "postpublish": [ "dotnet publish-iis --publish-folder %publish:outputpath% --framework %publish:fulltargetframework%" ]   } } 

all of projects 1 depends on built on top of net46. there project.json files have entries like:

  "frameworks": {     "net46": {       "frameworkassemblies": {         "system.configuration": "4.0.0.0"       }     }   } 

although in particular example incorporated frameworkassemblies entry because need access configurationmanager (and if that's not right way solve problem, please advise).

is right way configure aspnet core/ef core app run on top of net46? if not, need change?

additional info

the problems i'm running involve system.io.compression assembly. specifically, happened solution built, whenever website tried access ziparchive, crashed. because system.io.compression.dll wasn't deployed site's bin directory (interestingly, system.io.compression.zip.dll was deployed, it's not useful system.io.compression.dll).

i "solved" problem manually copying system.io.compression website's bin folder. manually copied dll doesn't deployed azure when site published, azure-based site exhibits same crashing problem.

in trying solve dug around through various projects , checked file versions of system.io.compression dlls. , discovered oddity: system.io.compression dll being included in subsidiary projects (on website depends) being deployed netcore assembly cache, not standard net4.6 cache.

i don't know means. think may related problem i'm encountering.

so goal is, somehow, ensure >>no<< project deploys assembly net core.

unfortunately, don't know how that. suspect issue involves reference, perhaps aspnet core itself, insisting on/defaulting using net core assemblies. don't know how tell not to.

the dll not being copied isn't related .net core, i'm not sure problem is, dll isn't copied because there no direct references in code. system.io.compression.zip.dll copied because somewhere in code instantiating object or calling static method dll.

when entity framework 6 shipped moved sqlserver provider seperate dll , things broke on place because since no 1 had direct references in code wasn't getting deployed.

rob lang has interesting read on adventures , eventual solution:

var ensuredlliscopied = system.data.entity.sqlserver.sqlproviderservices.instance; 

i've seen simular issues of sqlserver data type dlls when deploying application local reports, there took different approach , referenced dlls directly in web project (there many) , set them copy local true, believe long dlls refrerenced in project being published or deployed copied output folder, if they're referenced class library that's referenced project being published/deployed won't.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -