Skip to content

Commit

Permalink
task: rejigged dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dtanglr committed Mar 15, 2024
1 parent 59ae03e commit bbf8c38
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 44 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<!--
To target net5.0, the c# 10 lang version (available in net6.0) must be used to support 'record structs'.
To target netstandard2.0, the c# 10 lang version (available in net6.0) must be used to support 'record structs'.
This is not recommended for production use, but is used here to demonstrate the use of Primitively on older versions of .NET.
-->

Expand All @@ -13,9 +13,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Primitively" Version="1.4.16" PrivateAssets="All" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="Primitively" Version="1.5.0-alpha.0" PrivateAssets="All" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<ItemGroup>
<PackageReference Include="IsExternalInit" Version="1.0.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.ApiExplorer" Version="2.2.0" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' ">
Expand Down
7 changes: 3 additions & 4 deletions src/Primitively/Primitively.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IsExternalInit" Version="1.0.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" PrivateAssets="all" />
<PackageReference Include="IsExternalInit" Version="1.0.3" PrivateAssets="all" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Primitively.Abstractions\Primitively.Abstractions.csproj" />
</ItemGroup>
Expand All @@ -29,7 +28,7 @@
<Compile Remove="EmbeddedResources\**\*.cs" />
<EmbeddedResource Include="EmbeddedResources\**\*.cs" />
</ItemGroup>

<ItemGroup>
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
<None Include="$(OutputPath)\Primitively.Abstractions.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
Expand Down
25 changes: 10 additions & 15 deletions test/Acme.TestLib/Acme.TestLib.csproj
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<!--
To target netstandard2.0, netcoreapp3.1 or net5.0; the c# 10 lang version (available in net6.0) must be used to support 'record structs'.
Microsoft.Extensions.DependencyInjection.Abstractions 8.0.1 doesn't officially support netcoreapp3.1 & net5.0
therefore <SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings> has been added to suppress the warnings.
This is not recommended for production use, but is used here to demonstrate the use of Primitively on older versions of .NET.
Use net8.0 for production use. It's ace.
-->

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Primitively\Primitively.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\Primitively.Abstractions\Primitively.Abstractions.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="true" Visible="false" />
</ItemGroup>

<!--
To target netstandard2.0, netcoreapp3.1 or net5.0; the c# 10 lang version (available in net6.0) must be used to support 'record structs'.
This is not recommended for production use, but is used here to demonstrate the use of Primitively on older versions of .NET.
-->

<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0'">
<LangVersion>10.0</LangVersion>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
</ItemGroup>

</Project>
25 changes: 10 additions & 15 deletions test/Acme.TestLib2/Acme.TestLib2.csproj
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<!--
To target netstandard2.0, netcoreapp3.1 or net5.0; the c# 10 lang version (available in net6.0) must be used to support 'record structs'.
Microsoft.Extensions.DependencyInjection.Abstractions 8.0.1 doesn't officially support netcoreapp3.1 & net5.0
therefore <SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings> has been added to suppress the warnings.
This is not recommended for production use, but is used here to demonstrate the use of Primitively on older versions of .NET.
Use net8.0 for production use. It's ace.
-->

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Primitively\Primitively.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\Primitively.Abstractions\Primitively.Abstractions.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="true" Visible="false" />
</ItemGroup>

<!--
To target netstandard2.0, netcoreapp3.1 or net5.0; the c# 10 lang version (available in net6.0) must be used to support 'record structs'.
This is not recommended for production use, but is used here to demonstrate the use of Primitively on older versions of .NET.
-->

<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0'">
<LangVersion>10.0</LangVersion>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
<IsPackable>false</IsPackable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);CA1825;CS0618</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0'">
<LangVersion>10.0</LangVersion>
<LangVersion>latest</LangVersion>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IsExternalInit" Version="1.0.3" PrivateAssets="all" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MongoDB.Driver" Version="2.24.0" />
Expand All @@ -23,7 +21,6 @@
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7" PrivateAssets="all" Condition="'$(TargetFramework)' != 'netcoreapp3.1' and '$(TargetFramework)' != 'net5.0'" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" PrivateAssets="all" Condition="'$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0'" />
<PackageReference Include="coverlet.collector" Version="6.0.2" PrivateAssets="all" />
<PackageReference Include="IsExternalInit" Version="1.0.3" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit bbf8c38

Please sign in to comment.