Description
The ExperimentalAttribute
on a class in a C# library causes expected errors in C# consumer projects.
But this attribute seems to be ignored in F# consumer projects.
Repro steps
Please see the attached solution with 3 projects
2025-01-03-0427-ExperimentalAttribute.zip
MyLib
, the library withClass1
withExperimentalAttribute
MyAppCSharp
, the C# project usingClass1
MyAppFSharp
, the F# project usingClass1
Expected behavior
Compiling both MyAppCSharp
and MyAppFSharp
should cause the error
MY001 'MyLib.Class1' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
Actual behavior
MyAppFSharp
compiles with no errors or warnings.
(C# project shows the error as expected)
Known workarounds
None.
Related information
- Windows 11
- .NET 9.0
- Visual Studio Community 2022 (64-bit) 17.12.3
Metadata
Metadata
Assignees
Type
Projects
Status
New