NLog / NLog.WindowsIdentity

NLog extensions for displaying User Windows Identity and target wrapper for user impersonation
BSD 3-Clause "New" or "Revised" License
1 stars 2 forks source link

#9 add in net 6 #10

Open thompson-tomo opened 5 months ago

thompson-tomo commented 5 months ago

This will add net 6 as a TFM and ensure that the dependencies are not added.

Closes #1 Closes #9

thompson-tomo commented 5 months ago

@304NotModified dotnet 8 is not needed as for dotnet 8 it will use the net 6 compilation. Yes i have gone and adjusted the conditional compiles

snakefoot commented 5 months ago

Well NET6 will expire soon (end of year), and then the build-pipeline will explode. So I guess you need to add both NET6 + NET8,

thompson-tomo commented 5 months ago

Strongly doubt that it would explode given that pipelines using net core 3 are still operational.

snakefoot commented 5 months ago

Can these build-warnings CA1416 be fixed:

NLog.WindowsIdentity -> C:\projects\NLog-WindowsIdentity\src\NLog.WindowsIdentity\bin\Any CPU\Release\net46\NLog.WindowsIdentity.dll
C:\projects\NLog-WindowsIdentity\tests\NLog.WindowsIdentity.Tests\ImpersonatingTargetWrapperTests.cs(133,70): warning CA1416: This call site is reachable on all platforms. 'WindowsIdentity.Name' is only supported on: 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416) [C:\projects\NLog-WindowsIdentity\tests\NLog.WindowsIdentity.Tests\NLog.WindowsIdentity.Tests.csproj::TargetFramework=net6.0]
thompson-tomo commented 5 months ago

Can these build-warnings CA1416 be fixed:

NLog.WindowsIdentity -> C:\projects\NLog-WindowsIdentity\src\NLog.WindowsIdentity\bin\Any CPU\Release\net46\NLog.WindowsIdentity.dll
C:\projects\NLog-WindowsIdentity\tests\NLog.WindowsIdentity.Tests\ImpersonatingTargetWrapperTests.cs(133,70): warning CA1416: This call site is reachable on all platforms. 'WindowsIdentity.Name' is only supported on: 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416) [C:\projects\NLog-WindowsIdentity\tests\NLog.WindowsIdentity.Tests\NLog.WindowsIdentity.Tests.csproj::TargetFramework=net6.0]

This should also be resolved now

snakefoot commented 5 months ago

Then I guess it is "just" a matter of making the build-pipeline green.

thompson-tomo commented 5 months ago

Then I guess it is "just" a matter of making the build-pipeline green.

hopefully those last changes to the test projects resolve the build pipeline

snakefoot commented 5 months ago

Since you are explicitly adding NET6 and NET8, then I guess we should change this:

<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<IsTrimmable>true</IsTrimmable>

To this:

<EnableTrimAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>