Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve target frameworks and their package references: #514

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
9 changes: 4 additions & 5 deletions src/PactNet.Abstractions/PactNet.Abstractions.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>CS1591;NU5105</NoWarn>
Expand All @@ -9,10 +9,9 @@
</PropertyGroup>

<Import Project="../NuGet.targets" />

<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.Json" Version="8.0.2" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/PactNet.Output.Xunit/PactNet.Output.Xunit.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>CS1591;NU5105</NoWarn>
Expand Down
14 changes: 1 addition & 13 deletions src/PactNet/PactNet.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>NU5105</NoWarn>
Expand Down Expand Up @@ -59,18 +59,6 @@
</Content>
</ItemGroup>

<ItemGroup>
<Content Include="$(MSBuildProjectDirectory)\..\..\build\PactNet.targets">
<PackagePath>build/net462/</PackagePath>
<Pack>true</Pack>
<Visible>false</Visible>
</Content>
<Content Include="$(MSBuildProjectDirectory)\..\..\build\PactNet.targets">
<PackagePath>buildTransitive/net462/</PackagePath>
<Pack>true</Pack>
<Visible>false</Visible>
</Content>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\PactNet.Abstractions\PactNet.Abstractions.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">
net8.0
</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">
net8.0;net462
</TargetFrameworks>
<TargetFrameworks>net8.0;net462</TargetFrameworks>
</PropertyGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
Expand Down
14 changes: 2 additions & 12 deletions tests/PactNet.Tests/PactNet.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">
net8.0
</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">
<TargetFrameworks>
net8.0;net462
</TargetFrameworks>
<IsPackable>false</IsPackable>
Expand All @@ -16,12 +13,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Net.Http" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.18.1" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
Expand All @@ -42,5 +33,4 @@
<ProjectReference Include="..\..\src\PactNet.Output.Xunit\PactNet.Output.Xunit.csproj" />
<ProjectReference Include="..\..\src\PactNet\PactNet.csproj" />
</ItemGroup>

</Project>
</Project>