Build/Test Issues

Can't run tests with VS 2017 / XBehave 2.2.0-beta0003-build685 / XUnit 2.2

Started by brightoniant on 6,598 views

Hi

As a follow on from our chat on Twitter, I'm unable to get NCrunch working with the aforementioned setup.

I read on a separate post to try replacing the XUnit dlls in the extension directory with the 2.2 ones, however I have gone from error relating MarshallByRefObject (or whatever it was) to no tests being discovered at all. I remember previous versions of NCrunch required a solitary [Fact] attribute within an assembly containing XBehave tests in order to work, however this didn't make a difference.

Any ideas?
Hi, thanks for getting back to me on the forum.

My hope is that this isn't a version specific integration issue. Would you be able to submit a bug report after you've had the test discovery fail? There may be something in the report that can help inform us.
Hiya

I've just submitted the bug report. Hopefully you'll receive it soon.

Cheers
Ant
Thanks Ant. Here are the errors from the report:

An exception thrown while processing the module 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2017\Modules\XUnit2\nCrunch.Module.XUnit2.crunchmodule': System.IO.FileNotFoundException: Could not load file or assembly 'xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c' or one of its dependencies. The system cannot find the file specified.
File name: 'xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c'

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

An exception thrown while processing the module 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2017\OldXUnit2\nCrunch.Module.XUnit2.crunchmodule': System.IO.FileNotFoundException: Could not load file or assembly 'xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c' or one of its dependencies. The system cannot find the file specified.
File name: 'xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c'

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].




A couple of things to check:

- Make sure you remove the OldXUnit2 subdir in your NCrunch installation directory. NCrunch searches and loads modules dynamically, so with this directory being there, NCrunch will still try to load it.
- Check that you've replaced all 3 of the packaged xunit binaries under Modules\XUnit2
Hi Remco

I have just submitted another report after ensuring the two steps above have been done, namely I have verified the dll versions and removed the OldXunit2 folder.

Still no joy, however.

Thanks
Ant
Thanks Ant. I think it's best I just solve this problem properly by introducing proper support for xunit v2.2.

This task has been pushed out a bit because it's quite complex. The original xunit integration wasn't designed properly and needs to change to work simultaneously with different versions of xunit. I'll let you know as soon as I have something available, hopefully later this week.
I'm wondering if you may be interested in giving the build below a spin. This build includes significant changes to Xunit integration, and should work correctly with v2.2. Assuming it doesn't explode on you, I'll probably release it tomorrow.

http://downloads.ncrunch.net/NCrunch_Console_3.9.0.1.msi
http://downloads.ncrunch.net/NCrunch_Console_3.9.0.1.zip
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.9.0.1.msi
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.9.0.1.zip
http://downloads.ncrunch.net/NCrunch_LicenseServer_3.9.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2008_3.9.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.9.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.9.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2012_3.9.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2012_3.9.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2013_3.9.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2013_3.9.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2015_3.9.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2015_3.9.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2017_3.9.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2017_3.9.0.1.zip
Hey Remco

I thought I had replied to this, but I hadn't! Sorry. That build worked great for me - thanks

Cheers
Ant

Post a reply

Log in to reply.