Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable binary logging for MSBuild in Visual Studio 2017

In order to use the binary logging format for MSBuild introduced in MSBuild 15.3, I have to run MSBuild and pass in the /bl command-line argument:

msbuild.exe MySolution.sln /bl

How can I have Visual Studio pass this argument every time I build from within Visual Studio? Or, is there some other way to view the output from within Visual Studio?

like image 902
Zev Spitz Avatar asked Jan 23 '18 11:01

Zev Spitz


People also ask

How do I get the build log in Visual Studio?

To create a build log file for a managed-code projectOn the menu bar, choose Build > Build Solution. In the Output window, click somewhere in the text. Press Ctrl+S. Visual Studio prompts you for a location to save the build output.

How do I get MSBuild command from Visual Studio?

With Visual Studio 2022, it's installed under the Visual Studio installation folder. For a typical default installation on Windows 10, MSBuild.exe is under the installation folder in MSBuild\Current\Bin.

How do I open a Binlog file?

To retrieve a list of all the BinLogs present in your system, make use of the following command: mysql> SHOW BINARY LOGS; This command will display a list of all binary logs present in the system only when the binary log is enabled otherwise, it gives an error.

What is MSBuild command line?

Use MSBuild at a command promptCommand-line options let you set properties, execute specific targets, and set other options that control the build process. For example, you would use the following command-line syntax to build the file MyProj. proj with the Configuration property set to Debug .


1 Answers

Install the Project System Tools (referenced by @MSalters).

Also install the MSBuild Binary and Structured Log Viewer.

The Project System Tools adds a new Build Logging window. When you right-click on entries in the window and choose Open Log..., the log will be opened using the viewer.

like image 156
Zev Spitz Avatar answered Oct 12 '22 17:10

Zev Spitz