-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make CompilationOptions.MetadataImportOptions public. #24468
Conversation
@dotnet/roslyn-compiler Please review |
@dotnet/roslyn-compiler Please review |
/// Specifies whether to import members with accessibility other than public or protected by default. | ||
/// Default value is <see cref="MetadataImportOptions.Public"/>. The value specified is not going to | ||
/// affect correctness of analysis performed by compilers because all members needed for correctness | ||
/// are going to be imported regadless. This setting can force compilation to import members that it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regadless [](start = 37, length = 9)
Typo s/regadless/regardless/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I am fairly certain this does not work with VBCSCompiler.exe, which compiles C# projects. I am creating a Roslyn Diagnostic Analyzer, below is a snippet of the relevant code.
When I debug the process I can see the MetadataImportOptions value does not change when SetMetadataImportOptions is called. When I use reflection to set the MetadataImportOptions, everything works. Is this behavior expected? I am running Visual Studio 2017 version 15.7.5 and Microsoft.CodeAnalysis.CSharp.Workspaces version 2.8.2 |
Fixes #6748.