Skip to content

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

@jeromelaban

Description

@jeromelaban

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    need-attentionAn issue requires our attention/response

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions