Azure-pipelines-agent: Build Xamarin.Android Project fails, namespaces not found, error CS0246

Created on 12 Oct 2017  路  5Comments  路  Source: microsoft/azure-pipelines-agent

Agent version and platform

Version of your agent? vsts-agent-osx.10.11-x64-2.123.0

OS of the machine running the agent? OSX

VSTS type and version

VisualStudio.com or On-Prem TFS? VSTS

If VisualStudio.com, what is your account name? https://slbmobsrc.visualstudio.com

What's not working?

Namespaces cannot be found. Example: The type or namespace name 'HttpClient' could not be found (are you missing a using directive or an assembly reference?)

screen shot 2017-10-12 at 10 18 01 am

Agent and Worker's diag log

Logs are located at the _diag under agent root folder, agent log prefix with Agent_, worker log prefix with Worker_. all sensitive information should already be masked out, please double check before paste here.

Agent_20171011-211923-utc.log
Worker_20171012-151507-utc.log

Most helpful comment

You were right, I just changed the Path to solution, packages.config, or project.json to the project.sln and it started to work. Thanks.

Can You explain the steps you have taken ??

All 5 comments

@alexrainman has this build definition ever work before? doesn't seems like an agent problem to me.
Do you missing nuget restore step?

The build never worked. Nuget restore is there. I think there's a problem with Mono.

Take a look at this:

2017-10-12T19:26:30.5059320Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Net.Http". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5083510Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Net.Http.Primitives". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5105310Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Net.Http.Extensions". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5124650Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "ModernHttpClient". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5144110Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Practices.ServiceLocation". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5163450Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "PCLStorage". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5181200Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "PCLStorage.Abstractions". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5198980Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Splat". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5216390Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "GalaSoft.MvvmLight". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5234060Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "GalaSoft.MvvmLight.Extras". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5251590Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Plugin.Connectivity.Abstractions". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5269090Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Plugin.Connectivity". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5286570Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Plugin.Settings.Abstractions". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5304050Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Plugin.Settings". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5321470Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Xamarin.Insights". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5338900Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Newtonsoft.Json". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5356510Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Acr.UserDialogs". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5373960Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Acr.UserDialogs.Interface". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5391950Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Toasts.Forms.Plugin.Abstractions". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5409510Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Plugin.Badge.Abstractions". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]
2017-10-12T19:26:30.5426970Z   /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Plugin.Badge". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vso113482/vsts-agent/_work/1/s/Approver/Approver.csproj]

Why is looking for NuGet packages assemblies in Mono folder?

You were right, I just changed the Path to solution, packages.config, or project.json to the project.sln and it started to work. Thanks.

You were right, I just changed the Path to solution, packages.config, or project.json to the project.sln and it started to work. Thanks.

Can You explain the steps you have taken ??

Was this page helpful?
0 / 5 - 0 ratings