Skip to content

Commit 27e413e

Browse files
authored
Merge pull request #1 from CodeMangler/feat/upgrade-dotnet6-github-actions
Upgrade project to .NET 6 and add GitHub Actions workflow
2 parents 9c63a42 + d2a4084 commit 27e413e

15 files changed

Lines changed: 64 additions & 322 deletions

File tree

.github/workflows/dotnet-build.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: .NET Build and Test
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: windows-latest # Changed to windows-latest due to EventLog dependency
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Setup .NET 6
18+
uses: actions/setup-dotnet@v3
19+
with:
20+
dotnet-version: '6.0.x'
21+
22+
- name: Restore dependencies
23+
run: dotnet restore "EventLogAnalyzer.sln"
24+
25+
- name: Build
26+
run: dotnet build "EventLogAnalyzer.sln" --configuration Release --no-restore
27+
28+
- name: Test
29+
run: dotnet test "EventLogAnalyzer.sln" --configuration Release --no-build --no-restore

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@ bin
77
obj
88
Debug
99
Release
10+
11+
# Build output folder
12+
Output/
13+
14+
# Visual Studio cache
15+
.vs/
Lines changed: 6 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,14 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
1+
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProductVersion>8.0.50727</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{9F3849C7-CB75-42BF-9426-E466030D492F}</ProjectGuid>
93
<OutputType>Exe</OutputType>
10-
<AppDesignerFolder>Properties</AppDesignerFolder>
4+
<TargetFramework>net6.0</TargetFramework>
115
<RootNamespace>pal.EventLogAnalyzer.ConsoleClient</RootNamespace>
126
<AssemblyName>EventLogAnalyzer.ConsoleClient</AssemblyName>
13-
<FileUpgradeFlags>
14-
</FileUpgradeFlags>
15-
<OldToolsVersion>3.5</OldToolsVersion>
16-
<UpgradeBackupLocation>
17-
</UpgradeBackupLocation>
18-
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<Nullable>enable</Nullable>
9+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1910
</PropertyGroup>
20-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
21-
<DebugSymbols>true</DebugSymbols>
22-
<DebugType>full</DebugType>
23-
<Optimize>false</Optimize>
24-
<OutputPath>bin\Debug\</OutputPath>
25-
<DefineConstants>DEBUG;TRACE</DefineConstants>
26-
<ErrorReport>prompt</ErrorReport>
27-
<WarningLevel>4</WarningLevel>
28-
</PropertyGroup>
29-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30-
<DebugType>pdbonly</DebugType>
31-
<Optimize>true</Optimize>
32-
<OutputPath>bin\Release\</OutputPath>
33-
<DefineConstants>TRACE</DefineConstants>
34-
<ErrorReport>prompt</ErrorReport>
35-
<WarningLevel>4</WarningLevel>
36-
</PropertyGroup>
37-
<ItemGroup>
38-
<Reference Include="System" />
39-
<Reference Include="System.Data" />
40-
<Reference Include="System.Xml" />
41-
</ItemGroup>
42-
<ItemGroup>
43-
<Compile Include="CLI.cs" />
44-
<Compile Include="CommandLineArgumentHandler.cs" />
45-
<Compile Include="Filters\AbstractInputFilter.cs" />
46-
<Compile Include="Filters\AfterDateTimeFilter.cs" />
47-
<Compile Include="Filters\AtDateTimeFilter.cs" />
48-
<Compile Include="Filters\BeforeDateTimeFilter.cs" />
49-
<Compile Include="Filters\EventTypeFilter.cs" />
50-
<Compile Include="Filters\IInputFilter.cs" />
51-
<Compile Include="Filters\IntegerEqualityFilter.cs" />
52-
<Compile Include="Filters\NullFilter.cs" />
53-
<Compile Include="Filters\StringContainsFilter.cs" />
54-
<Compile Include="Filters\StringEqualityFilter.cs" />
55-
<Compile Include="Filters\StringStartsWithFilter.cs" />
56-
<Compile Include="FuzzyComparer\Aggregate.cs" />
57-
<Compile Include="FuzzyComparer\FuzzyStringComparisonAlgorithm.cs" />
58-
<Compile Include="FuzzyComparer\IComparisonAlgorithm.cs" />
59-
<Compile Include="ILogRecordClassifier.cs" />
60-
<Compile Include="InputFilterArguments.cs" />
61-
<Compile Include="EventLogRecordClassifier.cs" />
62-
<Compile Include="OutputFilterArguments.cs" />
63-
<Compile Include="ProcessControlArguments.cs" />
64-
<Compile Include="Properties\AssemblyInfo.cs" />
65-
<Compile Include="Reporting\AbstractSummaryWriter.cs" />
66-
<Compile Include="Reporting\FileNameGenerator.cs" />
67-
<Compile Include="Reporting\HtmlSummaryWriter.cs" />
68-
<Compile Include="Reporting\ReportGenerator.cs" />
69-
<Compile Include="Properties\Resources.Designer.cs">
70-
<AutoGen>True</AutoGen>
71-
<DesignTime>True</DesignTime>
72-
<DependentUpon>Resources.resx</DependentUpon>
73-
</Compile>
74-
<Compile Include="Reporting\TextSummaryWriter.cs" />
75-
</ItemGroup>
76-
<ItemGroup>
77-
<ProjectReference Include="..\EventLog\EventLog.csproj">
78-
<Project>{540AA583-6BC3-4894-9A9F-44438F3955E5}</Project>
79-
<Name>EventLog</Name>
80-
</ProjectReference>
81-
</ItemGroup>
8211
<ItemGroup>
83-
<EmbeddedResource Include="Properties\Resources.resx">
84-
<SubType>Designer</SubType>
85-
<Generator>ResXFileCodeGenerator</Generator>
86-
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
87-
</EmbeddedResource>
12+
<ProjectReference Include="..\EventLog\EventLog.csproj" />
8813
</ItemGroup>
89-
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
90-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
91-
Other similar extension points exist, see Microsoft.Common.targets.
92-
<Target Name="BeforeBuild">
93-
</Target>
94-
<Target Name="AfterBuild">
95-
</Target>
96-
-->
9714
</Project>

EventLog/EventLog.csproj

Lines changed: 6 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,13 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
1+
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProductVersion>8.0.50727</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{540AA583-6BC3-4894-9A9F-44438F3955E5}</ProjectGuid>
9-
<OutputType>Library</OutputType>
10-
<AppDesignerFolder>Properties</AppDesignerFolder>
3+
<TargetFramework>net6.0</TargetFramework>
114
<RootNamespace>pal.EventLog</RootNamespace>
125
<AssemblyName>pal.EventLog</AssemblyName>
13-
<FileUpgradeFlags>
14-
</FileUpgradeFlags>
15-
<OldToolsVersion>3.5</OldToolsVersion>
16-
<UpgradeBackupLocation>
17-
</UpgradeBackupLocation>
18-
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
198
</PropertyGroup>
20-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
21-
<DebugSymbols>true</DebugSymbols>
22-
<DebugType>full</DebugType>
23-
<Optimize>false</Optimize>
24-
<OutputPath>bin\Debug\</OutputPath>
25-
<DefineConstants>DEBUG;TRACE</DefineConstants>
26-
<ErrorReport>prompt</ErrorReport>
27-
<WarningLevel>4</WarningLevel>
28-
</PropertyGroup>
29-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30-
<DebugType>pdbonly</DebugType>
31-
<Optimize>true</Optimize>
32-
<OutputPath>bin\Release\</OutputPath>
33-
<DefineConstants>TRACE</DefineConstants>
34-
<ErrorReport>prompt</ErrorReport>
35-
<WarningLevel>4</WarningLevel>
36-
</PropertyGroup>
37-
<ItemGroup>
38-
<Reference Include="System" />
39-
<Reference Include="System.Data" />
40-
<Reference Include="System.Xml" />
41-
</ItemGroup>
9+
4210
<ItemGroup>
43-
<Compile Include="AbstractEventLogFile.cs" />
44-
<Compile Include="BinaryEventLogFile.cs" />
45-
<Compile Include="CsvEventLogFile.cs" />
46-
<Compile Include="CsvEventLogRecord.cs" />
47-
<Compile Include="EventLogFileCollection.cs" />
48-
<Compile Include="BinaryEventLogRecord.cs" />
49-
<Compile Include="EventLogFileFactory.cs" />
50-
<Compile Include="Footer.cs" />
51-
<Compile Include="Globals.cs" />
52-
<Compile Include="Header.cs" />
53-
<Compile Include="IEventLogFile.cs" />
54-
<Compile Include="IEventLogRecord.cs" />
55-
<Compile Include="LogRecordSearchCriteria.cs" />
56-
<Compile Include="Metadata.cs" />
57-
<Compile Include="Properties\AssemblyInfo.cs" />
58-
<Compile Include="XmlEventLogFile.cs" />
59-
<Compile Include="XmlEventLogRecord.cs" />
11+
<PackageReference Include="System.Diagnostics.EventLog" Version="6.0.0" />
6012
</ItemGroup>
61-
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
62-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
63-
Other similar extension points exist, see Microsoft.Common.targets.
64-
<Target Name="BeforeBuild">
65-
</Target>
66-
<Target Name="AfterBuild">
67-
</Target>
68-
-->
6913
</Project>

EventLog/EventLog.idc

Lines changed: 0 additions & 1 deletion
This file was deleted.

EventLog/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 38 deletions
This file was deleted.

Output/Analyzer.exe

-36 KB
Binary file not shown.

Output/EventLog.netmodule

-28 KB
Binary file not shown.

Output/Resources.resources

-866 Bytes
Binary file not shown.

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ Warning: It can be quite slow if you're processing a large number of Event Log r
1212

1313
Hopefully, I'll get around to fixing the performance when I get some time (now that I've reopened the project after over 3 years :D).
1414

15+
### Building the Project
16+
This project is built using .NET 6. To build it:
17+
1. Clone the repository.
18+
2. Navigate to the root directory of the cloned repository.
19+
3. Run the command: `dotnet build EventLogAnalyzer.sln`
20+
21+
The main executable will be found in `Console Client/bin/Debug/net6.0/` or `Console Client/bin/Release/net6.0/` depending on the build configuration.
22+
1523
### Commandline Options:
1624
Pre-filters::
1725
Time: -after -before -at

0 commit comments

Comments
 (0)