You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I create a fresh Cocoa project in Visual studio Mac and add SkiaSharp and SkiaSharp.View, everything works ok. By default mac apps are set to "Xamarin.Mac Modern" framework.
But when I edit the project, General, and change "target framework" to "Xamarin.Mac Full", then it can't find namespace.
SkiaSharp.Views.Mac
Is there something I can do to get this working?
Code
// can't find namespace SkiaSharp.Views.Mac;
using SkiaSharp.Views.Mac;
Expected Behavior
It should find the namespace SkiaSharp.Views.Mac
The issue still happens even if I re-add the nuget package.
The reason this bug shows is that when you select the full framework option, the app actually "transitions" from a "mac app" to a ".net framework app" and NuGet does not know that this particular app is actually both a "mac app" AND a "framework app".
A workaround would be to do one of two things:
use packages.config and then change the HintPath to the Xamarin.Mac version
don't reference the SkiaSharp.Views package, and manually add a reference to SkiaSharp.Views.Mac.dll
There has been an issue that has been opened, closed, reopened and eventually locked with a few PRs. But, not to be outdone, I have created a new PR that hopefully gets this in: NuGet/NuGet.Client#2572
This is not the greatest situation right now, but hopefully after this is merged, we can all be happy coders!
I have not had the opportunity to test this, but it seems we have a new option to turn macOS apps into real macOS apps: NuGet/NuGet.Client#2572 (comment)
Basically, you can add <MigrateToNewXMIdentifier>true</MigrateToNewXMIdentifier> in your project.
Description
If I create a fresh Cocoa project in Visual studio Mac and add SkiaSharp and SkiaSharp.View, everything works ok. By default mac apps are set to "Xamarin.Mac Modern" framework.
But when I edit the project, General, and change "target framework" to "Xamarin.Mac Full", then it can't find namespace.
SkiaSharp.Views.Mac
Is there something I can do to get this working?
Code
// can't find namespace SkiaSharp.Views.Mac;
using SkiaSharp.Views.Mac;
Expected Behavior
It should find the namespace SkiaSharp.Views.Mac
The issue still happens even if I re-add the nuget package.
Actual Behavior
It doesn't find SkiaSharp.Views.Mac.
Basic Information
Screenshots
Reproduction Link
The text was updated successfully, but these errors were encountered: