Giter Site home page Giter Site logo

Comments (6)

KirillOsenkov avatar KirillOsenkov commented on August 20, 2024

Hmm, looks as if the XML is only partially written. Maybe there was an exception while writing it...

  1. Can you see if you have this file: C:\Users\rmd\AppData\Local\Microsoft\MSBuildStructuredLog\Log.txt and what's the contents?
  2. In Event Viewer, Windows Logs -> Application, can you look for recent errors like 1026? It's unlikely that the process crashed, but just in case...
  3. Can you try using the command line and see if it works then?
msbuild solution.sln /t:Rebuild /v:diag /noconlog /logger:StructuredLogger,C:\MSBuildStructuredLog\bin\Debug\StructuredLogger.dll;buildlog1.xml

Substitute the path to your solution.sln and the StructuredLogger.dll (likely found at C:\Users\rmd\AppData\Local\MSBuildStructuredLogViewer\app-1.0.46\StructuredLogger.dll)

Ideally if you have time, clone the source, nuget restore, open MSBuildStructuredLog.sln, set the StructuredLogger project as startup, go to project properties, configure command line arguments, enable first-chance exceptions and debug through it. There'll likely be an exception that abruptly interrupts the log while it's being written.

Sorry about the trouble!

from msbuildstructuredlog.

KirillOsenkov avatar KirillOsenkov commented on August 20, 2024

I've just published an update that includes more error logging. Can you update the app to 1.0.49 by restarting it, then try again?

Look for C:\Users\rmd\AppData\Local\Microsoft\MSBuildStructuredLog\LoggerExceptions.txt

from msbuildstructuredlog.

bitdozer avatar bitdozer commented on August 20, 2024

I couldn't find the log files you referenced, so I had uninstalled and reinstalled. When I reinstalled, I got 1.0.49 as an update.

Now the UI-based build does work!

However, with a command line build, which succeeds, I still get the same error when I try to open the resulting buildlog1.xml.

Issued this command from VS2015 prompt in my documents directory.

msbuild "C:\Users\rmd\Documents\Visual Studio 2015\Projects\ConsoleApplication2\ConsoleApplication2.sln" /t:Rebuild /v:diag /noconlog /logger:StructuredLogger,C:\Users\rmd\AppData\Local\MSBuildStructuredLogViewer\app-1.0.49\StructuredLogger.dll;buildlog1.xml

Completed build without errors, but opening log in MSBuildStructuredLogViewer throws original error. Results attached.

Checked Event Viewer. Nothing related.

With a UI-based build (which works), I don't find this file:

C:\Users\rmd\AppData\Local\Microsoft\MSBuildStructuredLog\Log.txt

That only contains logs from my command line build plus the RecentProjects.txt file.

The build log from the successful UI-based build says it should be in C:\Users\rmd\AppData\Local\Temp, but it never appears there, even though the UI does populate with the treeview correctly.

MSBuildStructuredLogLogs.zip

from msbuildstructuredlog.

KirillOsenkov avatar KirillOsenkov commented on August 20, 2024

Thanks! The XML log writer is interrupted while writing the content of your PATH environment variable:

    <Property Name="NUMBER_OF_PROCESSORS">8</Property>
    <Property Name="OS">Windows_NT</Property>
    <Property Name="Path">

Can I ask you for a few more things?

  1. If you pass a 1.buildlog log file name instead of buildlog1.xml:
msbuild "C:\Users\rmd\Documents\Visual Studio 2015\Projects\ConsoleApplication2\ConsoleApplication2.sln" /t:Rebuild /v:diag /noconlog /logger:StructuredLogger,C:\Users\rmd\AppData\Local\MSBuildStructuredLogViewer\app-1.0.49\StructuredLogger.dll;1.buildlog

and send me that 1.buildlog?

  1. Send me the value of your PATH environment variable - it probably has some weird characters in it?

You can e-mail this info to me because it might contain sensitive info: kirillo at microsoft.

Thanks for looking into this! We're getting close.

For now if you use the new binary format (.buildlog) instead of the XML format (.xml) then everything should work fine. But I'd still like to fix the XML writer.

from msbuildstructuredlog.

bitdozer avatar bitdozer commented on August 20, 2024

Based on this, I looked at my PATH in a hex editor, and indeed the system path currently contains an ESC character!

I will send you the files, but for anyone else reading...

Logging to .buildlog works and displays correctly in the UI
Removing the offending characters from the system path fixes the issue with .xml build log as well

Mystery solved.

Thank you!

2016-06-15_16-31-17

from msbuildstructuredlog.

KirillOsenkov avatar KirillOsenkov commented on August 20, 2024

Ah! Awesome. That explains why the binary logger worked, it can tolerate any junk in the string, while XML probably chokes on the ESC.

You've helped me harden the logger against these kinds of things, thanks!

from msbuildstructuredlog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.