0

I'm following a tutorial to create a cross-platform app using xamarin.forms except that I'm using Windows 7 and hence I skipped those steps for UWP part.

Now when I trying to build the solution, I'm getting the below error message

1> No way to resolve conflict between "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.

Based on findings on the net it seems that something to do with versioning messed up however this should not happen as it's a new solution from scratch.

I've also checked the properties that stated as below:

- "Compile using android version (Android 7.1(Nougat))"
- Android Manifest "Target Android version" Use compile using SDK version

Well to be exact, the build was successful but with error logging as output. Please refer to below image

enter image description here

May I know what else I can try?

4
  • 1
    Click on Manage Nuget packages for Solution, Click on the Consolidate tab, for every package in the Consolidate tab, update the package to the same version for every project.
    – York Shen
    Sep 27, 2017 at 4:40
  • @YorkShen-MSFT: There is nothing to be updated at Consolidate tab Oct 9, 2017 at 13:38
  • I don't see it as an error. It seems that project builds successfully from you sreenshot
    – Yuri S
    Oct 9, 2017 at 17:51
  • Have you enable the Deploy checkboxes ?
    – York Shen
    Oct 10, 2017 at 0:43

3 Answers 3

0

You can fix this by issuing an update-package -reinstall command in the Package Manager Console.

2
  • I've tried your way and successfully reinstalling a lot of packages but when I try to build the solution it still throwing me same error Sep 26, 2017 at 15:16
  • Kindly refer to my updated question as Ive included the image of the output Sep 26, 2017 at 15:20
0

Make sure that your Xamarin (Visual Studio) installation version is the same as the Xamarin NuGet packages your using.

I recommend to:

  1. Update Xamarin and your Xamarin NuGet packages to the latest versions.
  2. Clean (in build menu)
  3. Rebuild (in build menu)
  4. Try again, if it does not work, continue steps:
  5. Update all your Android related installations (using the SDK manager)
  6. Check the paths for JDK, SDK and NDK in Visual Studio => Options => Xamarin
  7. Try again

It could also be, that you are using a third-party NuGet package that is not compatible with your installed versions. Try removing NuGet packages to isolate the problem.

Unfortunately, there could be many things wrong here, but mostly it is related to versions and installations. Hope this helps.

-1

It looks like you're trying to deploy to a device that does not meet the target requirements.

Verify that the version of the device or emulator you're working on is at least what is shown in your Android Build Options.

To troubleshoot any issues, I'd recommend opening the Android SDK Manager and downloading the Build and SDK tools that match the device you're planning to test on, and rebuild your project targeting the new SDK.

2
  • The message is showing right after build project. It wasn't even being deployed on emulator nor device yet Sep 27, 2017 at 12:41
  • Exactly, I'm suggesting a solution to that problem. (not deploying because the device doesn't meet the target framework)
    – Bejasc
    Sep 27, 2017 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.