Skip to content

Editor doesn't handle conditional compilation symbol with netstandard or .net core #2733

@natidea

Description

@natidea

From VSFeedback | 484140

Create either a Netstandard or Net Core project and put this code in the class:

#if DEBUG
public static int I = 5;
#else
public static int I = 6;
#endif

Second statement (#else) will be correctly grayed out.
Change configuration to Release.

Expected: first statement is grayed out.

Actual: second is still grayed out.

Note: Sometimes it picks the change but then gets stuck again to that. Compiler works properly.

In general these changes are not reflected in the editor until you reload the project.

Metadata

Metadata

Assignees

Labels

Feature-Language-ServicePopulating the Roslyn workspace with references, source files, analyzers, etc
No fields configured for Feature.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions