If you are using VS 2015 with C# 6 syntax and try to build it with, TFS 2013.4 (build agent installed with VS 2015 Update1 enterprise) you might run into issues like shown below.
The name 'nameof' does not exist in the current context
This error occurs, since TFS 2013.4 build template is using, msbuild 12.0. To let the TFS build to use msbuild 14.0, you can provide msbuild argument /ToolsVersion switch (or /tv, for short), in TfvcTemplate.12.xaml build process template.
/tv:14.0
With this the previous error solved but now it runs into below issue.
TF900547: The directory containing the assemblies for the Visual Studio Test Runner is not valid ''
To solve this install VS 2013 in build agent. It solves the problem.
Tests in here fail, but that is nothing to do with build. Tests are not properly written.
You might run into below issue as well.
Unhandled Exception: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
at LibGit2Sharp.Core.NativeMethods.LibraryLifetimeObject..ctor()
at LibGit2Sharp.Core.NativeMethods..cctor()
--- End of inner exception stack trace ---
at LibGit2Sharp.Core.NativeMethods.RemoveHandle()
at LibGit2Sharp.Core.NativeMethods.LibraryLifetimeObject.Finalize()
This is discussed in below links and you can solve using different techniques described in them.
https://social.msdn.microsoft.com/Forums/en-US/5a0d1950-1367-41a6-9171-676a0d0e93c1/tfs-online-getted-checkin-build-failures-vs-online-tfs-online-team-need-to-look-into-it?forum=TFService
http://stackoverflow.com/questions/29286052/tfs-2013-throws-lib2gitsharp-error-during-build-deploy-intermittent
Friday, 25 March 2016
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Dynamic block allows to create nested multi level block structures in terraform code. Conditional usage of such blocks are really useful in...
-
In Azure DevOps YAML pipelines there are several functions available for you to use. replace is such a useful function, which you can use t...
-
We have discueed, that we have to use an environment variable to handle input parameter default values, if we are using trigger for workflo...
-
Adding Azure Container Registry (ACR) service connection to Azure DevOps is really simple as described in " Create Service Connection ...
-
Some times a silly mistake can waste lot of time of a developer. The exception “System.IO.IOException: The response ended prematurely.” whil...
No comments:
Post a Comment