Skip to content

Commit

Permalink
NET8
Browse files Browse the repository at this point in the history
  • Loading branch information
LiorBanai committed Nov 15, 2023
1 parent 8093d85 commit 083fc31
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 29 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ dotnet_diagnostic.SA1122.severity = suggestion
dotnet_diagnostic.SA1108.severity = silent
dotnet_diagnostic.SA1012.severity = error
dotnet_diagnostic.SA1500.severity = error
dotnet_diagnostic.SA1316.severity = error

[*.{cs,vb}]
dotnet_style_operator_placement_when_wrapping = beginning_of_line
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dotnet-core-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3.0.3
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.1.3
uses: microsoft/setup-msbuild@v1.3.1

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Analogy.LogViewer.NLog.Targets.UnitTests/UnitTest1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
// {
// }
// }
//}
//}
8 changes: 6 additions & 2 deletions Analogy.LogViewer.NLog.Targets.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30404.54
# Visual Studio Version 17
VisualStudioVersion = 17.8.34309.116
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Analogy.LogViewer.NLog.Targets", "Analogy.LogViewer.NLog.Targets\Analogy.LogViewer.NLog.Targets.csproj", "{68AE619D-E4FF-4FE2-866A-A85B0369097B}"
EndProject
Expand All @@ -10,6 +10,10 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2AD56165-40DC-4358-A1E4-7405DFA3A32C}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
BannedSymbols.txt = BannedSymbols.txt
Directory.Build.props = Directory.Build.props
.github\workflows\dotnet-core-desktop.yml = .github\workflows\dotnet-core-desktop.yml
nuget.config = nuget.config
EndProjectSection
EndProject
Global
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0-windows;net6.0-windows;net48;net471</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Lior Banai © 2020-2023</Authors>
<TargetFrameworks>net8.0-windows;net7.0-windows;net6.0-windows;net48;net471</TargetFrameworks>
<Authors>Lior Banai © 2020-2024</Authors>
<Company>Analogy.LogViewer</Company>
<IsPackable>true</IsPackable>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<RepositoryUrl>https://github.com/Analogy-LogViewer/Analogy.LogViewer.NLog.Targets</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageProjectUrl>https://github.com/Analogy-LogViewer/Analogy.LogViewer.NLog.Targets</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>AnalogyNlog.png</PackageIcon>
<VersionPrefix>5.0.3.2</VersionPrefix>
<VersionPrefix>6.0.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Analogy.LogServer.Clients" Version="5.0.3.1" />
<PackageReference Include="Analogy.LogViewer.Interfaces" Version="5.0.3" />
<PackageReference Include="Analogy.LogServer.Clients" Version="6.0.0" />
<PackageReference Include="Analogy.LogViewer.Interfaces" Version="6.0.0.1" />
<PackageReference Include="NLog" Version="5.2.5" />
<PackageReference Include="Microsoft.Build.Tasks.Git" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
Expand Down
2 changes: 1 addition & 1 deletion Analogy.LogViewer.NLog.Targets/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public static class Constants
public static readonly string Source = "Source";
public static readonly string ThreadId = "ThreadId";
}
}
}
10 changes: 5 additions & 5 deletions Analogy.LogViewer.NLog.Targets/NLogToAnalogyGRPCTarget.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using Analogy.Interfaces;
using Analogy.Interfaces;
using NLog;
using NLog.Config;
using NLog.Layouts;
using NLog.Targets;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;

namespace Analogy.LogViewer.NLog.Targets
{
Expand Down Expand Up @@ -147,4 +147,4 @@ private static AnalogyLogLevel ConvertLogLevel(LogLevel logLevel)
return AnalogyLogLevel.Unknown;
}
}
}
}
9 changes: 9 additions & 0 deletions BannedSymbols.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#https://github.com/dotnet/csharplang/blob/main/spec/documentation-comments.md#id-string-format

M:System.String.ToLower;Use ToLowerInvariant instead
M:System.String.ToUpper;Use ToUpperInvariant instead

F:System.StringComparison.CurrentCulture;Consider using Ordinal
F:System.StringComparison.CurrentCultureIgnoreCase;Consider using OrdinalIgnoreCase
F:System.StringComparison.InvariantCurrent;Consider using Ordinal
F:System.StringComparison.InvariantCurrentIgnoreCase;Consider using OrdinalIgnoreCase
64 changes: 64 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<Project>
<PropertyGroup>
<UseWindowsForms>true</UseWindowsForms>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<RepositoryType>git</RepositoryType>
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.StartsWith('Debug'))">
<DefineConstants>$(DefineContants);DEBUG</DefineConstants>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.StartsWith('Release'))">
<Optimize>true</Optimize>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<!--<SourceRoot Include="$(MSBuildThisFileDirectory)/" />-->
<AdditionalFiles Include="$(MSBuildThisFileDirectory)/BannedSymbols.txt" Link="Properties/BannedSymbols.txt" />
</ItemGroup>
<!-- Analyzers (Roslyn, Meziantou, StyleCop, ...) -->
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.7.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Meziantou.Analyzer" Version="2.0.110">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' or '$(TargetFramework)' == 'net471' ">
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
<PackageReference Include="PolySharp" Version="1.13.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>

0 comments on commit 083fc31

Please sign in to comment.