0
votes

I'm trying to build this, https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-xamarin-android-get-started/, project with VSTS. Code is checked in, default build configuration used. But for unknown reason, it fails. It seems that all code and assemblies is downloaded:

...
2016-10-31T14:31:13.1891941Z C:\a\1\s\FirstXamarinApp\packages\SQLitePCLRaw.provider.e_sqlite3.android.1.1.0\lib\MonoAndroid:
2016-10-31T14:31:13.1891941Z Getting SQLitePCLRaw.provider.e_sqlite3.dll
2016-10-31T14:31:13.9442737Z ##[section]Finishing: Get Sources
2016-10-31T14:31:13.9462739Z ##[section]Starting: Xamarin component restore $/Mobile Playground/FirstXamarinApp
2016-10-31T14:31:13.9732734Z ==============================================================================
2016-10-31T14:31:13.9732734Z Task         : Xamarin Component Restore
2016-10-31T14:31:13.9732734Z Description  : Restores Xamarin components for the specified solution
2016-10-31T14:31:13.9732734Z Version      : 0.1.8
2016-10-31T14:31:13.9732734Z Author       : Microsoft Corporation
2016-10-31T14:31:13.9732734Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=786653)
2016-10-31T14:31:13.9732734Z ==============================================================================
2016-10-31T14:31:14.7788257Z [command]C:\a\_tasks\XamarinComponentRestore_ff50fc97-da8c-4683-b014-34c15315ee5f\0.1.8\xpkg\xamarin-component.exe restore -u [removed] -p [removed] C:/a/1/s/FirstXamarinApp
2016-10-31T14:31:15.0028479Z INFO (restore): Computed cookie jar path: C:\Users\buildguest\.xamarin-credentials
2016-10-31T14:31:16.2730908Z INFO (login): Computed cookie jar path: C:\Users\buildguest\.xamarin-credentials
2016-10-31T14:31:16.2800907Z INFO (login): Computed cookie jar path: C:\Users\buildguest\.xamarin-credentials
2016-10-31T14:31:16.2800907Z INFO (login): Credentials successfully stored.
2016-10-31T14:31:16.2830906Z ERROR (login): C:/a/1/s/FirstXamarinApp does not exist.
2016-10-31T14:31:16.2970912Z ##[error]xamarin-component.exe failed with error: C:\a\_tasks\XamarinComponentRestore_ff50fc97-da8c-4683-b014-34c15315ee5f\0.1.8\xpkg\xamarin-component.exe failed with return code: 1
2016-10-31T14:31:16.2970912Z ##[error]xamarin-component.exe failed with error: C:\a\_tasks\XamarinComponentRestore_ff50fc97-da8c-4683-b014-34c15315ee5f\0.1.8\xpkg\xamarin-component.exe failed with return code: 1
2016-10-31T14:31:16.3030909Z ##[section]Finishing: Xamarin component restore $/Mobile Playground/FirstXamarinApp
2016-10-31T14:31:16.3030909Z ##[section]Starting: Publish Artifact: drop
2016-10-31T14:31:16.3050910Z ==============================================================================
2016-10-31T14:31:16.3050910Z Task         : Publish Build Artifacts
2016-10-31T14:31:16.3050910Z Description  : Publish Build artifacts to the server or a file share
2016-10-31T14:31:16.3050910Z Version      : 1.0.38
2016-10-31T14:31:16.3050910Z Author       : Microsoft Corporation
2016-10-31T14:31:16.3050910Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=708390)
2016-10-31T14:31:16.3050910Z ==============================================================================
2016-10-31T14:31:16.4940955Z ##[error]Publish build artifacts failed with error: Not found PathtoPublish: C:\a\1\b\Release
2016-10-31T14:31:16.4980941Z ##[section]Finishing: Publish Artifact: drop
2016-10-31T14:31:16.4990982Z ##[section]Starting: Post Job Cleanup
2016-10-31T14:31:16.5110937Z ##[section]Finishing: Post Job Cleanup
2016-10-31T14:31:16.5110937Z ##[section]Finishing: Build

To me it seems that the everything is downloaded to c:\a\1\s. But later, the error is thrown on

ERROR (login): C:/a/1/s/FirstXamarinApp does not exist.

'\' has been replaced by '/'. Can this be the reason?

I haven't done anything special with the build steps. Just referenced the solution file, project file, added username and password for Xamarin and set Java to version 8 instead of custom.

In Visual Studio, the project builds just fine.

2
This definitely looks like a potential pathing issue. I'm curious if you remove the Xamarin Component restore step and changed those items to NuGet instead if that would resolve your issue.Jon Douglas
Did you try to manually install the xamarin components?xleon
@JonDouglas; it seems that the variable "Project" that was originally set to "$/Mobile Playground/FirstXamarinApp/playground/playground.csproj" was the reason for the problem. When changes to "**/playground.csproj", the build continued. Interestingly, I chose the path by using the "browser" function, so it's a bit weird that this didn't work.sonstabo
@xleon; how can you manually install the xamarin components on a shared build agent with VSTS?sonstabo
@sonstabo you are totally right. I misread the questionxleon

2 Answers

0
votes

According to your log, you specified a folder path $/Mobile Playground/FirstXamarinApp in Path to Solution. I could reproduce your issue if I specified a folder path like screenshot below:

enter image description here

To get rid of this issue, you need to specify the solution path like screenshot below:

enter image description here

0
votes

It seems that the variable "Project" that was originally set to "$/Mobile Playground/FirstXamarinApp/playground/playground.csproj" was the reason for the problem. When changed to "**/playground.csproj", the build continued.