1

I have visual studio 2015 installed on the Build server with Xamarin installed. I followed the tutorial on the Xamarin web site here

I also logged into my xamarin account on the build server. I followed the xamarin creating a build definition on the web site here

But i keep getting the following exception when i kick off the build.

I'm not sure if its something wrong with the build defintion, the build machine, the android sdk, it all looks ok.

I did look into this stackoverflow answer but i've no idea where to start looking.

error message on build server

This is the build definition, it follows the Xamarin tutorial on the website, link above

Build Definition

Community
  • 1
  • 1
InitLipton
  • 2,395
  • 5
  • 30
  • 47
  • That appears to be an older version of TFS. Does it attempt to run MSBuild out of the Visual Studio 2015 or an earlier version (one that doesn't know anything about Xamarin?). Try building it from the VS2015 Developer Command prompt locally using MSBuild directly and see if you get the same results. Try using command line switches such as /flp:verbosity=diagnostic to deduce where the problem might be coming from. > msbuild path/to/mobile.sln "/p:Platform=Mixed Platforms" /p:Configuration=Release /flp:logfile=mylog.log;verbosity=diagnostic /nologo /m should do the trick. – d3r3kk Nov 28 '16 at 13:03
  • Hey thanks for your quick response @d3r3kk. The build server just has V2015 installed on it. There are other projects. Not xamarin related that run just fine. I was able to build the solution just fine locally using the dev cmd prompt. – InitLipton Nov 28 '16 at 14:06
  • Are you able to build from the command line from your build agent? (Again, double and triple check the logs coming from the build agent to ensure it is indeed running the appropriate version of MSBuild). – d3r3kk Nov 29 '16 at 03:48

1 Answers1

1

If your local build is successful and just the TFS build is failing then it is usually due to dll reference path issue. Make sure that the Dll is referenced as a relative path in the project file (.csproj). Detail steps please refer this link Namespace could not be found - building using TFS

Also be sure that all referenced assemblies in the project can be found on the TFS build server. And double check the MSbuild version like comment suggested. You could try to add the /p:VisualStudioVersion=14.0 MSBuild argument in the build definition.

Community
  • 1
  • 1
PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • 1
    Hi thanks for your Response, it led me to find the solution. It couldn't find the correct namespaces. If anyone else comes across this, you have to download the xamarin-component .exe to be able to restore the .dlls that you need on your build server. – InitLipton Dec 01 '16 at 16:05
  • Thanks for the kindly sharing. – PatrickLu-MSFT Dec 02 '16 at 01:34