-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Return false if there are no sources #9208
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YuliiaKovalova
approved these changes
Sep 13, 2023
rainersigwald
approved these changes
Sep 25, 2023
Co-authored-by: Rainer Sigwald <[email protected]>
bulatgrzegorz
pushed a commit
to bulatgrzegorz/selective-condition-evaluator
that referenced
this pull request
Oct 16, 2023
…net#9208) Fixes dotnet#9199 by avoiding an unhandled exception: ``` "C:\temp\testgenres\project.proj" (default target) (1) -> MSBUILD : error : This is an unhandled exception in MSBuild -- PLEASE UPVOTE AN EXISTING ISSUE OR FILE A NEW ONE AT https://aka.ms/msbuild/unhandled [C:\temp\testgenres\project.proj] MSBUILD : error : Microsoft.Build.Framework.InternalErrorException: MSB0001: Internal MSBuild Error: There should be resource files to process [C:\temp\testgenres\project.proj] MSBUILD : error : at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Exception innerException, Object[] args) [C:\temp\testgenres\project.proj] MSBUILD : error : at Microsoft.Build.Tasks.GenerateResource.TransformResourceFilesUsingResGen(List`1 inputsToProcess, List`1 outputsToProcess) [C:\temp\testgenres\project.proj] MSBUILD : error : at Microsoft.Build.Tasks.GenerateResource.GenerateResourcesUsingResGen(List`1 inputsToProcess, List`1 outputsToProcess) [C:\temp\testgenres\project.proj] MSBUILD : error : at Microsoft.Build.Tasks.GenerateResource.Execute() [C:\temp\testgenres\project.proj] ```
This was referenced Jul 29, 2025
Closed
Closed
This was referenced Oct 15, 2025
Closed
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #9199
Context
The unhandled exception is from https://github.com/dotnet/msbuild/blob/3c910ba83fc9dbd8e12f50dddc8c381404f928c4/src/Tasks/GenerateResource.cs#L1132C13-L1133. But when source is not found and has errors, it should return false in Execute function.
Changes Made
Return false if there are no valid sources found.
Testing
Add a unit test case.

Notes