C
C#3y ago
gio735

System.Diagnostics.EventLog [Answered]

For some reason it's not appearing either with name or full name, I'm using .NET6 console app
7 Replies
Klarth
Klarth3y ago
Did you add the NuGet package? System.Diagnostics.EventLog You may also need to change the target framework to net6.0-windows.
gio735
gio735OP3y ago
I didn't know about that, ty I will try it yes it worked, tysm. VS didn't suggest NuGet package and couldn't find about it in MCS docs either so were a bit confused
Klarth
Klarth3y ago
How I figured it out was looking at it on https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.eventlog?view=dotnet-plat-ext-6.0 If it's part of the Platform Extensions, you get it via NuGet. Usually it's named the same as the "Assembly" up top.
gio735
gio735OP3y ago
so if its Extension it's always part of NuGet package?
Klarth
Klarth3y ago
AFAIK, yes. At least you should suspect it.
gio735
gio735OP3y ago
got it, thank you
Accord
Accord3y ago
✅ This post has been marked as answered!
Want results from more Discord servers?
Add your server