c# - Error in Microsoft Enterprise Library 6 Unitycontainer -
i using following code in project enterprise library 6 , error :
"the type or namespace name 'enterpriselibrarycoreextension' not found "
how fix error ?
var container = new unitycontainer().addnewextension<enterpriselibrarycoreextension>(); container.registertype<ilog, logger_enterprise>(); var logger = container.resolve<ilog>(); logger.log("message");
according grigori melnik on release announcement page,
the enterprise library blocks no longer use unity container resolve instances. should remove calls addnewextension method of unity container code. if application resolves enterprise library objects container, must either manually register required types in unity container, or modify application use static facades in blocks configure , retrieve enterprise library objects application uses.
also, other changes, don't forget check out change log , migration guide.
Comments
Post a Comment