Trying to figure out to use System.Diagnostics.EventLog
in a multi-target project. The targets are:
- .NET 5
- .NET Framework 4.8
I have 3 projects in my solution and everything works fine on the 2 others.
The one raising up problems is referencing System.Diagnostics.EventLog
for .NET 5 since it's required to use EventLog
.
On the .NET framework 4.8, System.Diagnostics.EventLog
namespace uses System.dll
.
I'm looking for a way to include a reference to this library only in .NET 5 project, and not in the 4.8 one.
When I ad the reference to the project, it seems like it adds it to both targets. Is there a way to add it to the .NET 5 and not to the .NET framework 4.8?