Repository navigation
Commit 4f6355e
authored
Handle null ProjectFile in InvalidProjectFileException (#13179)
The internal InvalidProctFileException constructor accepts an existing
InvalidProjectFileException object as a parameter. It passes the
ProjectFile property from that passed in object to another constructor
that then verifies that projectFile is not null.
Whenever an InvalidProjectFileException object is passed in that has a
null projectFile (which is possible via the public ctors), an
ArgumentNullException gets thrown and hides real errors.
The object gets passed to the internal ctor here:
https://github.com/dotnet/msbuild/blob/8bd4d54903169f7e515f8a32e20190b340a295c9/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs#L923
Fix this by passing "MSBUILD" as a string in whenever projectFile is
null.
Fixes #131501 parent 3fbe376 commit 4f6355e
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
0 commit comments