The name 'nameof' does not exist in the current context
![01 01](https://lh3.googleusercontent.com/-5w1MD8kvCY4/VvUQ37W743I/AAAAAAAAG-M/6wzrPwOz5OQ/01_thumb%25255B2%25255D.png?imgmax=800)
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
![02 02](https://lh3.googleusercontent.com/-l-xMBm7m1iA/VvUQ51KDg0I/AAAAAAAAG-U/ZnF3u6Iq4lY/02_thumb%25255B2%25255D.png?imgmax=800)
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 ''
![image image](https://lh3.googleusercontent.com/-P2xOh5QpCv0/VvUQ77MV42I/AAAAAAAAG-c/RUuLnYMfMso/image_thumb%25255B2%25255D.png?imgmax=800)
To solve this install VS 2013 in build agent. It solves the problem.
![03 03](https://lh3.googleusercontent.com/-ipUDLuVwPKE/VvUQ-CsY7zI/AAAAAAAAG-k/FB9U4zWUdww/03_thumb%25255B2%25255D.png?imgmax=800)
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()
![x x](https://lh3.googleusercontent.com/-bSv3E33BTWY/VvURBbosWvI/AAAAAAAAG-s/5sYp71OafBs/x_thumb%25255B4%25255D.png?imgmax=800)
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
No comments:
Post a Comment