Udostępnij za pośrednictwem


Debugging and diagnosing MS Fakes

Once in a while the automatic Fakes generation might fail. Below is a few hint on how to start debugging.

Make sure that build action of the .Fakes file is set to Fakes:

This kicks off the actual generation of the fakes assemblies when you build the project.

To get detailed debugging information you can set Diagnostic="true" Verbosity="Verbose" in the .fakes file:

To actually se the output when building also make sure to set the MSBuild output verbosity to Diagnostics in Options -> Proejcts and Solutions -> Build and Run:

This will output a lot of details:

E.g. this show that the Fakes framework is actually creating a f.csproj to build the fake assembly:

 As a next step you can go to disk and open this project just like any other project.