You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can see where the problem is here. The constant will get defined correctly during the MSBuild pass when we build the project(s) and get the resulting project files, but then in .GetWorkspace() it passes those project files along with some other rudimentary information to Roslyn but doesn't pass the defined constants.
To get this to work I'll need to make sure any build constants get passed to Roslyn. This is tricky because I can't just pull those right out of the project file - they've got to come from the result of the build since they could get redefined or even based on other constants. I'll start looking into this.
Environment
Steps to reproduce
dotnet run
"buildalyzertest.constants/buildalyzertest.constants" does
ProjectAnalyzerExtensions.GetWorkspace()
Expected Result
it means sandboxproject.X1(surrounded by
DEF1
symbol) is included in Compilation.Assembly.Actual Result
sandboxproject.X1 is not included in Compilation.Assembly.
DEF1
seems to be not defined in compilation.Additionally, do
dotnet build
in sandboxproject by hand and analyze output assembly by dnSpy,sandboxproject.X1 is included in symbols.
The text was updated successfully, but these errors were encountered: