Repository navigation
MonoPackageManager incompatible types: String[] cannot be converted to String #2228
Description
Note: Copied from: https://bugzilla.xamarin.com/show_bug.cgi?id=60854#c3
MonoPackageManager incompatible types: String[] cannot be converted to String
Submitted by a community member on 2017-11-24 16:35 UTC
I have already referenced #28977 and #29370 where they both say to delete the obj and bin directories.
If I build from the command line, everything is fine, but if I build via Visual Studio, I get this error.
I've cleaned the solution, deleted /obj and /bin, restarted VS, restarted my machine, uninstalled and reinstalled Xamarin, and yet nothing yet has allowed me to build my Android app via Visual Studio.
I'm trying to think back to when this started and the only thing I can think of is that this is the first time trying to build Android since updating to the latest toolset for Xamarin.
my command line build looks something like this
msbuild.exe C:\Dev\SelfServe\src\XXX\XXX.csproj /target:clean,PackageForAndroid /verbosity:minimal /logger:FileLogger,Microsoft.Build.Engine;logfile=C:\Dev\SelfServe\build-artifacts\logs\MSBuild\msbuild.txt /property:OutDir=C:\Dev\SelfServe\build-artifacts\output\Droid\TestApp\ /property:VisualStudioVersion=14.0 /property:ToolsVersion=4.6 /property:ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch=False /maxcpucount:1 /p:Configuration=Ad-Hoc
-------------------------------------------------
Microsoft Visual Studio Enterprise 2017
Version 15.4.4
VisualStudio.15.Release/15.4.4+27004.2009
Microsoft .NET Framework
Version 4.6.01586
Installed Version: Enterprise
Visual Basic 2017 00369-60000-00001-AA734
Microsoft Visual Basic 2017
Visual C# 2017 00369-60000-00001-AA734
Microsoft Visual C# 2017
Visual F# 4.1 00369-60000-00001-AA734
Microsoft Visual F# 4.1
ASP.NET and Web Tools 2017 15.0.30925.0
ASP.NET and Web Tools 2017
ASP.NET Core Razor Language Services 1.0
Provides languages services for ASP.NET Core Razor.
ASP.NET Web Frameworks and Tools 2017 5.2.50921.0
For additional information, visit http://docs.nuget.org/
Azure App Service Tools v3.0.0 15.0.30915.0
Azure App Service Tools v3.0.0
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
File Nesting 2.6.67
Automatically nest files based on file name and enables developers to nest and unnest any file manually
JavaScript Language Service 2.0
JavaScript Language Service
JavaScript Project System 2.0
JavaScript Project System
JavaScript UWP Project System 2.0
JavaScript UWP Project System
JetBrains ReSharper Ultimate 2017.1.3 Build 108.0.20170613.154143
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2017 JetBrains, Inc.
Merq 1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.
Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50719.1
Microsoft Continuous Delivery Tools for Visual Studio 0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package
Mono Debugging for Visual Studio 4.7.4-pre (c2d89eb)
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 4.4.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://www.asp.net/.
Project System Tools 1.0
Tools for working with C#, VisualBasic, and F# projects.
SQL Server Data Tools 15.1.61707.200
Microsoft SQL Server Data Tools
TypeScript 2.3.5.0
TypeScript tools for Visual Studio
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Tools for Universal Windows Apps 15.0.27004.2008
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.
VisualStudio.IoT 1.0
Package with IoT components for Visual Studio
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
VSPackage1 Extension 1.0
VSPackage1 Visual Studio Extension Detailed Info
Xamarin 4.7.10.38 (34c1b6c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android SDK 8.0.2.1 (HEAD/c2a33d8ea)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 11.3.0.47 (51128b8)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Xamarin Bugzilla comment 1 by Jon Douglas [MSFT] [MSFT] on 2017-11-27 19:20 UTC
Hi Chase,
Thanks for reporting a bug.
Can you please upload a diagnostic build output log?
Secondly, if there's anyway we can get our hands on a reproduction project, we will be able to investigate much further with a possibility of reproducing this locally. If this is private, feel free to send this to my email or we can mark this bug private.
From a first glance, the definitions seem to be fine:
https://github.com/xamarin/xamarin-android/blob/master/src/monodroid/jni/monodroid-glue.c#L3688
appDirs is a type String[]. However I would guess that the issue is in the native call:
specifically this code:
Xamarin Bugzilla comment 2 by a community member on 2017-11-27 20:36 UTC
sent private details via email
Xamarin Bugzilla comment 3 by a community member on 2017-12-06 12:47 UTC
I am also seeing this issue on our build server. Would you like our log? (I can email)
Reference: https://bugzilla.xamarin.com/show_bug.cgi?id=60854

Activity
jonathanpeppers commentedon Sep 28, 2018
@dazinator I believe this issue was long ago fixed.
Any chance you can upgrade Visual Studio?
I am going to close this, as I believe it is fixed. Feel free to reopen if you are seeing this in Visual Studio 15.8.x! Or if you get other info, thanks!
dazinator commentedon Sep 28, 2018
Ok its possible it is an older VS build tools release, as this is running within a docker container. Will update to the latest!
Bump to JamesNK/Newtonsoft.Json@ae9fe44e [13.0.1]
Bump to JamesNK/Newtonsoft.Json@ae9fe44e [13.0.1]
Bump to JamesNK/Newtonsoft.Json@ae9fe44e [13.0.1]
Bump to JamesNK/Newtonsoft.Json@ae9fe44e [13.0.1]
Bump to JamesNK/Newtonsoft.Json@ae9fe44e [13.0.1] (#6090)