Visual Studio 2010 RC + ReSharper 5.0 + Xunitcontrib all in harmony….finally.
Working on the bleeding edge is painful. Very painful at times. Throwing away our Team City builds because TFS 2010 didn’t support it really hurt. It was a big woops that I regret.
Moving to Visual Studio 2010 Beta was painful too. Visual Studio worked fine, but no ReSharper made it painful. Even in the early days, ReSharper was not stable in 2010, but after a few months, things look good now. ReSharper and VS 2010 are playing nice together.
There is one last pain point. No Xunit.net test runner. Xunitcontrib provides a ReSharper 5.0 build, but I was never able to get it to work…until now. Previously I was getting the same problem seen by others.
The plugin xunit could not be loaded from "C:\program files(x86)\jetBrains\resharper\v5.0\bin\plugins\xunit.dll" or one of its dependencies. Operation is not supported. (Exception from HRRESULT: 0×801311515)
I tried the best I could to right-click | Properties | Unblock all the files in the plug-in, but the “Unblock” never worked. I would get the same error. Going back into the properties dialog, the unblock would appear again. It looked like the unblock wasn’t sticking.
After a quick Google search, I found an alternative way to unblock files. Copy the files to a FAT 32 and back. The block is stripped. Sweet! My USB key is FAT 32, and after a quick copy and back. No more errors! ReSharper sees and runs my Xunit.net tests.
Just a quick overview of how I installed the plug-in:
- Close Visual Studio.
- Copy the contents of the ExternalAnnotations to:
C:\Program Files (x86)\JetBrains\ReSharper\v5.0\Bin\ExternalAnnotations - Create a folder:
C:\Program Files (x86)\JetBrains\ReSharper\v5.0\Bin\plugins\xunitcontrib.runner.resharper.5.0 - Copy everything else to the USB key.
- Copy it to the folder I just created in step #3.
- Open Visual Studio and run all my tests.
Comments(3)
Nice tip. I’ll add it to the download page. Thanks!
@Matt It is a bit of an odd fix, but it works.
(sorry for responding so late, just ran across this post while looking around to see if ReSharper 5.0 can flag IDisposable local vars that aren’t disposed)
FWIW, if you have archives (zip, rar, etc) that you download, by far the easiest thing is to unblock the archive before extracting. If I forget to do this, I typically just delete all the extracted files, unblock, and re-extract
However, there’s actually an even nicer, simpler utility to mass-unblock files (for the case where you have lots of files to unblock and re-extracting is either not an option or something you’d rather avoid) – the streams.exe utility from sysinternals, using -d (delete streams) and -s (recurse).
http://technet.microsoft.com/en-us/sysinternals/bb897440.aspx
http://www.vistax64.com/powershell/120509-bulk-unblock-files.html
You don’t even have to download it if you don’t want to – you can run it directly off of live.sysinternals.com (like all the sysinternals tools). Here’s what I run to unblock everything in my dev directory, for instance:
[18] C:\dev » \\live.sysinternals.com\tools\streams.exe -d -s *
Streams v1.56 – Enumerate alternate NTFS data streams
Copyright (C) 1999-2007 Mark Russinovich
Sysinternals – http://www.sysinternals.com
[...rest of the output snipped...]