-
Notifications
You must be signed in to change notification settings - Fork 77
Closed
Description
Description
Hi, I'm currently working with FsUnit.xUnit 7.0.0.
But I've encountered a problem when running dotnet test.
The issue seems to be related to a conflict between FsUnit.Xunit.exe and FsUnit.Xunit.dll that is included in the 7.0.0 nupkg.
7.0.0 seems to include FsUnit.Xunit.exe, while 6.0.1 does not include it.
Repro steps
dotnet new xunit3 --language 'F#'dotnet test --verbosity diagnosticfinished successfully.dotnet add package FsUnit.xUnit --version 7.0.0dotnet test --verbosity diagnosticfinished in failure.
I tested this in my repo.
https://github.com/krymtkts/fsunit7
Expected behavior
dotnet test should finish successfully without any assembly resolution conflicts.
Actual behavior
dotnet test fails with the following error:
> dotnet test --verbosity diagnostic
C:\Program Files\dotnet\sdk\9.0.101\MSBuild.dll -nologo --property:VsTestUseMSBuildOutput=true -property:VSTestVerbosity=diagnostic -property:VSTestArtifactsProcessingMode=collect -property:VSTestSessionCorrelationId=18744_eacad426-d2f7-4b10-8fff-fd0d4dd7f7cf -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,C:\Program Files\dotnet\sdk\9.0.101\dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,C:\Program Files\dotnet\sdk\9.0.101\dotnet.dll -maxcpucount -restore -target:VSTest -tlp:default=auto -verbosity:m -verbosity:diagnostic .\fsunit7.fsproj
Restore complete (0.7s)
Determining projects to restore...
Restored C:\fsunit7\fsunit7.fsproj (in 379 ms).
fsunit7 succeeded with 2 warning(s) (2.5s) → bin\Debug\net9.0\fsunit7.dll
C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2413,5): warning MSB3246: Resolved file has a bad image, no metadata, or is otherwise inaccessible. PE image does not have metadata. PE image does not have metadata.
C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2413,5): warning MSB3243: No way to resolve conflict between "FsUnit.Xunit, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" and "FsUnit.Xunit". Choosing "FsUnit.Xunit, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" arbitrarily.
Error:
An assembly specified in the application dependencies manifest (fsunit7.deps.json) has already been found but with a different file extension:
package: 'FsUnit.xUnit', version: '7.0.0'
path: 'lib/net6.0/FsUnit.Xunit.exe'
previously found assembly: 'C:\fsunit7\bin\Debug\net9.0\FsUnit.Xunit.dll'
Testhost process for source(s) 'C:\fsunit7\bin\Debug\net9.0\fsunit7.dll' exited with error: Error:
An assembly specified in the application dependencies manifest (fsunit7.deps.json) has already been found but with a different file extension:
package: 'FsUnit.xUnit', version: '7.0.0'
path: 'lib/net6.0/FsUnit.Xunit.exe'
previously found assembly: 'C:\fsunit7\bin\Debug\net9.0\FsUnit.Xunit.dll'
. Please check the diagnostic logs for more information.
fsunit7 test failed with 1 error(s) (0.5s)
C:\fsunit7\bin\Debug\net9.0\fsunit7.dll : error TESTRUNABORT: Test Run Aborted.
Build failed with 1 error(s) and 2 warning(s) in 4.3s
Known workarounds
Currently, I'm not shure how to resolve this.
If I could configure .fsproj to remove FsUnit.Xunit.exe section from bin/*/*/*.deps.json before dotnet test, that would be a workaround.
Related information
dotnet --version9.0.101- TargetFramework: .NET 6 ~ .NET 9.0.101
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels