Skip to content

kolosovpetro/EventLogEntryDemo

Repository files navigation

Event Log Entry Demo

Shows how to write entries to Windows event log via ASP .NET Core application

01_img

Documentation

Nuget packages

Compile time code style checking

  • Microsoft.CodeAnalysis.NetAnalyzers

Unit tests project

  • coverlet.msbuild
  • coverlet.collector
  • FluentAssertions

Required property groups in project file

<PropertyGroup>
    <EnableNETAnalyzers>true</EnableNETAnalyzers>
    <AnalysisMode>Recommended</AnalysisMode>
    <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

Commands

  • dotnet test -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:CoverletOutput=../TestResults
  • dotnet tool install --global dotnet-reportgenerator-globaltool --version 4.8.6
  • reportgenerator "-reports:TestResults.opencover.xml" "-targetdir:coveragereport" -reporttypes:Html
  • dotnet test -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:CoverletOutput=TestResults -p:SkipAutoProps=true -p:Threshold=80

Sources

About

Shows how to write entries to Windows Event Log

Topics

Resources

Stars

Watchers

Forks