Base solution for your next web application
Open Closed

aspnetzero in Xamarin issues #9130


User avatar
0
actvision created

Hi,

I am using Microsoft Visual Studio 2019 (Mobile development with .NET workload enabled which include Xamarin and Android SDK).

After opening the Mobile solution, i encountered lots warnings (please see ***Visual Studio Project warnings *** below).

I ignore the warnings and tried to run the Demo.Mobile.Droid project (with Demo.Web.Host project running in the background to serve the endpoints). I can see the login screen on Android Emulator. I entered the default admin Login and Password and hit the login button, the following message appeared on my Visual Studio:

System Exception: 'BindingContext of views must inherit XamarinViewModel. Given view's BindingContext is not like that: QiProcureDemo.Views.MainView'

I suspect the issue could be due to my development setup.

Please assist.

Visual Studio Project warnings:

Warning NU1701 Package 'PCLStorage 1.0.2' was restored using '.NETPortable,Version=v0.0,Profile=Profile259, .NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. Demo.Mobile.Shared C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Shared\Demo.Mobile.Shared.csproj 1 Warning Assembly 'Xamarin.Android.Support.Annotations' is using a deprecated attribute '[assembly: Java.Interop.DoNotPackageAttribute]'. Use a newer version of this NuGet package or notify the library author. Demo.Mobile.Droid Warning Could not resolve this reference. Could not locate the assembly "Acr.Support.Android, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. Demo.Mobile.Droid Warning NU1605 Detected package downgrade: Castle.LoggingFacility from 5.0.1 to 5.0.0. Reference the package directly from the project to select a different version. Demo.Mobile.Droid -> Abp 5.1.0 -> Castle.LoggingFacility (>= 5.0.1) Demo.Mobile.Droid -> Castle.LoggingFacility (>= 5.0.0) Demo.Mobile.Droid C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Droid\Demo.Mobile.Droid.csproj 1 Warning NU1605 Detected package downgrade: Castle.LoggingFacility from 5.0.1 to 5.0.0. Reference the package directly from the project to select a different version. Demo.Mobile.iOS -> Abp 5.1.0 -> Castle.LoggingFacility (>= 5.0.1) Demo.Mobile.iOS -> Castle.LoggingFacility (>= 5.0.0) Demo.Mobile.iOS C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.iOS\Demo.Mobile.iOS.csproj 1 Warning NU1605 Detected package downgrade: Microsoft.Extensions.Caching.Memory from 3.1.0 to 3.0.0. Reference the package directly from the project to select a different version. Demo.Mobile.Droid -> Abp 5.1.0 -> Microsoft.Extensions.Caching.Memory (>= 3.1.0) Demo.Mobile.Droid -> Microsoft.Extensions.Caching.Memory (>= 3.0.0) Demo.Mobile.Droid C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Droid\Demo.Mobile.Droid.csproj 1 Warning NU1605 Detected package downgrade: Microsoft.Extensions.Caching.Memory from 3.1.0 to 3.0.0. Reference the package directly from the project to select a different version. Demo.Mobile.iOS -> Abp 5.1.0 -> Microsoft.Extensions.Caching.Memory (>= 3.1.0) Demo.Mobile.iOS -> Microsoft.Extensions.Caching.Memory (>= 3.0.0) Demo.Mobile.iOS C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.iOS\Demo.Mobile.iOS.csproj 1 Warning NU1605 Detected package downgrade: Microsoft.Extensions.Options from 3.1.0 to 3.0.0. Reference the package directly from the project to select a different version. Demo.Mobile.Droid -> Abp 5.1.0 -> Microsoft.Extensions.Options (>= 3.1.0) Demo.Mobile.Droid -> Microsoft.Extensions.Options (>= 3.0.0) Demo.Mobile.Droid C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Droid\Demo.Mobile.Droid.csproj 1 Warning NU1605 Detected package downgrade: Microsoft.Extensions.Options from 3.1.0 to 3.0.0. Reference the package directly from the project to select a different version. Demo.Mobile.iOS -> Abp 5.1.0 -> Microsoft.Extensions.Options (>= 3.1.0) Demo.Mobile.iOS -> Microsoft.Extensions.Options (>= 3.0.0) Demo.Mobile.iOS C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.iOS\Demo.Mobile.iOS.csproj 1 Warning NU1605 Detected package downgrade: Newtonsoft.Json from 12.0.3 to 12.0.3-beta1. Reference the package directly from the project to select a different version. Demo.Mobile.Droid -> Abp 5.1.0 -> Newtonsoft.Json (>= 12.0.3) Demo.Mobile.Droid -> Newtonsoft.Json (>= 12.0.3-beta1) Demo.Mobile.Droid C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Droid\Demo.Mobile.Droid.csproj 1 Warning NU1605 Detected package downgrade: Newtonsoft.Json from 12.0.3 to 12.0.3-beta1. Reference the package directly from the project to select a different version. Demo.Mobile.iOS -> Abp 5.1.0 -> Newtonsoft.Json (>= 12.0.3) Demo.Mobile.iOS -> Newtonsoft.Json (>= 12.0.3-beta1) Demo.Mobile.iOS C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.iOS\Demo.Mobile.iOS.csproj 1 Warning NU1605 Detected package downgrade: System.Collections.Immutable from 1.7.0 to 1.6.0. Reference the package directly from the project to select a different version. Demo.Mobile.Droid -> Abp 5.1.0 -> System.Collections.Immutable (>= 1.7.0) Demo.Mobile.Droid -> System.Collections.Immutable (>= 1.6.0) Demo.Mobile.Droid C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Droid\Demo.Mobile.Droid.csproj 1 Warning NU1605 Detected package downgrade: System.Collections.Immutable from 1.7.0 to 1.6.0. Reference the package directly from the project to select a different version. Demo.Mobile.iOS -> Abp 5.1.0 -> System.Collections.Immutable (>= 1.7.0) Demo.Mobile.iOS -> System.Collections.Immutable (>= 1.6.0) Demo.Mobile.iOS C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.iOS\Demo.Mobile.iOS.csproj 1 Warning NU1605 Detected package downgrade: System.ComponentModel.Annotations from 4.7.0 to 4.7.0-preview2.19523.17. Reference the package directly from the project to select a different version. Demo.Mobile.Droid -> Abp 5.1.0 -> System.ComponentModel.Annotations (>= 4.7.0) Demo.Mobile.Droid -> System.ComponentModel.Annotations (>= 4.7.0-preview2.19523.17) Demo.Mobile.Droid C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Droid\Demo.Mobile.Droid.csproj 1 Warning NU1605 Detected package downgrade: System.ComponentModel.Annotations from 4.7.0 to 4.7.0-preview2.19523.17. Reference the package directly from the project to select a different version. Demo.Mobile.Droid -> Demo.Application.Client -> Demo.Application.Shared -> System.ComponentModel.Annotations (>= 4.7.0) Demo.Mobile.Droid -> System.ComponentModel.Annotations (>= 4.7.0-preview2.19523.17) Demo.Mobile.Droid C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Droid\Demo.Mobile.Droid.csproj 1 Warning NU1605 Detected package downgrade: System.ComponentModel.Annotations from 4.7.0 to 4.7.0-preview2.19523.17. Reference the package directly from the project to select a different version. Demo.Mobile.iOS -> Abp 5.1.0 -> System.ComponentModel.Annotations (>= 4.7.0) Demo.Mobile.iOS -> System.ComponentModel.Annotations (>= 4.7.0-preview2.19523.17) Demo.Mobile.iOS C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.iOS\Demo.Mobile.iOS.csproj 1 Warning NU1605 Detected package downgrade: System.ComponentModel.Annotations from 4.7.0 to 4.7.0-preview2.19523.17. Reference the package directly from the project to select a different version. Demo.Mobile.iOS -> Demo.Application.Client -> Demo.Application.Shared -> System.ComponentModel.Annotations (>= 4.7.0) Demo.Mobile.iOS -> System.ComponentModel.Annotations (>= 4.7.0-preview2.19523.17) Demo.Mobile.iOS C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.iOS\Demo.Mobile.iOS.csproj 1 Warning NU1605 Detected package downgrade: System.Configuration.ConfigurationManager from 4.7.0 to 4.6.0. Reference the package directly from the project to select a different version. Demo.Mobile.Droid -> Abp 5.1.0 -> System.Configuration.ConfigurationManager (>= 4.7.0) Demo.Mobile.Droid -> System.Configuration.ConfigurationManager (>= 4.6.0) Demo.Mobile.Droid C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Droid\Demo.Mobile.Droid.csproj 1 Warning NU1605 Detected package downgrade: System.Configuration.ConfigurationManager from 4.7.0 to 4.6.0. Reference the package directly from the project to select a different version. Demo.Mobile.iOS -> Abp 5.1.0 -> System.Configuration.ConfigurationManager (>= 4.7.0) Demo.Mobile.iOS -> System.Configuration.ConfigurationManager (>= 4.6.0) Demo.Mobile.iOS C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.iOS\Demo.Mobile.iOS.csproj 1 Warning Found conflicts between different versions of "Microsoft.CSharp" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. Demo.Mobile.Droid Warning Found conflicts between different versions of "Microsoft.Extensions.Caching.Abstractions" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. Demo.Mobile.Droid Warning Found conflicts between different versions of "Microsoft.Extensions.Caching.Memory" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. Demo.Mobile.Droid Warning Found conflicts between different versions of "Microsoft.Extensions.Options" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. Demo.Mobile.Droid Warning Found conflicts between different versions of "System.Collections.Immutable" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. Demo.Mobile.Droid Warning Found conflicts between different versions of "System.Configuration.ConfigurationManager" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. Demo.Mobile.Droid Warning MSB3245: Could not resolve this reference. Could not locate the assembly "Acr.Support.Android, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 0

Warning NU1701 Package 'Microsoft.Bcl 1.1.6' was restored using '.NETPortable,Version=v0.0,Profile=Profile259, .NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. Demo.Mobile.Shared C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Shared\Demo.Mobile.Shared.csproj 1 Warning NU1701 Package 'Microsoft.Bcl.Async 1.0.165' was restored using '.NETPortable,Version=v0.0,Profile=Profile259, .NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. Demo.Mobile.Shared C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Shared\Demo.Mobile.Shared.csproj 1 Warning NU1701 Package 'modernhttpclient 2.4.2' was restored using '.NETPortable,Version=v0.0,Profile=Profile259, .NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. Demo.Application.Client C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Application.Client\Demo.Application.Client.csproj 1 Warning NU1701 Package 'modernhttpclient 2.4.2' was restored using '.NETPortable,Version=v0.0,Profile=Profile259, .NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. Demo.Mobile.Shared C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Shared\Demo.Mobile.Shared.csproj 1 Message IDE0052 Private member 'LoginViewModel._navigationData' can be removed as the value assigned to it is never read. Demo.Mobile.Shared C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Shared\ViewModels\LoginViewModel.cs 41 Active Message IDE0052 Private member 'MainViewModel._productImagesControllerService' can be removed as the value assigned to it is never read. Demo.Mobile.Shared C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Shared\ViewModels\MainViewModel.cs 42 Active Message IDE0052 Private member 'NavigationService._applicationContext' can be removed as the value assigned to it is never read. Demo.Mobile.Shared C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Shared\Services\Navigation\NavigationService.cs 18 Active Message IDE0052 Private member 'NavigationService._dataStorageService' can be removed as the value assigned to it is never read. Demo.Mobile.Shared C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Shared\Services\Navigation\NavigationService.cs 17 Active Message IDE0060 Remove unused parameter 'args' if it is not part of a shipped public API Demo.Mobile.Shared C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Mobile.Shared\Localization\L.cs 27 Active Message IDE0060 Remove unused parameter 'stripAjaxResponseWrapper' if it is not part of a shipped public API Demo.Application.Client C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Application.Client\ApiClient\AbpApiClient.cs 163 Active Message IDE0060 Remove unused parameter 'stripAjaxResponseWrapper' if it is not part of a shipped public API Demo.Application.Client C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Application.Client\ApiClient\AbpApiClient.cs 226 Active Message IDE0060 Remove unused parameter 'stripAjaxResponseWrapper' if it is not part of a shipped public API Demo.Application.Client C:\Project\Source\InHouseDev\Ng\Development\Demo\aspnet-core\src\Demo.Application.Client\ApiClient\AbpApiClient.cs 365 Active Warning The referenced component 'Acr.Support.Android' could not be found. Demo.Mobile.Droid Warning The referenced component 'ModernHttpClient' could not be found. Demo.Mobile.Droid Warning The referenced component 'OkHttp' could not be found. Demo.Mobile.Droid Warning The referenced component 'PCLStorage' could not be found. Demo.Mobile.Droid Warning The referenced component 'PCLStorage.Abstractions' could not be found. Demo.Mobile.Droid Warning The referenced component 'Xam.Plugins.ImageCropper.Droid' could not be found. Demo.Mobile.Droid Warning The requested operation cannot be performed on a file with a user-mapped section open.


1 Answer(s)