0

Installing Refit in Xamarin MvvmCross Profile 111 .NetPortable 4.5

Severity    Code    Description Project File    Line    Suppression State Error Could not install package 'Refit 4.0.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.    0

Issued in Refit Issue #376

The docs did say

Refit currently supports the following platforms and any .NET Standard 1.4 target:

  • UWP
  • Xamarin.Android
  • Xamarin.Mac
  • Xamarin.iOS
  • Desktop
  • .NET 4.5
  • .NET Core

Have I missed something?

david
  • 2,900
  • 5
  • 28
  • 48

2 Answers2

1

You are installing Refit 4 into a PCL. Refit is a NET Standard 1.4 library which cannot be consumed by any PCL profile.

Upgrade your PCL to NET Standard (minimum 1.4) or downgrade Refit to a previous version which was not NET Standard.

Cheesebaron
  • 24,131
  • 15
  • 66
  • 118
  • actually I used 2.4.1 but Im having issue with [System.NotImplementedException: You've somehow included the PCL version of Refit in your app. You need to use the platform-specific version!](https://stackoverflow.com/q/46453218/3974048) – david Sep 28 '17 at 15:07
  • I also tried platform specific refit, but I referenced the core which also has refit installed, so does this mean that the referenced refit is used in each platform? Correct me if im wrong please – david Sep 28 '17 at 15:08
  • That is a different problem from what you have asked in the opening post. – Cheesebaron Sep 28 '17 at 15:10
  • Yes anyway thanks for the answer. I do think also that I need to upgrade my PCL to Net Standard. Is there any side effects upgrading? – david Sep 28 '17 at 15:16
0

I built the .Net Core app using Angular CLI, I stopped the dotnet watch run and re-executed the scaffolding (which was causing this build error) and it worked fine with no error

HuzefaJtg
  • 101
  • 1
  • 2