I am trying to use Team Services CI Build, but it keeps on failing with the same error:
##[error]MobileClient\LoginNavigation\CommentPage.xaml.cs(1,7): Error CS0246: The type or namespace name 'Android' could not be found (are you missing a using directive or an assembly reference?)
Which seems to be right, since in a previous step it is complaining about not finding that library:
##[warning]C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): Warning MSB3245: Could not resolve this reference. Could not locate the assembly "Mono.Android". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Also, it is logged where the build is searching it:
For SearchPath "{HintPathFromItem}".
Considered "..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0\Mono.Android.dll", but it d idn't exist.For SearchPath "{TargetFrameworkDirectory}".
For SearchPath "{TargetFrameworkDirectory}".
Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\Mono.Android.winmd", but it didn't exist.
Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\Mono.Android.dll", but it didn't exist.
Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\Mono.Android.exe", but it didn't exist.
For SearchPath "{RawFileName}".
Considered treating "Mono.Android" as a file name, but it didn't exist.
To my understanding, this file is missing in the Team Services build server, right? How could I solve this? Should it be necessary to change this directory?
One important thing is that locally, in my machine, the Visual Studio and the command line MSBuild are working correctly.
This happens during the Visual Studio Build step, which has the following configuration:
- MSBuild Configuration: MSBuild x86
- Visual Studio Version: Visual Studio 2015
- MSBuild Arguments: /p:DeployOnBuild=true /p:WebPublishMethod=Package
- /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true
- /p:PackageLocation="$(build.artifactstagingdirectory)\"
- Visual Studio Build Solution step version: 1.*
Here are the steps of the Team Services build: