You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error message for bad XML is missing the filename, line, and column location that it used to have.
I suspect this is due to the changes in #1004 (the XmlTextReader we're using no longer knows the path of the file, because we're giving it a stream instead.
S:\work\1244940>\msbuild\bin\Bootstrap\15.0\Bin\MSBuild.exe pE.proj
Microsoft (R) Build Engine version 15.1.0.0
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 10/31/2016 11:14:10 AM.
Project "S:\work\1244940\pE.proj" on node 1 (default targets).
MSBUILD : error MSB4025: The project file could not be loaded. '[' is an unexpected token. The expected token is '"' or '''. Line 4, position 26. [S:\work\1244940\pE.proj]
Done Building Project "S:\work\1244940\pE.proj" (default targets) -- FAILED.
Build FAILED.
"S:\work\1244940\pE.proj" (default target) (1) ->
MSBUILD : error MSB4025: The project file could not be loaded. '[' is an unexpected token. The expected token is '"' or '''. Line 4, position 26. [S:\work\1244940\pE.proj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.23
MSBuild 14:
S:\work\1244940>MSBuild.exe pE.proj
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 10/31/2016 11:14:39 AM.
Project "S:\work\1244940\pE.proj" on node 1 (default targets).
S:\work\1244940\pE.proj(4,26): error MSB4025: The project file could not be loaded. '[' is an unexpected token. The expected token is '"' or '''. Line 4, position 26.
Done Building Project "S:\work\1244940\pE.proj" (default targets) -- FAILED.
Build FAILED.
"S:\work\1244940\pE.proj" (default target) (1) ->
S:\work\1244940\pE.proj(4,26): error MSB4025: The project file could not be loaded. '[' is an unexpected token. The expected token is '"' or '''. Line 4, position 26.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.02
The text was updated successfully, but these errors were encountered:
When dotnet#1004 moved the standard XML reading approach to be stream-based
rather than file-based, the exceptions thrown on malformed XML
changed--System.Xml no longer knows the path, so it isn't included in the
XmlException. That caused MSBuild to fail to report the location of the
XML error in a nice way as it had done before.
Almost every case where we constructed a BuildEventFileInfo object already
had access to the full path, so I added a constructor that accepted that
as an argument and overrides the possibly-empty path returned from
XmlException.SourceUri.
Fixesdotnet#1286.
When #1004 moved the standard XML reading approach to be stream-based
rather than file-based, the exceptions thrown on malformed XML
changed--System.Xml no longer knows the path, so it isn't included in the
XmlException. That caused MSBuild to fail to report the location of the
XML error in a nice way as it had done before.
Almost every case where we constructed a BuildEventFileInfo object already
had access to the full path, so I added a constructor that accepted that
as an argument and overrides the possibly-empty path returned from
XmlException.SourceUri.
Added a unit test to verify that the information is indeed preserved in the exception.
Fixes#1286.
The error message for bad XML is missing the filename, line, and column location that it used to have.
I suspect this is due to the changes in #1004 (the
XmlTextReader
we're using no longer knows the path of the file, because we're giving it a stream instead.Expected and actual output
Current:
MSBuild 14:
The text was updated successfully, but these errors were encountered: