Skip to content

Commit

Permalink
Multi-Targets projects for target framework compatibility with Micros…
Browse files Browse the repository at this point in the history
…oft.Extensions.Logging (#54)

* Multi-targets projects in order to pull appropriate Microsoft.Logging.Extensions version in.

* Removes transient dependencies from QuixStreams.Kafka.Transport project.

* Tabs vs spaces

---------

Co-authored-by: WillF <[email protected]>
  • Loading branch information
w-as and WillF authored May 24, 2024
1 parent 7f11ff4 commit 1e318a6
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<DocumentationFile>bin\$(OutputDir)\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<Configurations>Debug;Release</Configurations>
<TargetFrameworks>net7.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -19,21 +19,10 @@
<Copyright>Copyright © Quix Analytics Ltd 2020</Copyright>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\QuixStreams.Kafka\QuixStreams.Kafka.csproj" />
</ItemGroup>


<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>QuixStreams.Kafka.Transport.Tests</_Parameter1>
Expand Down
16 changes: 13 additions & 3 deletions src/QuixStreams.Kafka/QuixStreams.Kafka.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<DocumentationFile>bin\$(OutputDir)\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>
<TargetFrameworks>net7.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks>
<LangVersion>8.0</LangVersion>
</PropertyGroup>

Expand All @@ -23,13 +23,23 @@

<ItemGroup>
<PackageReference Include="Confluent.Kafka" Version="2.3.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
</ItemGroup>

</Project>
77 changes: 44 additions & 33 deletions src/QuixStreams.State/QuixStreams.State.csproj
Original file line number Diff line number Diff line change
@@ -1,37 +1,48 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<DocumentationFile>bin\$(OutputDir)\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>
<TargetFrameworks>net7.0;netstandard2.0</TargetFrameworks>
<LangVersion>9.0</LangVersion>
</PropertyGroup>

<PropertyGroup>
<PackageId>QuixStreams.State</PackageId>
<Version>0.7.0.0</Version>
<AssemblyVersion>0.7.0.0</AssemblyVersion>
<FileVersion>0.7.0.0</FileVersion>
<InformationalVersion>0.7.0.0</InformationalVersion>
<Company>Quix Analytics Ltd</Company>
<Authors>[email protected]</Authors>
<Product>QuixStreams.State</Product>
<Description>State abstraction and implementation for Quix Streams</Description>
<Copyright>Copyright © Quix Analytics Ltd 2020</Copyright>
</PropertyGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>DynamicProxyGenAssembly2</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Collections.Immutable" Version="7.0.0" />
<PackageReference Include="RocksDB" Version="8.3.2.39829" />
</ItemGroup>
<PropertyGroup>
<DocumentationFile>bin\$(OutputDir)\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks>
<LangVersion>9.0</LangVersion>
</PropertyGroup>

<PropertyGroup>
<PackageId>QuixStreams.State</PackageId>
<Version>0.7.0.0</Version>
<AssemblyVersion>0.7.0.0</AssemblyVersion>
<FileVersion>0.7.0.0</FileVersion>
<InformationalVersion>0.7.0.0</InformationalVersion>
<Company>Quix Analytics Ltd</Company>
<Authors>[email protected]</Authors>
<Product>QuixStreams.State</Product>
<Description>State abstraction and implementation for Quix Streams</Description>
<Copyright>Copyright © Quix Analytics Ltd 2020</Copyright>
</PropertyGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>DynamicProxyGenAssembly2</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Collections.Immutable" Version="7.0.0" />
<PackageReference Include="RocksDB" Version="8.3.2.39829" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
</ItemGroup>

</Project>
3 changes: 1 addition & 2 deletions src/QuixStreams.Streaming/QuixStreams.Streaming.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>
<LangVersion>8.0</LangVersion>

<TargetFrameworks>net7.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/QuixStreams.Telemetry/QuixStreams.Telemetry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
<DocumentationFile>bin\$(OutputDir)\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>

<TargetFrameworks>net7.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit 1e318a6

Please sign in to comment.