TFS2013 and Microsoft Fakes

Jan 5, 2014 at 2:50 PM
I'm trying to run test projects with Fakes, but I am getting an error on build on TFS 20123
Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException)
Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context)

I Looked at the Build log and the problem seem to be that it Cannot find the Fake assembly, and there is no where in the log where it build them...

I compared the log with a Build done in Visual Studio Online and in there it does Build the Fake assembly properly (Section BuildFakesAssemblies) in the On Premises version of TFS 2013 I can't make it build the fake assemblies.

Any Thoughts?
Jan 7, 2014 at 9:08 AM
Do you you have VS 2013 Premium or Ultimate installed on your on-premises build server?

Could you provide a link to the full build log?

Jan 8, 2014 at 3:21 AM
Yes VS 2013 Ultimate is installed on the on-Premises server...

This link points to the one that generates the fakes assembly (visual studio on-line)

This one is the on premises and it fails because of the fake assembly not being build

Let me know if you can get the files
Jan 16, 2014 at 2:11 PM
any luck Mike?
Mar 10, 2014 at 6:17 PM

I ran into the same error and it was resolved by downloading VS 2012 Premium and installing it on the build server along side VS2013 Premium. I don't know why this fixed the error, but it did.
Mar 14, 2014 at 2:25 PM

YEAH that worked... but it created another problem with my Windows Store App Build. it use to compile but now I get 2 errors

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\AppxPackage\Microsoft.AppXPackage.Targets (1538): A certificate with thumbprint 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' that is specified in the project cannot be found in the certificate store. Please specify a valid thumbprint in the project file.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\AppxPackage\Microsoft.AppXPackage.Targets (1538): The certificate specified is not valid for signing. For more information about valid certificates, see

any ideas about that one? I looked around and I can't find any good information about these
Mar 14, 2014 at 2:56 PM
Edited Mar 14, 2014 at 2:57 PM
From my experience if you have a certificate installed via the certificate store you can view it with the guide found here:

Your config file may have something like this:
<behavior name="serviceCredentialBehavior">
    <serviceCertificate findValue=""
                        x509FindType="FindBySubjectName" />
(Borrowed from
Which indicates to search the 'LocalMachine' certificate local for a specific subject name.

Long story short, a certificate needs to be installed on the build machine in a specific place in the certificate store. You can view/retrieve/install them via the MMC tool certificate snap in.
Mar 14, 2014 at 5:56 PM

I cannot find that config file you mention here, and I did install the certificate used in the application on the build machine, but no dice... same message you said it needs to be in a specific place in the certificate store... do you know where it should be?
Mar 14, 2014 at 6:46 PM
Ok I fixed the previous problem... it now compiles but I have unit test that needs to run interactively but since i'm running my own Build server that is linked to (TFS Online) it seems that I cannot check the Run the Service interactively it, when I do and I click start it pops a window asking me to enter a password for user NT AUTHORITY\System which I don't have...

anyone got that problem before?