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

Update Nugets #2240

Merged
merged 9 commits into from Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Build/_build.csproj
Expand Up @@ -19,8 +19,8 @@
<ItemGroup>
<PackageDownload Include="GitVersion.Tool" Version="[5.12.0]" />
<PackageDownload Include="NSpec" Version="[3.1.0]" />
<PackageDownload Include="ReportGenerator" Version="[5.1.20]" />
<PackageDownload Include="xunit.runner.console" Version="[2.4.2]" />
<PackageDownload Include="ReportGenerator" Version="[5.1.23]" />
<PackageDownload Include="xunit.runner.console" Version="[2.5.0]" />
<PackageDownload Include="Node.js.redist" Version="[16.17.1]" />
<PackageReference Include="LibGit2Sharp" Version="0.27.2" />
<PackageReference Include="Nuke.Common" Version="7.0.2" />
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Expand Up @@ -34,7 +34,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Meziantou.Analyzer" Version="2.0.61">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.70">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion Src/FluentAssertions/Common/MemberPath.cs
Expand Up @@ -129,7 +129,7 @@ public MemberPath WithCollectionAsRoot()
/// <summary>
/// Returns the name of the member the current path points to without its parent path.
/// </summary>
public string MemberName => Segments.Last();
public string MemberName => Segments[^1];

public override string ToString()
{
Expand Down
2 changes: 1 addition & 1 deletion Src/FluentAssertions/Common/TypeExtensions.cs
Expand Up @@ -530,7 +530,7 @@ public static Type NullableOrActualType(this Type type)
{
if (type.IsConstructedGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
{
type = type.GetGenericArguments().First();
type = type.GetGenericArguments()[0];
}

return type;
Expand Down
Expand Up @@ -122,7 +122,7 @@ public object ConvertFrom(object convertable)

if (suitableKeyValuePairCollection != null)
{
Type pairValueType = suitableKeyValuePairCollection.GenericTypeArguments.Last();
Type pairValueType = suitableKeyValuePairCollection.GenericTypeArguments[^1];

var methodInfo = ConvertToDictionaryMethod.MakeGenericMethod(Key, pairValueType);
return methodInfo.Invoke(null, new[] { convertable });
Expand Down
2 changes: 1 addition & 1 deletion Src/FluentAssertions/FluentAssertions.csproj
Expand Up @@ -47,7 +47,7 @@
<AdditionalFiles Include="BannedSymbols.txt" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" PrivateAssets="all" />
<PackageReference Include="JetBrains.Annotations" Version="2023.2.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="PolySharp" Version="1.13.2" PrivateAssets="all" />
<None Include="..\FluentAssertions.png" Pack="true" Visible="false" PackagePath="" />
Expand Down
3 changes: 1 addition & 2 deletions Src/FluentAssertions/Formatting/XElementValueFormatter.cs
@@ -1,5 +1,4 @@
using System;
using System.Linq;
using System.Xml.Linq;
using FluentAssertions.Common;

Expand Down Expand Up @@ -40,7 +39,7 @@ private static string FormatElementWithChildren(XElement element)
// Can't use env.newline because the input doc may have unix or windows style
// line-breaks
string firstLine = lines[0].RemoveNewLines();
string lastLine = lines.Last().RemoveNewLines();
string lastLine = lines[^1].RemoveNewLines();

string formattedElement = firstLine + "…" + lastLine;
return formattedElement.EscapePlaceholders();
Expand Down
8 changes: 4 additions & 4 deletions Tests/Approval.Tests/Approval.Tests.csproj
Expand Up @@ -5,15 +5,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="PublicApiGenerator" Version="11.0.0" />
<PackageReference Include="Verify.DiffPlex" Version="2.2.1" />
<PackageReference Include="Verify.Xunit" Version="20.4.0" />
<PackageReference Include="Verify.Xunit" Version="20.6.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Tests/Benchmarks/Benchmarks.csproj
Expand Up @@ -9,7 +9,7 @@
<ProjectReference Include="..\..\Src\FluentAssertions\FluentAssertions.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.5" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.6" />
<PackageReference Include="Bogus" Version="34.0.2" />
<PackageReference Include="System.Collections" Version="4.3.0" />
</ItemGroup>
Expand Down
Expand Up @@ -18,7 +18,7 @@
Upgrading to 1.6.0 gives "Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0"
-->
<PackageReference Include="System.Collections.Immutable" Version="[1.5.0]" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand All @@ -39,9 +39,17 @@
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="[2.4.5]">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minimum TFM for 2.5.0 was raised to net6

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering exactly that, so thank you for the explanation.

<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand All @@ -50,7 +58,7 @@
<ItemGroup>
<PackageReference Include="Chill" Version="4.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="Xunit.StaFact" Version="1.1.11" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="coverlet.collector" Version="6.0.0" PrivateAssets="all">
Expand Down
18 changes: 13 additions & 5 deletions Tests/FluentAssertions.Specs/FluentAssertions.Specs.csproj
Expand Up @@ -22,7 +22,7 @@
Upgrading to 1.6.0 gives "Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0"
-->
<PackageReference Include="System.Collections.Immutable" Version="[1.5.0]" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand All @@ -43,17 +43,25 @@
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="[2.4.5]">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Chill" Version="4.1.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="Xunit.StaFact" Version="1.1.11" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="coverlet.collector" Version="6.0.0" PrivateAssets="all">
Expand Down
6 changes: 3 additions & 3 deletions Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj
Expand Up @@ -11,8 +11,8 @@
<PackageReference Include="coverlet.collector" Version="6.0.0" PrivateAssets="all">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Tests/TestFrameworks/MSpec.Specs/MSpec.Specs.csproj
Expand Up @@ -11,7 +11,7 @@
<PackageReference Include="coverlet.collector" Version="6.0.0" PrivateAssets="all">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="Machine.Specifications" Version="1.1.1" />
<PackageReference Include="Machine.Specifications.Runner.VisualStudio" Version="2.10.2" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestFrameworks/NUnit3.Specs/NUnit3.Specs.csproj
Expand Up @@ -11,7 +11,7 @@
<PackageReference Include="coverlet.collector" Version="6.0.0" PrivateAssets="all">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
6 changes: 3 additions & 3 deletions Tests/TestFrameworks/XUnit2.Specs/XUnit2.Specs.csproj
Expand Up @@ -11,9 +11,9 @@
<PackageReference Include="coverlet.collector" Version="6.0.0" PrivateAssets="all" Condition="'$(TargetFramework)' == 'net6.0'">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down