Question

I have a unit test project in a solution that uses Microsoft fakes, and when I build it get the error below. The DLL that it is complaining about being not able to load is on the disk. I've built with Fusion logging turned on and that indicates that the binding was successful, so now am stuck. Any one else had problems with Fakes?

could not load assembly Logging at C:\src\Application\Development\Main Development Branch\Source\Common Library\Logging\bin\Debug\Logging.dll
Was it helpful?

Solution

I also have the same problem with one of my assemblies. According to Microsoft Connect this seems to be a bug which will be "included in next Visual Studio release".

As Gleno correctly added, there is a description for a workaround on the Microsoft Connect website now. Removing the .messages from the FakeAssemblies folder also worked for me, so this should be working for others as well. You may have to click the Show All Files button in your Solution Explorer to be able to see the folder.

Please use your account to upvote the bug in Microsoft Connect if you are interested in a fix earlier than the "next Visual Studio release".

OTHER TIPS

Apparently there is a bug in visual studio. What you need to do is to manually remove .messages file in FakeAssemblies folder, which should be inside your project directory. If this persists a workaround could be to add deletion to pre-build events.

Open the project folder in explorer. Go to FakesAssemblies folder. Remove 'messages' file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top