c# - How references are copied to the build folder? -
i have project references project b. project b has reference entityframework nuget package (6.1.3). package installs 2 dll : entityframework , entityframeork.sqlserver. there no reference entityframework project a.
when build project a, in bin folder, there project b dll , entityframework dll. there not entityframework.sqlserver dll. , because of that, project not run well.
why of project b dependencies copied main project build folder not dependencies ? (both has "copy local" properties set on true)
sorry english, not native speaker.
it because there no code in projects used entityframeork.sqlserver
, vs thinks there no dependency , not copy it. use workaround:
public class mycontext : dbcontext { //workaround force sqlserver dll copy private static sqlproviderservices instance = sqlproviderservices.instance; }
you can add reference entityframeork.sqlserver
a
project , set copylocal
true it.
Comments
Post a Comment