Skip to content

@(NativeReference) does nothing in .NET 6 #11061

@mattleibow

Description

@mattleibow

Steps to Reproduce

  1. Create a new .NET 6 iOS app (I used HelloiOS from the net6 samples)
  2. Add a <NativeReference Include="..." Kind="Framework" /> to the project
  3. Compile
  4. Observe an error ld: framework not found libSkiaSharp

I originally noticed this with Mac Catalyst and then went to try iOS.

Expected Behavior

App compiles and runs. I have a classic Xamarin.iOS app and that ran fine.

I did notice that I had an issue when I used a relative path to the framework in that, but that is another issue and solvable with the $(MSBuildThisFileDirectory).

Actual Behavior

Build error and I also noticed that it did not get the framework in the Frameworks folder in the .app

Environment

.NET 6 SDK: `6.0.100-preview.2.21155.3`
iOS SDK: `14.4.100-ci.main.1192`

Build Logs

msbuild.binlog.zip

Example Project (If Possible)

Archive.zip

Metadata

Metadata

Assignees

Labels

bugIf an issue is a bug or a pull request a bug fix

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions