关于MvvmCross 5.6.3及Location.Fused插件的技术咨询
Hey there, let's break down your MvvmCross 5.6.3 questions with clear, practical answers:
1. How to correctly add MvvmCross.Plugin.Location.Fused 5.6.3?
First off, a critical note: MvvmCross.Plugin.Location.Fused is Android-only—it’s meant to be installed in your Android app project, not a shared .NET Standard library. That’s almost certainly why you’re hitting the netstandard2.0 incompatibility error if you tried adding it to your shared code project.
Here’s the right way to install it:
- Open your Android project in Visual Studio.
- Launch the NuGet Package Manager, search for
MvvmCross.Plugin.Location.Fusedand select version 5.6.3. - Double-check that your Android project targets MonoAndroid 7.0 or higher (this is a hard requirement for MvvmCross 5.6.3’s Android plugins). If your project is set to an older version, update it in the project properties first.
- Click install—once your project is targeting the correct Android framework, the compatibility issue should disappear.
2. What’s the correct target framework for MvvmCross 5.6.3?
MvvmCross 5.6.3 supports different frameworks based on the type of project you’re working on:
- Shared/core projects: You can use .NET Standard 1.0, .NET Standard 2.0, or legacy PCL profiles (like Profile111) here—all are compatible with the core MvvmCross library.
- Android projects: Must target MonoAndroid 7.0 or newer (this is also required for the Fused Location plugin to work).
- iOS projects: Need to target Xamarin.iOS 10.0 or later.
- UWP projects: Should target Universal Windows Platform (UAP) 10.0, with a minimum version of 10.0.16299.0 recommended.
The core library works fine with .NET Standard 2.0, but platform-specific plugins have their own framework ties to the OS they support.
3. Where are MvvmCross’s .NET dependencies defined?
MvvmCross’s dependencies are stored in the .nuspec file that comes with every NuGet package. You can access this info in a few easy ways:
- In Visual Studio’s NuGet Package Manager: Select any installed MvvmCross package (like
MvvmCross.Coreor the Location.Fused plugin) and look at the "Dependencies" tab—this lists all required frameworks and other packages. - In your project’s
.csprojfile: Each NuGet package you’ve installed is listed as a<PackageReference>element, which includes version details and any dependency constraints. - If you’re digging into the source code: Every MvvmCross project (core or plugin) has a
.csprojfile that defines its target frameworks and package dependencies explicitly.
内容的提问来源于stack exchange,提问作者M. Feldman

