-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Provide MSB5009 error with project's name and it's GUID #5835
Merged
rainersigwald
merged 8 commits into
dotnet:master
from
BartoszKlonowski:enhance-MSB5009-nested-project-error
Nov 20, 2020
Merged
Provide MSB5009 error with project's name and it's GUID #5835
rainersigwald
merged 8 commits into
dotnet:master
from
BartoszKlonowski:enhance-MSB5009-nested-project-error
Nov 20, 2020
Commits on Oct 23, 2020
-
Add Project's name and it's GUID to MSB5009 error
The MSB5009 - SolutionParseNestedProjectError has been printed for a certain project but without specifying the project's name or even GUID which was making this issue difficult to debug. To make it more developer/user friendly, the MSB5009 error has been provided with the invalid project's name and GUID embedded in the error message. Message is extended by string arguments separate for ProjectName and ProjectGUID, so from now on it's required to add them as a BuildEventFileInfo constructor arguments. NOTE: Though error message is automaticaly generated for each language, some are still not translated.
Configuration menu - View commit details
-
Copy full SHA for 8f8ab62 - Browse repository at this point
Copy the full SHA 8f8ab62View commit details -
Separate original MSB5009 error message from the extended one
The extended MSB5009 error message requires ProjectName and ProjectGuid as arguments otherwise raw "{0}" will be displayed to the console in case of error. The MSB5009 error messsage is used in other places than the one covered in the extension implementation, so each place using this error has to be covered with the changes. NOTE: The only exception is the SolutionFile.ParseNestedProjects() method which uses the MSB5009 error too, but at the point of calling this error, there are no project's name nor GUID available to display, so it should continue to use the original error message string. To make it possible: - the original error string has been kept, - while the extended one has been renamed to "SolutionParseNestedProjectErrorWithNameAndGuid" to indicate it's extended content and required arguments Leaving the MSB5009 error message in the original form for SolutionFile.ParseNestedProject() method doesn't mean that no information will be given to developer/user. Note that it already calls the BuildEventFileInfo constructor with full path and current line's number, which will ease the debugging in case of having MSB5009 error.
Configuration menu - View commit details
-
Copy full SHA for 47d7b68 - Browse repository at this point
Copy the full SHA 47d7b68View commit details
Commits on Oct 26, 2020
-
Cover additional MSB5009 error variant with unit test
New unit test covering the enhanced MSB5009 error checks whether: - MSB5009 error is thrown for incorrectly nested project in solution - error contains the name of incorrectly nested project - error contains the GUID of incorrectly nested project NOTE: The solution file used for this unit test is the original solution file given as an example of the original error which these changes fix. Please see: dotnet#4835
Configuration menu - View commit details
-
Copy full SHA for d4b06f4 - Browse repository at this point
Copy the full SHA d4b06f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for ec745ef - Browse repository at this point
Copy the full SHA ec745efView commit details
Commits on Nov 6, 2020
-
Update src/Shared/Resources/Strings.shared.resx
Co-authored-by: Rainer Sigwald <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3190d77 - Browse repository at this point
Copy the full SHA 3190d77View commit details -
Configuration menu - View commit details
-
Copy full SHA for e46164e - Browse repository at this point
Copy the full SHA e46164eView commit details
Commits on Nov 13, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 2fd13bc - Browse repository at this point
Copy the full SHA 2fd13bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 81b0bcb - Browse repository at this point
Copy the full SHA 81b0bcbView commit details
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.