Cannot add reference a Xamarin.iOS.Library into Xamarin.Forms.iOS project

Sonic3RSonic3R Member ✭✭
edited November 2019 in Xamarin.iOS

I have two solutions: one with common stuff for iOS and other the Xamarin UI. I use Xamarin.Forms 4.3.0.991211.

In common solution, I create a Xamarin.iOS.Library type, and then I publish it as nuget package. The publishing is done from Azure DevOps pipeline using Xamarin.iOS build step:

- task: [email protected]
  displayName: 'Build Xamarin.iOS solution MySolution.sln'
  inputs:
    solutionFile: MySolution.sln
    configuration: '$(BuildConfiguration)'
    packageApp: false
    runNugetRestore: true

In Xamarin Forms, in the second solution, where I have Forms, iOS and UWP.
I tried to install on iOS project that package created above but I got error:

Error NU1202 Package mycommon.ios.1.0.0-beta is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win-x64. Package > mycommon.ios.1.0.0-beta supports: net (.NETFramework,Version=v0.0) MyApp.iOS C:...\MyApp\MyApp.iOS\MyApp.iOS.csproj 1

Error NU1202 Package mycommon.ios.1.0.0-beta is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win. Package > mycommon.ios.1.0.0-beta supports: net (.NETFramework,Version=v0.0) MyApp.iOS C:...\MyApp\MyApp.iOS\MyApp.iOS.csproj 1

Error NU1202 Package mycommon.ios.1.0.0-beta is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win-x86. Package
mycommon.ios.1.0.0-beta supports: net (.NETFramework,Version=v0.0) MyApp.iOS C:...\MyApp\MyApp.iOS\MyApp.iOS.csproj 1

Error NU1202 Package mycommon.ios.1.0.0-beta is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0). Package mycommon.ios.1.0.0-beta > supports: net (.NETFramework,Version=v0.0) MyApp.iOS C:...\MyApp\MyApp.iOS\MyApp.iOS.csproj 1

Why ? What should fix ? Where is the issue ?

Sign In or Register to comment.