Thursday, September 24, 2015

Could not add Fakes assembly–Fakes assembly already referenced

While debugging the issue with the Microsoft Fakes framework I had yesterday, one thing I tried was to regenerate the Fakes assemblies.

First thing I did was remove all generated fake assemblies from the references:

image

Afterwards I right clicked on the original assembly and choose ‘Add Fakes Assembly’:

image

But this failed with the following error message:

FakesAssemblyAlreadyReferenced

What I forgot to do was to remove the generated Fakes folder as well. After doing that I was able to regenerate the Fakes assemblies.

No comments: