Mobile head project build issue with nint types #8181
Labels
difficulty/tbd
Categorizes an issue for which the difficulty level needs to be defined.
kind/bug
Something isn't working
triage/untriaged
Indicates an issue requires triaging or verification
Current behavior
I get 2 errors during build of Uno based project.
1> error CS0234: The type or namespace name 'nint' does not exist in the namespace 'System' (are you missing an assembly reference?)
2> error CS7069: Reference to type 'nint' claims it is defined in 'Xamarin.Mac', but it could not be found
Expected behavior
The project should build without any issues.
How to reproduce it (as minimally and precisely as possible)
Core.Universal.zip
Workaround
not known at this moment
Works on UWP/WinUI
No response
Environment
Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia, Uno.UI.RemoteControl / Uno.WinUI.RemoteControl
NuGet package version(s)
All projects are on .net6
Uno.Ui & Uno.Ui.RemoteControl version 4.0.13
Affected platforms
macOS
IDE
Visual Studio 2022
IDE version
Community
Relevant plugins
None
Anything else we need to know?
The errors are from single Mobile head project, and it errors on line# 16220 of BindableMegadata.g.cs, here is code at that line
bindableType.AddProperty("ConversationIdentifier", typeof(global::System.nint), GetConversationIdentifier);
I'm able to build all other head projects in the solution attached.
Microsoft has already announced breaking change in .net 6 for nint types, wanted to know what is fix for this issue
Here are outputs of various commands from my machine:
C:\WINDOWS\system32>dotnet --list-sdks
_> 3.1.416 [C:\Program Files\dotnet\sdk]
C:\WINDOWS\system32>dotnet workload list
_>
The text was updated successfully, but these errors were encountered: