Skip to content

[net7] Creating a cross-targeted net7.0-ios + net6.0-ios packages forces consumers to build with net7 workloads #30103

@rolfbjarne

Description

@rolfbjarne

From @jeromelaban on Mon, 31 Oct 2022 14:18:39 GMT

Creating a cross-targeted net7.0-ios + net6.0-ios packages forces consumers to build with net7 workloads, causing dependents on net6.0 to fail building with the following message:

CSC : error CS1705: Assembly 'Uno.UI' with identity 'Uno.UI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'
uses 'Microsoft.iOS, Version=16.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' which 
has a higher version than referenced assembly 'Microsoft.iOS' with identity 'Microsoft.iOS, Version=15.4.300.0, 
Culture=neutral, PublicKeyToken=84e04ff9cfb79065'

This means that any library author currently cannot build packages for net6.0 and net7.0 without resorting to manual package authoring and multi-builds with global.json modifications.

Steps to Reproduce

  1. Install .NET 6.0.40x with ios workload
  2. Install .NET 7 RC2 with ios workload
  3. Create an empty library
  4. Pack for <TargetFrameworks>net6.0-ios;net7.0-ios</TargetFramework>

Expected Behavior

net6.0-ios binaries reference Microsoft.iOS 15.4.300.x

Actual Behavior

The net6.0-ios binaries reference Microsoft.iOS 16.0.x

Environment

.NET 7.0 RC2 with workloads (VS 17.4 Preview 5)

Build Logs

I can provide those as needed.

As needed.

Example Project (If Possible)

Copied from original issue dotnet/macios#16524

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions