Comments (6)
Hmm, looks as if the XML is only partially written. Maybe there was an exception while writing it...
- Can you see if you have this file: C:\Users\rmd\AppData\Local\Microsoft\MSBuildStructuredLog\Log.txt and what's the contents?
- 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...
- 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.
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.
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.
from msbuildstructuredlog.
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?
- 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?
- 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.
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!
from msbuildstructuredlog.
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)
- VisualTreeHelper
- `TreeViewExtensions.OnRequestBringIntoView` NRE HOT 14
- [Avalonia][Mac] Bottom third of window is gigantic
- Evalutation node sort by id HOT 5
- AfterTargets build reason not shown HOT 2
- [Suggestion] Add Command Line Diffing to the CMD preview window.
- Lots of Find in Files results in Dark Theme hangs because of AdonisUI
- Add support for task assembly location HOT 2
- Unexpected exception HOT 1
- MSB4011 could be shown nested in the import tree HOT 3
- ArgumentNullException when running on Ubuntu in GitHub Actions HOT 2
- The Online Log Viewer and VSCode log viewer package do not work with MSBuild 17.9 HOT 8
- Expose TargetBuiltReason on TargetSkipped
- MSBuild BuildCheck timing reporting HOT 3
- Double-write not detected when two Cscs write to the same output .dll simultaneously HOT 1
- A way to exclude skipped targets from search results HOT 2
- Unbounded memory consumption when viewing log files causes system unresponsive / crash HOT 5
- [Suggestion] Allow to add negative searches to narrow down search results HOT 3
- Resuming project ... comment in preprocess text
- Develop a Comprehensive Update Strategy for Chocolatey HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msbuildstructuredlog.