TFS unit tests passing on developer machine but failing on build machine TFS unit tests passing on developer machine but failing on build machine asp.net asp.net

TFS unit tests passing on developer machine but failing on build machine


Is there any way to debug and step through the code on why its only failing on build machine?

Yes you can attach to the process on the build machine... But you would have to be logged into the Build machine and have an instance of VS running on the server and have Admin rights to attach to the thread...

You could also do it if the admins were willing to open up the server to remote debugging. But since that opens up more of a security risk than just giving you access to the server it is unlikely that this option is viable either.

So for you no. You will need to look at what the failures are and figure out what would cause that to happen. Then you can try to fix that.


Try using a batch file to run msbuild, then you can view the progress of the whole process in the console. Here is some starter code for ya:

ECHO Starting Build :: Change to MSBuild DirectoryCD C:\Windows\Microsoft.NET\Framework\v4.0.30319PAUSE:: READY TO RUN?ECHO READY TO RUN...MSBuild.exe "C:\Users\PATH TO YOUR PROJECT HERE\.csproj" /t:MsDeployPublish /p:MsDeployServiceUrl=https://DOMAINHERE.com:8172/msdeploy.axd;DeployIisAppPath="IIS SITE NAME HERE";username=USERNAME;password=PASSWORD;AllowUntrustedCertificate=True;Configuration=Release:: Outputs tons of network information into the command promptECHO All done.PAUSE 

Wherever I have caps replace with your settings.... The save the .bat file, double click and you can trace everything in the console.