Bug 38494 - Sometimes Android app just doesn't start
Summary: Sometimes Android app just doesn't start
Status: RESOLVED ANSWERED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 4.0.3 (C6SR3)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Joaquin Jares
URL:
Depends on:
Blocks:
 
Reported: 2016-02-05 15:20 UTC by Miha Markic
Modified: 2017-03-02 15:09 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Miha Markic 2016-02-05 15:20:58 UTC
This doesn't happen consistently. Sometimes when I want to start debugging an already deployed app.
The app would crash upon start (a crash dialog appears on android) and XS would stop debugging.
This happens on Nexus 6 device (didn't test with others).
An obvious culprit is a java exception...
Usually the error goes away if I do a rebuild on redeploy.

Logcat:
Info(2224)/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.aioss.aps.android/md5b900d3a2161e2fa31b70bf9a3c51a926.SplashActivity} from uid 2000 on display 0
Debug(8816)/AndroidRuntime: Shutting down VM
Info(2224)/ActivityManager: Start proc 8824:com.aioss.aps.android/u0a224 for activity com.aioss.aps.android/md5b900d3a2161e2fa31b70bf9a3c51a926.SplashActivity
Info(8824)/art: Late-enabling -Xcheck:jni
Warning(8824)/ContextImpl: Unable to create files subdir /data/user/0/com.aioss.aps.android/cache
Verbose(8824)/ActivityThread: Unable to initialize "java.io.tmpdir" property due to missing cache directory
Warning(8824)/ContextImpl: Unable to create files subdir /data/user/0/com.aioss.aps.android/code_cache
Error(8824)/ActivityThread: Unable to setupGraphicsSupport due to missing code-cache directory
Warning(8824)/linker: /data/app/com.aioss.aps.android-1/lib/arm/libmonodroid.so: is missing DT_SONAME will use basename as a replacement: "libmonodroid.so"
Warning(8824)/ContextImpl: Unable to create files subdir /data/user/0/com.aioss.aps.android/files
Debug(8824)/AndroidRuntime: Shutting down VM
Error(8824)/AndroidRuntime: FATAL EXCEPTION: main
Error(8824)/AndroidRuntime: Process: com.aioss.aps.android, PID: 8824
Error(8824)/AndroidRuntime: java.lang.RuntimeException: Unable to get provider mono.MonoRuntimeProvider: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
Error(8824)/AndroidRuntime: 	at android.app.ActivityThread.installProvider(ActivityThread.java:5156)
Error(8824)/AndroidRuntime: 	at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
Error(8824)/AndroidRuntime: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
Error(8824)/AndroidRuntime: 	at android.app.ActivityThread.-wrap1(ActivityThread.java)
Error(8824)/AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
Error(8824)/AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
Error(8824)/AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)
Error(8824)/AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:5417)
Error(8824)/AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
Error(8824)/AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
Error(8824)/AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Error(8824)/AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
Error(8824)/AndroidRuntime: 	at mono.MonoPackageManager.LoadApplication(MonoPackageManager.java:27)
Error(8824)/AndroidRuntime: 	at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:42)
Error(8824)/AndroidRuntime: 	at android.app.ActivityThread.installProvider(ActivityThread.java:5153)
Error(8824)/AndroidRuntime: 	... 10 more
Warning(2224)/ActivityManager:   Force finishing activity com.aioss.aps.android/md5b900d3a2161e2fa31b70bf9a3c51a926.SplashActivity
Comment 1 Shawn 2016-04-08 15:12:10 UTC
Any update to this -- I am running into the same issue

