question

MarcGeorge-8094 avatar image
0 Votes"
MarcGeorge-8094 asked ajkuma-MSFT edited

Azure Notifications CLS Compliance

Why are the following classes not CLS compliant?

1>Z:\IC\VS2022\SentryServices-Dev\WWW\AsyncNotifications.cs(49,83,49,105): warning CS3001: Argument type 'AppleNotification' is not CLS-compliant
1>Z:\IC\VS2022\SentryServices-Dev\WWW\AsyncNotifications.cs(59,81,59,102): warning CS3001: Argument type 'FcmNotification' is not CLS-compliant
1>Z:\IC\VS2022\SentryServices-Dev\WWW\NotificationHandler.cs(18,91,18,97): warning CS3001: Argument type 'WindowsNotification' is not CLS-compliant
1>Z:\IC\VS2022\SentryServices-Dev\WWW\NotificationHandler.cs(39,89,39,101): warning CS3001: Argument type 'AppleNotification' is not CLS-compliant
1>Z:\IC\VS2022\SentryServices-Dev\WWW\NotificationHandler.cs(60,87,60,99): warning CS3001: Argument type 'FcmNotification' is not CLS-compliant

dotnet-csharpdotnet-runtimedotnet-aspnet-generalvs-debuggingvs-msbuild
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Apologies for the delay in responding here.

To better assist you on this, when exactly do you receive these errors/warnings? Is your issue confined only to Azure Notification projects/classes? Could you please share more details about your scenario?

Typically, a class or interface is marked as <CLSCompliant(True)> when it derives from or implements a type that is marked as <CLSCompliant(False)> or is not marked.

Kindly see if C# library itself is marked with CLSCompliant.Checkout this discussion thread.
Mark your assembly with the CLSCompliant attribute if you intend to provide language interoperability.

PS: I have also added additional tags to receive insights from the targetted community experts.

0 Votes 0 ·

The warnings are issued at the beginning of output during a build. The build is during a debug publish to an Azure app service; a release publish is not possible at this time.

Given "Do keep in mind that CLS compliance is an outdated concept, it stopped being relevant when .NET 2.0 was released. " in the reference you gave me, it appears that I should just ignore the warnings.

0 Votes 0 ·

0 Answers