user1260827
user1260827

Reputation: 1520

config for Nlog in class library

I have a class library called Logging. In the solution I have many projects: ASP.NET MVC app, WCF services, and other projects. The problem in that I must put config file for every project. I want to the config file locate only in one place, in the class library. Is this possible?

I'm using NLog.

Upvotes: 1

Views: 2269

Answers (1)

Dmitry Khryukin
Dmitry Khryukin

Reputation: 6448

You can add an existing item (NLog.config from your class library) to all others projects as a link. An you'll be able to manage NLog configuration in one place.

1) Right click to a project - Add -> Existing Item...

enter image description here

2) Navigate to your class library folder, select NLog.config file and add it as a link. enter image description here

Upvotes: 1

Related Questions