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

Add line/column information to invalid project exception #11232

Conversation

YuliiaKovalova
Copy link
Member

@YuliiaKovalova YuliiaKovalova commented Jan 7, 2025

Fixes ##11156

Context

Due to serializer.OpenAsync(FullPath, CancellationToken.None).Result; usage, AggregateException was thrown with full callstack attached without location information:
{82D7BB4A-77B4-4AE5-8997-48E4F943A72B}

Changes Made

Switch to .GetAwaiter().GetResult(); to preserve original SolutionException that contains ElementLocation data.
image

Testing

Manual.

@YuliiaKovalova YuliiaKovalova changed the title Add line/column information to invalid project expection Add line/column information to invalid project exception Jan 7, 2025
Copy link
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

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

Thank you!

src/Build/Construction/Solution/SolutionFile.cs Outdated Show resolved Hide resolved
@YuliiaKovalova YuliiaKovalova enabled auto-merge (squash) January 7, 2025 13:44
@YuliiaKovalova YuliiaKovalova merged commit b497794 into dotnet:main Jan 7, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants