Closed bfmsoft closed 4 years ago
@bfmsoft I just created a quick sample project locally and cannot seem to reproduce. It is attached here, please download it see if you can get it to fail on your machine.
@egil ok that works. So looked and I had bunit package. I uninstalled and installed. bunit.web and bunit.xunit and it works.
So the issue was I was using bunit package.
hmm that should not be an issue. let me investigate a bit.
Plus I am still having the issue that Visual Studio thinks this new version is newer because it does text sorting: v1.0.0-beta-9 SORTS AFTER v1.0.0-beta-10 because of the 1
So If I don't pay attention it will install the old package
Hmm nop, still works fine on my machine.
If I change the csproj to this, it still builds and runs fine:
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="bunit" Version="1.0.0-beta-10" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="5.0.0-rc.1.20451.17" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>
bunit is only beta9 on my version. That is the problem. The other ones have beta10. With the previous sorting issue.
Perhaps this is messing something up for you: https://twitter.com/egilhansen/status/1305992010508185606
Ah Azure Devops is causing it. Because of the sorting issue won't update the in its version. Keeps beta9 because it thinks it is newer. That is my issue.
I have to point directly to nuget.org and not the Devops server to update this package.
ok, yeah, sorry about the messed up version numbers. Ill close the issue then.
Just try to run tests and get "File not found". This is testing my component that basically processing enums to strings. This worked up till RC1 and beta 10. Did I do something wrong? I saw a note in RC1 that talks here that talks about binary issues but not source. Does this have something to do with it?
**Full error: Test Name: BfmSoft.Web.BlazorUtil.Tests.RazorTestComponents.BfmEnumInputSelectTest.RazorTests Test FullName: BfmSoft.Web.BlazorUtil.Tests.BfmSoft.Web.BlazorUtil.Tests.RazorTestComponents.BfmEnumInputSelectTest.BfmSoft.Web.BlazorUtil.Tests.RazorTestComponents.BfmEnumInputSelectTest.RazorTests Test Source: : line -1 Test Outcome: Failed Test Duration: 0:00:00
Test Name: BfmSoft.Web.BlazorUtil.Tests.RazorTestComponents.BfmEnumInputSelectTest.RazorTests Test Outcome: Failed Result Message: System.InvalidOperationException : Exception thrown during razor test discovery on 'BfmSoft.Web.BlazorUtil.Tests.RazorTestComponents.BfmEnumInputSelectTest'. Field not found: 'Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame.FrameType'.
Example:
With this test:
Results in this output:
Expected behavior: Test should pass (it did before RC1 and beta 10)
Version info: