Setting up C# solution with multiple projects using NLog in Visual Studio

前端 未结 3 841
名媛妹妹
名媛妹妹 2021-02-13 18:01

My solution in Visual Studio 2012 currently contains two projects:

  • DLL
  • WPF application (which requires methods of the DLL)

Both, the DLL an

3条回答
  •  感情败类
    2021-02-13 18:39

    well you need the DLL in all projects where you use it and surely you need it deployed with the binaries of the executable (WPF application in your case) so that it can be found and used at runtime.

    what I tend to do in all my projects is create a wrapper around the logging engine so that I do not need to reference and depend on specific third party logging APIs, like Log4Net or NLog, so I use my wrapper logging class everywhere and then I have a reference to the logging asembly only in the wrapper class's project and in the executable project to have the assembly deployed to the bin folder.

    hope this helps ;-)

提交回复
热议问题