UsbSerialForAndroid icon indicating copy to clipboard operation
UsbSerialForAndroid copied to clipboard

Error loading project properties editor

Open DiebBlue opened this issue 1 year ago • 4 comments

This happens as long as monoandroid5.0 is specified as the targetframework in the UsbSerialForAndroid project. If I remove monoandroid5.0, then the error does not occur.

Visual Studio Version 17.6.2 Xamarin.Android SDK 13.2.0.6

System.ArgumentException: Expected 6 values for property AndroidRule::AndroidPackageFormat, but got 4. Parametername: values bei Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.Property.Update(ImmutableArray_1 values) bei Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.Property..ctor(PropertyMetadata metadata, ImmutableArray_1 values, PropertyContext context, ImmutableHashSet_1 varyByDimensions) bei Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.PropertyContextFactoryBase.ToProperty(IUIPropertySnapshot property, Page page, Category category, Int32 order, PropertyContext propertyContext, IPropertyEditorRegistry propertyEditorRegistry) bei Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.ProjectPropertyDataAccess.Observer.<HandleDataAsync>g__CreateProperties|14_5(<>c__DisplayClass14_0& ) bei Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.ProjectPropertyDataAccess.Observer.<HandleDataAsync>g__ProcessInitialData|14_1(<>c__DisplayClass14_0& ) --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde --- bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) bei Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.ProjectPropertyDataAccess.Observer.<InitializeAsync>d__10.MoveNext() --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde --- bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) bei System.Runtime.CompilerServices.TaskAwaiter_1.GetResult() bei Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.ProjectPropertyDataAccess.Observer.<CreateAsync>d__9.MoveNext() --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde --- bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) bei Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.ProjectPropertiesEditor.<>c__DisplayClass0_0.<<-ctor>b__0>d.MoveNext() --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde --- bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) bei Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.AsyncLoadContent.<>c__DisplayClass0_0.<<Initialize>b__0>d.MoveNext()

DiebBlue avatar Jun 07 '23 14:06 DiebBlue

I think that is a limitation of using Xamarin.Legacy.Sdk to allow UsbSerialForAndroid to target both Xamarin and .NET6/.NET7.

I did create an issue in the Xamarin.Legacy.Sdk project as Error opening .csproj when monodroid5.0 is included with the target frameworks. The about tag for that project states "not fully supported" so it may just be an annoyance to work around.

anotherlab avatar Jun 07 '23 15:06 anotherlab

The maintainer of Xamarin.Legacy.Sdk said this was a Visual Studio issue and closed the issue that I filed.

I reported it through Visual Studio feed back and that issue can viewed here.

@DiebBlue, can you upvote that issue? That will help get some attention to it.

anotherlab avatar Jun 13 '23 14:06 anotherlab

Ok, thanks for your report to the VS Developer Community. I have upvoted your issue.

DiebBlue avatar Jun 13 '23 18:06 DiebBlue

Thank you. I'll leave this issue open for a while in case the VS team addresses it.

anotherlab avatar Jun 13 '23 18:06 anotherlab