-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
TypeLoadException when using WithHeader method. #928
Comments
Can you please provide the full project ? |
@eshref |
Hi, @StefH. Sorry for late response. Here is my csproj:
And this is test class:
|
Using your slightly modified csproj and the same test file it works fine in VS2022. <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<NoWarn>0067</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="WireMock.Net" Version="1.5.13" />
<PackageReference Include="WireMock.Net.FluentAssertions" Version="1.5.13" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project> |
Why you removed FluentAssertions 6.6.0? We use this version of FA package. |
Ah I see. That causes probably the issue. Version 5 and 6 from FluentAssertions are not compatible. The only thing what can be done is that I create 2 packages for WireMock.Net.FluentAssertions, one with 5 and one with 6. |
Wouldn't it be better to to upgrade FA dependency and release new breaking change instead of supporting two packages? |
The issue is that version 6 is not supported by lower frameworks. But I can make a workaround for that I think. |
Can you try preview version 1.5.26-ci-17452 ? |
Did you push this version to nuget? I am getting below warnings after manually updating versions:
|
Added this package and run test, same problem occured. |
Can you try |
This one worked, thanks. 🙏🏼 |
I would be glad, if you share solution :) |
You mean a new official NuGet ? |
Yes, but also I meant what changes did you do in this myget package? Only above changes (#949) |
That commit was actually not correct. I did a commit op master which solved it. |
Thanks for your quick help. |
Hi, friends.
I am getting
error when I use below assertion code in my test which is net472 project.
I am using below versions of packages in test project.
Any help is appreciated.
The text was updated successfully, but these errors were encountered: