sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Corehost ouputs lots of `A JSON parsing exception occurred` errors with no diagnostic info

Open pakrym opened this issue 10 years ago • 6 comments

Looks like it gets exception parsing sdk version but error message itself is not helping at all. Doesn't show neither what error is, or what file it tries to parse.

Run target: build-compile
[09:05:01]Exec
[09:05:01]  program: dotnet
[09:05:01]  commandline: pack  src/Microsoft.Extensions.PlatformAbstractions --configuration Release
[09:05:01]  workingdir: /Users/asplab/buildAgent/work/169923259d6dcfec/Universe/PlatformAbstractions
[09:05:01]A JSON parsing exception occurred
[09:05:03]Compiling Microsoft.Extensions.PlatformAbstractions for .NETFramework,Version=v4.5.1
[09:05:03]A JSON parsing exception occurred
[09:05:10]
[09:05:10]Compilation succeeded.
[09:05:10]    0 Warning(s)
[09:05:10]    0 Error(s)
[09:05:10]
[09:05:10]Time elapsed 00:00:07.7260358
[09:05:10] 
[09:05:10]
[09:05:10]Compiling Microsoft.Extensions.PlatformAbstractions for .NETStandard,Version=v1.3
[09:05:10]A JSON parsing exception occurred
[09:05:16]
[09:05:16]Compilation succeeded.
[09:05:16]    0 Warning(s)
[09:05:16]    0 Error(s)
[09:05:16]
[09:05:16]Time elapsed 00:00:05.7872791
[09:05:16] 

/cc @schellap @davidfowl @pranavkm

pakrym avatar Mar 29 '16 16:03 pakrym

I am seeing the same thing from VS with 1.0.0.002117 when running dotnet build on a new web project.

` "C:\Program Files\dotnet\dotnet.exe" build "c:\Users\billhie\Documents\projects\WebApplication26\src\WebApplication26" --configuration Debug --no-dependencies --build-base-path "c:\Users\billhie\Documents\projects\WebApplication26\artifacts" --no-incremental A JSON parsing exception occurred Compiling WebApplication26 for .NETStandardApp,Version=v1.5 A JSON parsing exception occurred

Compilation succeeded. 0 Warning(s) 0 Error(s)

Time elapsed 00:00:03.0791203 (The compilation time can be improved. Run "dotnet build --build-profile" for more information) `

Another issue for VS, is that the json exceptions are being sent to stderr, so in addition to there being no information on the source of the error, VS fails the build as the msbuild task which calls dotnet build assumes messages sent to stderr are errors.

BillHiebert avatar Mar 30 '16 20:03 BillHiebert

Is it possible to see what the line endings are in Windows?

schellap avatar Mar 30 '16 21:03 schellap

File name is still not displayed after latest fix.

pakrym avatar Mar 31 '16 15:03 pakrym

Is this the BOM issue?

gkhanna79 avatar Apr 01 '16 05:04 gkhanna79

Fixed, closing..

schellap avatar Apr 01 '16 17:04 schellap

Fixed by dotnet/cli#2186

schellap avatar Apr 04 '16 18:04 schellap