asp.net mvc - Issue while publishing Web in VS2012 -


am working on mvc project different layers(main project mvc web other projects class libraries bin points mvc web bin folder) dependency injection using unity.

while running in local machine looks fine. if publish web , browse application getting

the given assembly name or codebase invalid.

var container = new unitycontainer(); container.loadconfiguration();        //error line 

i took time see issue , found in published bin folder business , data access dll's missing ?

is because of unity ? because interface refers business layer through unity?

am missing or how publish without issues ?

ps :if copy dll , put in virtual directory folder looks fine.

thanks

in web project, or final project employs dependency injection (could wpf or silverlignt application, classic asp.net), all binaries used should made available.

imagine have lib1.dll , lib1.impl.dll, respectively api library , concrete implementation of api. now, in web project rely on dependency injection provide concrete implementation of interfaces lib1.dll. may never happen use class lib1.impl.dll directly in application. still, the di framework needs access lib1.impl.dll in order instantiate dependencies.

depending on di framework , supported capabilities of loading dependencies, should provide them accordingly. seems straightforward have them in bin folder, or referenced directly final project - reason project works when provide implementation dll-s in bin folder. since, however, goes against considerations of decoupling, may have @ alternative approaches dynamically load dll-s - physical location instance. sure unity supports mechanisms this, since modularity in enterprise library allows bootstrapping modules filesystem location.

i must say, though, while mentioned decoupling , keeping references separate, not issue if have them referenced in final tier of project hierarchy (the web application), as long not have code causes coupling in application.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -