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

report specific missing file during discovery #11654

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

brettfo
Copy link
Contributor

@brettfo brettfo commented Feb 20, 2025

If a required project, props, or targets file is missing or if the casing doesn't match and MSBuild on Linux can't resolve it, report the specific file.

Previously a missing file would cause an error in discovery and nothing would be returned and the empty dependency file set turned into a dependency_file_not_found reporting that no .csproj files were found.

That's not entirely correct so now that specific file is captured and reported. The end result for the user is the same, but this will make log classification easier.

@github-actions github-actions bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label Feb 20, 2025
@brettfo brettfo marked this pull request as ready for review February 20, 2025 22:31
@brettfo brettfo requested a review from a team as a code owner February 20, 2025 22:31
@@ -795,7 +795,7 @@ internal static async Task<ImmutableArray<string>> GetTargetFrameworkValuesFromP
);
return (exitCode, stdOut, stdErr);
});
ThrowOnUnauthenticatedFeed(stdOut);
ThrowOnError(stdOut);
Copy link
Contributor Author

@brettfo brettfo Feb 20, 2025

Choose a reason for hiding this comment

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

This function is a wrapper around ThrowOnUnauthenticatedFeed as well as a bunch of others, including ThrowOnMissingFile.

@randhircs randhircs merged commit b335d8a into main Feb 20, 2025
77 checks passed
@randhircs randhircs deleted the dev/brettfo/nuget-missing-files branch February 20, 2025 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants