Skip to content
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

Skip elements with false conditions during evaluation #70496

Merged
merged 6 commits into from
Oct 25, 2023

Conversation

dibarbet
Copy link
Member

Issue was that a specific item group had a condition to prevent an empty property. Inside the item group, it used [MSBuild]::VersionEquals which cannot handle an empty value.

However, evaluation was attempting to evaluate it anyway - which threw an error causing the project to fail to load.

This changes evaluation to skip item groups with false conditions.

DRAFT - confirming with msbuild if this property should always be set on evaluation

Resolves dotnet/vscode-csharp#6356

This fixes issues in some projects where the evaluation of the element
will fail if the condition does not hold
@dibarbet dibarbet requested a review from a team as a code owner October 20, 2023 19:21
@dibarbet dibarbet marked this pull request as draft October 20, 2023 19:21
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 20, 2023
Copy link
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I can sign off on this one, in the sense that people smarter than I would know the real questions to ask.

@dibarbet dibarbet merged commit 52499c7 into dotnet:main Oct 25, 2023
22 of 24 checks passed
@ghost ghost added this to the Next milestone Oct 25, 2023
@dibarbet dibarbet deleted the fix_evaluation_skip branch October 25, 2023 06:28
@jjonescz jjonescz modified the milestones: Next, 17.9 P1 Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Compilation options cannot be null for C#/VB project" when running in Codespaces
3 participants