-
Notifications
You must be signed in to change notification settings - Fork 162
Description
Im using the current version3 branch and console runner net462 (not netcore).
Trying to run nunit test which references windows forms fails with :
Unable to load one or more of the requested types.
Could not load file or assembly 'System.Windows.Forms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
----> Could not load file or assembly 'System.Windows.Forms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
The reason is that TestAssemblyResolver is refusing to use "C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\10.0.0" for an assembly with version 10.0.0.0.
The function FindBestVersionDir will try to compare new System.Version("10.0.0") >= new System.Version("10.0.0.0") which returns false. Because the revision number in the 10.0.0 is not defined the version is considered lower than any version that has a revision number.