Closed LarsBauer closed 2 years ago
Thanks for reporting this @LarsBauer
Yeah makes sense.
Added it for the next release
This fix made it to both 2.1.1 and 3.1.1 versions.
https://dynamicsvalue.github.io/fake-xrm-easy-docs/releases/3x/3.1.1/
https://dynamicsvalue.github.io/fake-xrm-easy-docs/releases/2x/2.1.1/
@LarsBauer can you try again ?
Thanks for the update. I think the dependency range is updated correctly according to the docs. Nevertheless I am still able to upgrade FakeItEasy to version 7.0.0 or higher without NuGet complaining. I am not sure if this is the normal behavior...
You're welcome.
Could you please post the PackageReferences you have in your .csproj, if possible?
Sure, here are my package references:
<ItemGroup>
<PackageReference Include="FakeItEasy" Version="6.2.1" />
<PackageReference Include="FakeXrmEasy.Core.v9" Version="3.1.1" />
<PackageReference Include="FakeXrmEasy.Messages.v9" Version="3.1.1" />
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<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.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Could you try removing this reference in your .csproj to see if it still allows the upgrade? (the FakeItEasy dependency will be installed via FXE anyway, so just to check....)
<PackageReference Include="FakeItEasy" Version="6.2.1" />
Doesn't make any difference. I removed the direct package reference for FakeItEasy but I was able to install it after afterwards in version 7.0.0 or higher. I tried to downgrade to version 5.0.0 but there NuGet complained. So I guess maybe there is something wrong with the upper range?
The upper range format should be fine according to the docs and nuget package ranges. I'll setup a sample repo myself and try to reproduce it.
What target framework are you using? netcoreapp3.1?
What target framework are you using? netcoreapp3.1?
net6.0
Hi @LarsBauer
I did some digging on this and dotnet restore does throw warnings and it looks like it is by design in the tooling. The easiest would be to just not include the FakeItEasy dependency explicitly in your test project and so the package ranges in FXE will be honored.
More info about NU1608 in the wiki:
https://github.com/NuGet/Home/wiki/Restore-errors-and-warnings
Here's a sample repo I setup myself if you want to reproduce it:
https://github.com/DynamicsValue/fxe-samples/tree/main/net60/issue_37/TestProject
Alright, so it seems to be by design. Thanks for investigating!
No worries, I've also updated the ToC in the docs site, you'll find more info there....
https://dynamicsvalue.github.io/fake-xrm-easy-docs/quickstart/
Hi, just wanted to make you aware that the Middleware setup fails with the following exception when using FakeItEasy 7.
In the dependencies of your package the range is listed as
FakeItEasy ≥ 6.0.0
which basically allows FakeItEasy 7. Maybe you should update this range to prevent people from having the same troubles as myself.Let me know if you need any more details. Thanks in advance!