Here are the details logs from Xamarin

Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver Error: 0 : [2016-04-08 11:07:13.9401] An error occurred searching types for the given assembly
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.MetadataReader.IMetadataTables'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D8F579AB-402D-4B8E-82D9-5D63B1065C68}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
   at Microsoft.MetadataReader.MetadataOnlyModule.RowCount(MetadataTable metadataTableIndex)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.get_SimpleTypes()
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkFactory.CreateSimpleType(MetadataOnlyModule scope, Token tokenTypeDef)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeTokenInternal(Token token, GenericContext context)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at Microsoft.MetadataReader.MetadataOnlyModule.<GetType>b__118_1(Assembly assembly, String simpleTypeName, Boolean ignoreCaseInCallback)
   at System.TypeNameParser.ResolveType(Assembly assembly, String[] names, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.ConstructType(Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeRef(ITypeReference typeReference)
   at Microsoft.MetadataReader.MetadataOnlyTypeReference.GetResolvedTypeWorker()
   at Microsoft.MetadataReader.TypeProxy.GetResolvedType()
   at Microsoft.MetadataReader.TypeProxy.get_Module()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.Equals(Type other)
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.Equals(Type o)
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeHelper()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeImpl()
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.IsValueTypeImpl()
   at System.Type.get_IsClass()
   at Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver.<SearchTypesAsync>b__19_0() in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Features\VisualStudio.Forms.Intellisense\ProjectTypeResolver.cs:line 184
Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver Error: 0 : [2016-04-08 11:07:14.3027] An error occurred searching types for the given assembly
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.MetadataReader.IMetadataTables'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D8F579AB-402D-4B8E-82D9-5D63B1065C68}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
   at Microsoft.MetadataReader.MetadataOnlyModule.RowCount(MetadataTable metadataTableIndex)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.get_SimpleTypes()
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkFactory.CreateSimpleType(MetadataOnlyModule scope, Token tokenTypeDef)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeTokenInternal(Token token, GenericContext context)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at Microsoft.MetadataReader.MetadataOnlyModule.<GetType>b__118_1(Assembly assembly, String simpleTypeName, Boolean ignoreCaseInCallback)
   at System.TypeNameParser.ResolveType(Assembly assembly, String[] names, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.ConstructType(Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeRef(ITypeReference typeReference)
   at Microsoft.MetadataReader.MetadataOnlyTypeReference.GetResolvedTypeWorker()
   at Microsoft.MetadataReader.TypeProxy.GetResolvedType()
   at Microsoft.MetadataReader.TypeProxy.get_Module()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.Equals(Type other)
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.Equals(Type o)
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeHelper()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeImpl()
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.IsValueTypeImpl()
   at System.Type.get_IsClass()
   at Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver.<SearchTypesAsync>b__19_0() in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Features\VisualStudio.Forms.Intellisense\ProjectTypeResolver.cs:line 184
Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver Error: 0 : [2016-04-08 11:07:14.6657] An error occurred searching types for the given assembly
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.MetadataReader.IMetadataTables'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D8F579AB-402D-4B8E-82D9-5D63B1065C68}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
   at Microsoft.MetadataReader.MetadataOnlyModule.RowCount(MetadataTable metadataTableIndex)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.get_SimpleTypes()
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkFactory.CreateSimpleType(MetadataOnlyModule scope, Token tokenTypeDef)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeTokenInternal(Token token, GenericContext context)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at Microsoft.MetadataReader.MetadataOnlyModule.<GetType>b__118_1(Assembly assembly, String simpleTypeName, Boolean ignoreCaseInCallback)
   at System.TypeNameParser.ResolveType(Assembly assembly, String[] names, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.ConstructType(Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeRef(ITypeReference typeReference)
   at Microsoft.MetadataReader.MetadataOnlyTypeReference.GetResolvedTypeWorker()
   at Microsoft.MetadataReader.TypeProxy.GetResolvedType()
   at Microsoft.MetadataReader.TypeProxy.get_Module()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.Equals(Type other)
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.Equals(Type o)
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeHelper()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeImpl()
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.IsValueTypeImpl()
   at System.Type.get_IsClass()
   at Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver.<SearchTypesAsync>b__19_0() in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Features\VisualStudio.Forms.Intellisense\ProjectTypeResolver.cs:line 184
Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver Error: 0 : [2016-04-08 11:07:14.8748] An error occurred searching types for the given assembly
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.MetadataReader.IMetadataTables'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D8F579AB-402D-4B8E-82D9-5D63B1065C68}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
   at Microsoft.MetadataReader.MetadataOnlyModule.RowCount(MetadataTable metadataTableIndex)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.get_SimpleTypes()
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkFactory.CreateSimpleType(MetadataOnlyModule scope, Token tokenTypeDef)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeTokenInternal(Token token, GenericContext context)
   at Microsoft.MetadataReader.MetadataOnlyModule.<GetTypeList>d__108.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at Microsoft.MetadataReader.MetadataOnlyModule.GetTypes()
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetTypes()
   at Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver.<SearchTypesAsync>b__19_0() in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Features\VisualStudio.Forms.Intellisense\ProjectTypeResolver.cs:line 167
Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver Error: 0 : [2016-04-08 11:07:15.2003] System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchGeneratedEntries(String fullName, Boolean correctThread)
   at Microsoft.VisualStudio.Design.VSTypeResolutionService.System.ComponentModel.Design.IDesignTimeAssemblyLoader.GetTargetAssemblyPath(AssemblyName runtimeOrTargetAssemblyName, String suggestedAssemblyPath, FrameworkName targetFramework)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUniverse.ResolveAssembly(AssemblyName assemblyName, Assembly runtimeAssembly)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkProvider.GetReflectionAssembly(AssemblyName assemblyName)
   at Clide.Solution.IProjectNodeExtensions.<>c__DisplayClass15.<GetOutputAssembly>b__13()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver.<SearchTypesAsync>b__19_0() in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Features\VisualStudio.Forms.Intellisense\ProjectTypeResolver.cs:line 158
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchGeneratedEntries(String fullName, Boolean correctThread)
   at Microsoft.VisualStudio.Design.VSTypeResolutionService.System.ComponentModel.Design.IDesignTimeAssemblyLoader.GetTargetAssemblyPath(AssemblyName runtimeOrTargetAssemblyName, String suggestedAssemblyPath, FrameworkName targetFramework)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUniverse.ResolveAssembly(AssemblyName assemblyName, Assembly runtimeAssembly)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkProvider.GetReflectionAssembly(AssemblyName assemblyName)
   at Clide.Solution.IProjectNodeExtensions.<>c__DisplayClass15.<GetOutputAssembly>b__13()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver Error: 0 : [2016-04-08 11:07:15.4323] An error occurred searching types for the given assembly
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.MetadataReader.IMetadataTables'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D8F579AB-402D-4B8E-82D9-5D63B1065C68}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
   at Microsoft.MetadataReader.MetadataOnlyModule.RowCount(MetadataTable metadataTableIndex)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.get_SimpleTypes()
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkFactory.CreateSimpleType(MetadataOnlyModule scope, Token tokenTypeDef)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeTokenInternal(Token token, GenericContext context)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at Microsoft.MetadataReader.MetadataOnlyModule.<GetType>b__118_1(Assembly assembly, String simpleTypeName, Boolean ignoreCaseInCallback)
   at System.TypeNameParser.ResolveType(Assembly assembly, String[] names, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.ConstructType(Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeRef(ITypeReference typeReference)
   at Microsoft.MetadataReader.MetadataOnlyTypeReference.GetResolvedTypeWorker()
   at Microsoft.MetadataReader.TypeProxy.GetResolvedType()
   at Microsoft.MetadataReader.TypeProxy.get_Module()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.Equals(Type other)
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.Equals(Type o)
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeHelper()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeImpl()
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.IsValueTypeImpl()
   at System.Type.get_IsClass()
   at Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver.<SearchTypesAsync>b__19_0() in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Features\VisualStudio.Forms.Intellisense\ProjectTypeResolver.cs:line 184
Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver Error: 0 : [2016-04-08 11:07:15.6853] An error occurred searching types for the given assembly
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.MetadataReader.IMetadataTables'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D8F579AB-402D-4B8E-82D9-5D63B1065C68}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
   at Microsoft.MetadataReader.MetadataOnlyModule.RowCount(MetadataTable metadataTableIndex)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.get_SimpleTypes()
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkFactory.CreateSimpleType(MetadataOnlyModule scope, Token tokenTypeDef)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeTokenInternal(Token token, GenericContext context)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at Microsoft.MetadataReader.MetadataOnlyModule.<GetType>b__118_1(Assembly assembly, String simpleTypeName, Boolean ignoreCaseInCallback)
   at System.TypeNameParser.ResolveType(Assembly assembly, String[] names, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.ConstructType(Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeRef(ITypeReference typeReference)
   at Microsoft.MetadataReader.MetadataOnlyTypeReference.GetResolvedTypeWorker()
   at Microsoft.MetadataReader.TypeProxy.GetResolvedType()
   at Microsoft.MetadataReader.TypeProxy.get_Module()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.Equals(Type other)
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.Equals(Type o)
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeHelper()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeImpl()
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.IsValueTypeImpl()
   at System.Type.get_IsClass()
   at Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver.<SearchTypesAsync>b__19_0() in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Features\VisualStudio.Forms.Intellisense\ProjectTypeResolver.cs:line 184
Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver Error: 0 : [2016-04-08 11:07:15.9050] An error occurred searching types for the given assembly
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.MetadataReader.IMetadataTables'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D8F579AB-402D-4B8E-82D9-5D63B1065C68}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
   at Microsoft.MetadataReader.MetadataOnlyModule.RowCount(MetadataTable metadataTableIndex)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.get_SimpleTypes()
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkFactory.CreateSimpleType(MetadataOnlyModule scope, Token tokenTypeDef)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeTokenInternal(Token token, GenericContext context)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at Microsoft.MetadataReader.MetadataOnlyModule.<GetType>b__118_1(Assembly assembly, String simpleTypeName, Boolean ignoreCaseInCallback)
   at System.TypeNameParser.ResolveType(Assembly assembly, String[] names, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.ConstructType(Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeRef(ITypeReference typeReference)
   at Microsoft.MetadataReader.MetadataOnlyTypeReference.GetResolvedTypeWorker()
   at Microsoft.MetadataReader.TypeProxy.GetResolvedType()
   at Microsoft.MetadataReader.TypeProxy.get_Module()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.Equals(Type other)
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.Equals(Type o)
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeHelper()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeImpl()
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.IsValueTypeImpl()
   at System.Type.get_IsClass()
   at Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver.<SearchTypesAsync>b__19_0() in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Features\VisualStudio.Forms.Intellisense\ProjectTypeResolver.cs:line 184
Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver Error: 0 : [2016-04-08 11:07:16.2224] An error occurred searching types for the given assembly
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.MetadataReader.IMetadataTables'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D8F579AB-402D-4B8E-82D9-5D63B1065C68}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
   at Microsoft.MetadataReader.MetadataOnlyModule.RowCount(MetadataTable metadataTableIndex)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.get_SimpleTypes()
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkFactory.CreateSimpleType(MetadataOnlyModule scope, Token tokenTypeDef)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeTokenInternal(Token token, GenericContext context)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at Microsoft.MetadataReader.MetadataOnlyModule.<GetType>b__118_1(Assembly assembly, String simpleTypeName, Boolean ignoreCaseInCallback)
   at System.TypeNameParser.ResolveType(Assembly assembly, String[] names, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.ConstructType(Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeRef(ITypeReference typeReference)
   at Microsoft.MetadataReader.MetadataOnlyTypeReference.GetResolvedTypeWorker()
   at Microsoft.MetadataReader.TypeProxy.GetResolvedType()
   at Microsoft.MetadataReader.TypeProxy.get_Module()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.Equals(Type other)
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.Equals(Type o)
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeHelper()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeImpl()
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.IsValueTypeImpl()
   at System.Type.get_IsClass()
   at Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver.<SearchTypesAsync>b__19_0() in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Features\VisualStudio.Forms.Intellisense\ProjectTypeResolver.cs:line 184
Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver Error: 0 : [2016-04-08 11:07:16.4804] An error occurred searching types for the given assembly
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.MetadataReader.IMetadataTables'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D8F579AB-402D-4B8E-82D9-5D63B1065C68}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
   at Microsoft.MetadataReader.MetadataOnlyModule.RowCount(MetadataTable metadataTableIndex)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.get_SimpleTypes()
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkFactory.CreateSimpleType(MetadataOnlyModule scope, Token tokenTypeDef)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeTokenInternal(Token token, GenericContext context)
   at Microsoft.MetadataReader.MetadataOnlyModule.<GetTypeList>d__108.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at Microsoft.MetadataReader.MetadataOnlyModule.GetTypes()
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetTypes()
   at Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver.<SearchTypesAsync>b__19_0() in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Features\VisualStudio.Forms.Intellisense\ProjectTypeResolver.cs:line 167
Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver Error: 0 : [2016-04-08 11:07:16.7360] An error occurred searching types for the given assembly
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.MetadataReader.IMetadataTables'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D8F579AB-402D-4B8E-82D9-5D63B1065C68}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
   at Microsoft.MetadataReader.MetadataOnlyModule.RowCount(MetadataTable metadataTableIndex)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.get_SimpleTypes()
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkFactory.CreateSimpleType(MetadataOnlyModule scope, Token tokenTypeDef)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeTokenInternal(Token token, GenericContext context)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at Microsoft.MetadataReader.MetadataOnlyModule.<GetType>b__118_1(Assembly assembly, String simpleTypeName, Boolean ignoreCaseInCallback)
   at System.TypeNameParser.ResolveType(Assembly assembly, String[] names, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.ConstructType(Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.TypeNameParser.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkModule.GetType(String className, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError)
   at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeRef(ITypeReference typeReference)
   at Microsoft.MetadataReader.MetadataOnlyTypeReference.GetResolvedTypeWorker()
   at Microsoft.MetadataReader.TypeProxy.GetResolvedType()
   at Microsoft.MetadataReader.TypeProxy.get_Module()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.Equals(Type other)
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.Equals(Type o)
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeHelper()
   at Microsoft.MetadataReader.MetadataOnlyTypeDef.IsValueTypeImpl()
   at Microsoft.VisualStudio.Shell.Design.TypeWrapper.IsValueTypeImpl()
   at System.Type.get_IsClass()
   at Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver.<SearchTypesAsync>b__19_0() in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Features\VisualStudio.Forms.Intellisense\ProjectTypeResolver.cs:line 184
Xamarin.VisualStudio.Android.XamarinAndroidPackage Error: 0 : [2016-04-08 11:07:17.6477] MonoAndroidDebuggerSession
Mono.Debugging.Soft.ConnectionException: Could not connect to the debugger. ---> Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.

Server stack trace: 
   at Mono.Debugger.Soft.Connection.SendReceive(CommandSet command_set, Int32 command, PacketWriter packet)
   at Mono.Debugger.Soft.Connection.VM_GetVersion()
   at Mono.Debugger.Soft.Connection.Connect()
   at Mono.Debugger.Soft.VirtualMachine.connect()
   at Mono.Debugger.Soft.VirtualMachineManager.Connect(Connection transport, StreamReader standardOutput, StreamReader standardError)
   at Mono.Debugger.Soft.VirtualMachineManager.ConnectInternal(Socket dbg_sock, Socket con_sock, IPEndPoint dbg_ep, IPEndPoint con_ep)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
   at Mono.Debugger.Soft.VirtualMachineManager.ConnectCallback.EndInvoke(IAsyncResult result)
   at Mono.Debugger.Soft.VirtualMachineManager.EndConnect(IAsyncResult asyncResult)
   at Mono.Debugging.Soft.SoftDebuggerSession.<>c__DisplayClass52_0.<StartConnecting>b__0(IAsyncResult ar)
   --- End of inner exception stack trace ---
Xamarin.VisualStudio.ProgressReport Error: 0 : [2016-04-08 11:07:17.9134] Mono.Debugging.Soft.ConnectionException: Could not connect to the debugger. ---> Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.

Server stack trace: 
   at Mono.Debugger.Soft.Connection.SendReceive(CommandSet command_set, Int32 command, PacketWriter packet)
   at Mono.Debugger.Soft.Connection.VM_GetVersion()
   at Mono.Debugger.Soft.Connection.Connect()
   at Mono.Debugger.Soft.VirtualMachine.connect()
   at Mono.Debugger.Soft.VirtualMachineManager.Connect(Connection transport, StreamReader standardOutput, StreamReader standardError)
   at Mono.Debugger.Soft.VirtualMachineManager.ConnectInternal(Socket dbg_sock, Socket con_sock, IPEndPoint dbg_ep, IPEndPoint con_ep)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
   at Mono.Debugger.Soft.VirtualMachineManager.ConnectCallback.EndInvoke(IAsyncResult result)
   at Mono.Debugger.Soft.VirtualMachineManager.EndConnect(IAsyncResult asyncResult)
   at Mono.Debugging.Soft.SoftDebuggerSession.<>c__DisplayClass52_0.<StartConnecting>b__0(IAsyncResult ar)
   --- End of inner exception stack trace ---
Comment 2 Marius Ungureanu 2017-02-14 10:06:32 UTC
This is a Visual Studio Extension bug.
Comment 3 Jose Gallardo 2017-03-02 15:09:57 UTC
@Shawn,

This was originally a XS issue, but your comment was about VS, 10 months ago. As it was assigned to the XS team, our team didn't get visibility on the issue until now.

Our product has included many fixes/improvements since then, and as we didn't get any other similar report, I'll mark this issue as resolved/answered.

If you are still facing the issue with latest stable bits, please feel free to reopen including the updated environment information and logs (I would recommend to take a look at this article: https://developer.xamarin.com/guides/cross-platform/troubleshooting/questions/howto-file-bug/)


Thanks