This problem was discovered after installing .NET 8.0 preview 1. The code in TestAssemblyResolver.cs contains two particular issues:
The directory returned by FindBestVersionDirectory assumes that the directory name is something like 8.0.0 when in fact it may contain a preview label like 8.0.0-preview.xxxx.
The code compares two version numbers for equality without allowing for differences in the number of components. This causes an error because new Version("8.0.0.0") compares as less than new Version("8.0.0").
This problem was discovered after installing .NET 8.0 preview 1. The code in
TestAssemblyResolver.cs
contains two particular issues:The directory returned by
FindBestVersionDirectory
assumes that the directory name is something like8.0.0
when in fact it may contain a preview label like8.0.0-preview.xxxx
.The code compares two version numbers for equality without allowing for differences in the number of components. This causes an error because
new Version("8.0.0.0")
compares as less thannew Version("8.0.0")
.