Skip to content

Commit 1b9a404

Browse files
Migrates solution to .NET 8.0 (#6)
Upgrades all projects to .NET 8.0 * Converts all project files to the new SDK format * Updates AssemblyInfo.cs files (removes attributes that get generated during the build) * Fixes all build errors related to API changes * Upgrades all referenced NuGet packages * Removes exception constructors for binary serialization (no longer needed) * Removes app.config files (cleans static binding redirects) * Fixes impersonation helpers in Interop code * Removes functionality that downloads update installers (due to dead infrastructure) * Adds changelog and updates the README.md file
1 parent 27652d8 commit 1b9a404

File tree

124 files changed

+1121
-5079
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+1121
-5079
lines changed

.github/workflows/dotnet.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: .NET Core Desktop
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
11+
build:
12+
13+
runs-on: windows-latest # For a list of available runner types, refer to
14+
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Install .NET Core
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: 8.0.x
26+
27+
- name: Execute unit tests
28+
run: |
29+
cd sourcecodes
30+
dotnet build --configuration Release
31+
dotnet test ./FolderSecurityViewer.sln --framework net8.0-windows --configuration Release

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ obj/
1010
*.pdb
1111

1212
*.csproj.user
13-
*.DotSettings.user
13+
*.DotSettings.user
14+
15+
upgrade-reports/

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [v2.8.0-beta.1] - 2024-07-25
9+
10+
### Changed
11+
12+
- Converts all project files to the new SDK format
13+
- Updates `AssemblyInfo.cs` files (removes attributes that get generated during the build)
14+
- Upgrades all referenced NuGet packages
15+
- Fixes all build errors related to API changes
16+
- Fixes impersonation helpers in Interop code
17+
- Removes exception constructors for binary serialization (no longer needed)
18+
- Removes `app.config` files (cleans static binding redirects)
19+
- Removes functionality that downloads update installers (due to dead infrastructure)
20+
21+
22+
## [v2.7.0-beta.1] - 2024-03-24
23+
24+
- Initial release

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,23 @@ If you want to automate your NTFS permissions reporting, you can use the Command
3737

3838
The application can be compiled on Windows, and depends on the following Frameworks and utilities:
3939

40-
* .NET Framework 4.7.2, and .NET Framework 4.8
40+
* .NET Framework 8.0 SDK
4141
* Optional: Visual Studio 2022
4242
* MSBuild version 17.9.8 or above
4343

4444
### Build
4545

4646
````bash
4747
$ cd sourcecodes
48-
$ msbuild ./FolderSecurityViewer.sln /t:restore /p:Configuration=Release
48+
$ dotnet build ./FolderSecurityViewer.sln --configuration Release
4949
````
5050

51+
### Run tests
5152

53+
````bash
54+
$ dotnet clean && dotnet build
55+
$ dotnet test --framework net8.0-windows
56+
````
5257

5358

5459
Copyright (C) 2015 - 2024 by Carsten Schäfer, Matthias Friedrich, and Ritesh Gite
Lines changed: 10 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,23 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{D58D5D7B-87AC-46F8-839E-BF5015697509}</ProjectGuid>
3+
<TargetFramework>net8.0-windows</TargetFramework>
84
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>FSV.ActiveDirectoryServices.TestAbstractionLayer</RootNamespace>
11-
<AssemblyName>FSV.ActiveDirectoryServices.TestAbstractionLayer</AssemblyName>
12-
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
145
<LangVersion>latest</LangVersion>
15-
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<PlatformTarget>AnyCPU</PlatformTarget>
18-
<DebugSymbols>true</DebugSymbols>
19-
<DebugType>full</DebugType>
20-
<Optimize>false</Optimize>
21-
<OutputPath>bin\Debug\</OutputPath>
22-
<DefineConstants>DEBUG;TRACE</DefineConstants>
23-
<ErrorReport>prompt</ErrorReport>
24-
<WarningLevel>4</WarningLevel>
25-
</PropertyGroup>
26-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27-
<PlatformTarget>AnyCPU</PlatformTarget>
28-
<DebugType>pdbonly</DebugType>
29-
<Optimize>true</Optimize>
30-
<OutputPath>bin\Release\</OutputPath>
31-
<DefineConstants>TRACE</DefineConstants>
32-
<ErrorReport>prompt</ErrorReport>
33-
<WarningLevel>4</WarningLevel>
6+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
347
</PropertyGroup>
358
<PropertyGroup>
36-
<SignAssembly>true</SignAssembly>
9+
<AssemblyTitle>FSV.ActiveDirectoryServices.TestAbstractionLayer</AssemblyTitle>
10+
<Product>FSV.ActiveDirectoryServices.TestAbstractionLayer</Product>
11+
<Copyright>Copyright © 2015 - 2024 G-TAC Software UG</Copyright>
12+
<AssemblyVersion>1.0.0.0</AssemblyVersion>
13+
<FileVersion>1.0.0.0</FileVersion>
3714
</PropertyGroup>
3815
<ItemGroup>
39-
<Reference Include="System" />
40-
<Reference Include="System.Core" />
41-
<Reference Include="System.Data" />
42-
<Reference Include="System.Xml" />
43-
</ItemGroup>
44-
<ItemGroup>
45-
<Compile Include="ActiveDirectoryYamlAbstractionService.cs" />
46-
<Compile Include="Models\DomainModel.cs" />
47-
<Compile Include="Models\ForestModel.cs" />
48-
<Compile Include="Properties\AssemblyInfo.cs" />
49-
</ItemGroup>
50-
<ItemGroup>
51-
<ProjectReference Include="..\FSV.AdServices\FSV.AdServices.csproj">
52-
<Project>{544ef25e-75dc-4166-9ff2-f0005388146f}</Project>
53-
<Name>FSV.AdServices</Name>
54-
</ProjectReference>
16+
<ProjectReference Include="..\FSV.AdServices\FSV.AdServices.csproj" />
5517
</ItemGroup>
5618
<ItemGroup>
5719
<PackageReference Include="YamlDotNet">
58-
<Version>11.2.1</Version>
20+
<Version>16.0.0</Version>
5921
</PackageReference>
6022
</ItemGroup>
61-
<Import Project="$(MSBuildToolsPath)\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-
-->
6923
</Project>

sourcecodes/FSV.ActiveDirectoryServices.TestAbstractionLayer/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@
1616

1717
using System.Reflection;
1818
using System.Runtime.InteropServices;
19-
20-
// General Information about an assembly is controlled through the following
21-
// set of attributes. Change these attribute values to modify the information
22-
// associated with an assembly.
23-
[assembly: AssemblyTitle("FSV.ActiveDirectoryServices.TestAbstractionLayer")]
24-
[assembly: AssemblyDescription("")]
25-
[assembly: AssemblyConfiguration("")]
26-
[assembly: AssemblyCompany("")]
27-
[assembly: AssemblyProduct("FSV.ActiveDirectoryServices.TestAbstractionLayer")]
28-
[assembly: AssemblyCopyright("Copyright © 2020")]
2919
[assembly: AssemblyTrademark("")]
3020
[assembly: AssemblyCulture("")]
3121

@@ -36,16 +26,3 @@
3626

3727
// The following GUID is for the ID of the typelib if this project is exposed to COM
3828
[assembly: Guid("D58D5D7B-87AC-46F8-839E-BF5015697509")]
39-
40-
// Version information for an assembly consists of the following four values:
41-
//
42-
// Major Version
43-
// Minor Version
44-
// Build Number
45-
// Revision
46-
//
47-
// You can specify all the values or you can default the Build and Revision Numbers
48-
// by using the '*' as shown below:
49-
// [assembly: AssemblyVersion("1.0.*")]
50-
[assembly: AssemblyVersion("1.0.0.0")]
51-
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 11 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,18 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{B8F6DD4E-25E7-43F7-8E86-76941A4D61A5}</ProjectGuid>
3+
<TargetFramework>net8.0</TargetFramework>
84
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>FSV.AdServices.Abstractions</RootNamespace>
11-
<AssemblyName>FSV.AdServices.Abstractions</AssemblyName>
12-
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
</PropertyGroup>
15-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16-
<PlatformTarget>AnyCPU</PlatformTarget>
17-
<DebugSymbols>true</DebugSymbols>
18-
<DebugType>full</DebugType>
19-
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
24-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
25-
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
26-
</PropertyGroup>
27-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28-
<PlatformTarget>AnyCPU</PlatformTarget>
29-
<DebugType>pdbonly</DebugType>
30-
<Optimize>true</Optimize>
31-
<OutputPath>bin\Release\</OutputPath>
32-
<DefineConstants>TRACE</DefineConstants>
33-
<ErrorReport>prompt</ErrorReport>
34-
<WarningLevel>4</WarningLevel>
5+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
356
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
36-
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
377
</PropertyGroup>
388
<PropertyGroup>
39-
<SignAssembly>true</SignAssembly>
9+
<AssemblyTitle>FSV.AdServices.Abstractions</AssemblyTitle>
10+
<AssemblyVersion>2.8.0.0</AssemblyVersion>
11+
<Company>G-TAC Software UG, Katzweiler, Germany</Company>
12+
<Copyright>Copyright © 2015 - 2024 G-TAC Software UG</Copyright>
13+
<Description>Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer"</Description>
14+
<FileVersion>2.8.0.0</FileVersion>
15+
<NeutralLanguage>en</NeutralLanguage>
16+
<Product>FolderSecurityViewer</Product>
4017
</PropertyGroup>
41-
<ItemGroup>
42-
<Reference Include="System" />
43-
<Reference Include="System.Core" />
44-
<Reference Include="System.Data" />
45-
<Reference Include="System.Xml" />
46-
</ItemGroup>
47-
<ItemGroup>
48-
<Compile Include="Properties\AssemblyInfo.cs" />
49-
</ItemGroup>
50-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
51-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
52-
Other similar extension points exist, see Microsoft.Common.targets.
53-
<Target Name="BeforeBuild">
54-
</Target>
55-
<Target Name="AfterBuild">
56-
</Target>
57-
-->
5818
</Project>

sourcecodes/FSV.AdServices.Abstractions/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,9 @@
1717
using System.Reflection;
1818
using System.Resources;
1919
using System.Runtime.InteropServices;
20-
21-
[assembly: AssemblyTitle("FSV.AdServices.Abstractions")]
22-
[assembly: AssemblyDescription("Part of G-TAC's NTFS Permissions Reporter 'FolderSecurityViewer'")]
23-
[assembly: AssemblyConfiguration("")]
24-
[assembly: AssemblyCompany("G-TAC Software UG, Katzweiler, Germany")]
25-
[assembly: AssemblyProduct("FolderSecurityViewer")]
26-
[assembly: AssemblyCopyright("Copyright © 2015 - 2022 G-TAC Software UG")]
2720
[assembly: AssemblyTrademark("G-TAC")]
2821
[assembly: AssemblyCulture("")]
2922

3023
[assembly: ComVisible(false)]
3124

3225
[assembly: Guid("B8F6DD4E-25E7-43F7-8E86-76941A4D61A5")]
33-
34-
[assembly: AssemblyVersion("2.7.0.0")]
35-
[assembly: AssemblyFileVersion("2.7.0.0")]
36-
[assembly: NeutralResourcesLanguage("en")]

sourcecodes/FSV.AdServices.UnitTest/ActiveDirectoryGroupInfoCacheTest.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,21 @@ public void ActiveDirectoryGroupInfoCache_Clear_does_not_throw_on_empty_cache_Te
3131
// Arrange
3232
var sut = new ActiveDirectoryGroupInfoCache();
3333

34+
var principalContextInfo = new PrincipalContextInfo(ContextType.Domain, "name");
35+
36+
const string groupName = "group-name";
37+
var groupPrincipalInfo = new GroupPrincipalInfo(principalContextInfo, groupName, "sid", "distinguished-name", true, Enumerable.Empty<PrincipalInfo>());
38+
sut.AddGroup(groupName, groupPrincipalInfo);
39+
40+
bool groupExists = sut.TryGetGroup(groupName, out _);
41+
3442
// Act
3543
sut.Clear();
44+
bool groupMissingAfterClear = sut.TryGetGroup(groupName, out _) == false;
3645

3746
// Assert
47+
Assert.IsTrue(groupExists);
48+
Assert.IsTrue(groupMissingAfterClear);
3849
}
3950

4051
[TestMethod]

0 commit comments

Comments
 (0)