This project has moved and is read-only. For the latest updates, please go here.

TFS2013 and Microsoft Fakes

Jan 5, 2014 at 3: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 10: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?

Mike
Jan 8, 2014 at 4: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)
http://sdrv.ms/K42adB

This one is the on premises and it fails because of the fake assembly not being build
http://sdrv.ms/K423yV

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

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 3:25 PM
richjrader

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 http://go.microsoft.com/fwlink/?LinkID=241478.

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

http://msdn.microsoft.com/en-us/library/ms788967(v=vs.110).aspx

Your config file may have something like this:
<behavior name="serviceCredentialBehavior">
  <serviceCredentials>
    <serviceCertificate findValue="Contoso.com"
                        storeLocation="LocalMachine"
                        storeName="My"
                        x509FindType="FindBySubjectName" />
  </serviceCredentials>
</behavior>
(Borrowed from http://www.codeproject.com/Articles/18601/An-easy-way-to-use-certificates-for-WCF-security)
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 6:56 PM
richjrader

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 7: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 visualstudio.com (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?