Anoni Muss 1 year ago • updated by j.verdurmen 5 months ago 1

If anyone knows of a good way to overcome the diy downside, having a Shared Project project in NLog would be nice.

The drawback is Shared Project can not have references or define conditional compilation symbols so the application must add whatever NLog needs. It's not difficult to add those manually, but if it can't be automagic it's probably best left to DIY.

I'm successfully using NLog in one application now as a Shared Project and haven't hit a snag yet (just did it today though). Besides references & conditional symbols mentioned above it was just one line to the <Item Group> in .projitems to get it running

<Compile Include="$(MSBuildThisFileDirectory)NLog\src\NLog\**\*.cs" Exclude="$(MSBuildThisFileDirectory)NLog\src\NLog\Resources\*;$(MSBuildThisFileDirectory)NLog\src\NLog\Properties\*" />


We will supported netstandard, but not shared projects (but PR is accepted when well tested)