dotnet / dotnet/macios

No build warnings when using deprecated NSBezelStyles

Open
#23,929 1 comment 0 reactions 0 assignees View on GitHub
dotnet-external-dependency
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 12h
Merged PRs (30d)
123

Description

### Apple platform

macOS

### Framework version

net9.0-macos26.0

### Affected platform version

.NET 9.0.9

### Description

Many values of the `NSBezelStyle` enum are deprecated, but there are no warnings in the IDE or when building.
According to the Apple docs, some enums are deprecated since 10.14, other are (or will be) deprecated with macOS 26.1.

The enum values also seem to have `UnsupportedOSPlatform` attributes on them, but they don't work?

I am currently using net9.0-macos26.0 with Xcode 26, but I think the issue was present before with Xcode 16.4 also

### Steps to Reproduce

```
var btn = new NSButton();
// https://developer.apple.com/documentation/appkit/nsroundeddisclosurebezelstyle
btn.BezelStyle = NSBezelStyle.RoundedDisclosure;
// https://developer.apple.com/documentation/appkit/nsbutton/bezelstyle-swift.enum/inline?language=objc
btn.BezelStyle = NSBezelStyle.Inline;
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.