Skip to content

Conversation

@AndriySvyryd
Copy link
Member

Fixes #35638

Description
Microsoft.CodeAnalysis.Workspaces.MSBuild looks for the build host in the user's project, but it's not present as by default content is not transitively used from NuGet packages. This PR fixes that and adds more diagnostic information on MSBuild workspace failures. MSBuildLocator usage is also removed as it's no longer needed with the current version of Microsoft.CodeAnalysis.Workspaces.MSBuild.

Customer impact
Customers using Microsoft.EntityFrameworkCore.Tasks to precompile queries will get an exception on build/publish. The only workaround is to use other tools instead.

How found
Found during validation.

Regression
Yes, from EF 9.0.x

Testing
Tested manually.

Risk
Low, the code change only affects the broken scenario.

@AndriySvyryd AndriySvyryd requested a review from artl93 September 4, 2025 01:59
@AndriySvyryd AndriySvyryd requested a review from a team as a code owner September 4, 2025 01:59
Copy link
Member

@artl93 artl93 left a comment

Choose a reason for hiding this comment

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

RC2. core scenario. I am curious if the the lack of the build parameter would be considered a breaking change if the build now works differently or could fail in CI if provided without the command line being supported?

@AndriySvyryd
Copy link
Member Author

I am curious if the lack of the build parameter would be considered a breaking change if the build now works differently or could fail in CI if provided without the command line being supported?

If the user uses Microsoft.CodeAnalysis.Workspaces.MSBuild directly that might be the case, but if it's just through the tasks that we provide it shouldn't be any different compared to EF 9.

Add more diagnostic information on MSBuild workspace failure
Remove MSBuildLocator usage as it's no longer needed

Fixes #35638
@AndriySvyryd AndriySvyryd reopened this Sep 5, 2025
@AndriySvyryd AndriySvyryd enabled auto-merge (squash) September 5, 2025 01:27
@AndriySvyryd AndriySvyryd merged commit 75fb0b8 into release/10.0 Sep 5, 2025
8 checks passed
@AndriySvyryd AndriySvyryd deleted the Issue35638 branch September 5, 2025 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[preview1] NAOT with msbuild integration doesn't work

3 participants