开发者

WCF, how stop stop log4net file being created on build

I am having a problem with the log4net file in a WCF service i have created.

When i build and run my WCF services it created log4net then errors with the following...

"Could not load file or assembly 'log4net' or one of its dependencies. An attempt was made to load a program with an incorrect format."

When I delete the fle fro开发者_JAVA技巧m the bin folder and refresh the browser the services run fine.

So, how can i stop the log4net being created in the bin foler when i build my project? as i dont need it


Somewhere in your service project, you probably have a reference to a log4net assemly. Or the log4net assembly is referenced in another assemly that is referenced in your service project. Somehow it is chained-in as a dependency for your service to be deployed and is therefore copied into your bin folder.

Find the reference to the log4net assembly, select it and select Properties from its context menu. In the Properties window set Copy Local to false. This will prevent the assembly to be copied into the output bin folder.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