Multiple Projects

111 views
Skip to first unread message

Douglas Jones

unread,
Nov 23, 2013, 5:14:45 PM11/23/13
to nlog-...@googlegroups.com, doug....@rsa.rohde-schwarz.com
Just started using NLog. I have an application that resides in a single VS2012 solution. The application has a project that creates the executable and several projects that creat DLLs. When performed a NuGet on this solution, NLog was put into each project. Fine, I get that you need the libraries in the references.
 
However, it dropped a NLog.config file in each project. I want all of the logging to go to a single log file. Do I need to "point" each projects NLog.config to some sommon target or can I delet the NLog.config files in each DLL project and will NLog use the config file for the solution? That sounds very confusing. Basically can I just have one NLog.config to rule them all? Or is a config file required for each project?
 
If a config file is required for each project how do I get all the logging into a single file?
 
Thanks,
Doug
 
 

Kim Christensen

unread,
Nov 25, 2013, 1:17:42 AM11/25/13
to nlog-...@googlegroups.com

The config isn't required in each project, I'll check the Nuget package. Which package did you install?

Douglas Jones

unread,
Nov 26, 2013, 8:18:06 PM11/26/13
to nlog-...@googlegroups.com, doug....@rsa.rohde-schwarz.com
Here is what I have installed:

  <package id="NLog" version="2.1.0" targetFramework="net40" />
  <package id="NLog.Config" version="2.1.0" targetFramework="net40" />
  <package id="NLog.Schema" version="2.1.0" targetFramework="net40" />

Thaks!

Kim Christensen

unread,
Nov 27, 2013, 4:39:31 AM11/27/13
to nlog-...@googlegroups.com

In projects not needing a configuration file, only NLog package has to be installed

Reply all
Reply to author
Forward
0 new messages