Skip to content

Commit

Permalink
Fix binlogs not available for design time builds
Browse files Browse the repository at this point in the history
VS Mac was changed so that design time builds when run about the
same time use a single temporary build session. This meant the
project system tools extension's attempt to set a custom binlog
path would not work.

Fix this by changing all msbuild operations to be treated as long
operations instead of short operations. This prevents a shared
temporary build session being used and allows the custom binlog path
set by the project system tools extension to work. Whilst this may
slow down the builds, and mean they are run slightly differently,
having the binlogs created separately for each design time build
is more useful.
  • Loading branch information
mrward committed Apr 1, 2023
1 parent 2a1b7bb commit 3fb7cdf
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ public ProgressMonitor GetProgressMonitor (ProgressMonitor monitor)
// Generate a bin log file.
context.BinLogFilePath = buildTarget.BinLogFileName;

// Ensure that a binlog is generated by using a LongOperations.
// ShortOperations run in a temporary build session and share a single
// binlog which is not supported by project system tools. Using
// LongOperations ensures a binlog is created for each msbuild target.
context.BuilderQueue = BuilderQueue.LongOperations;

progressMonitor = new MSBuildTargetProgressMonitor (buildTarget.LogFileName);
aggregatedMonitor.AddFollowerMonitor (progressMonitor, progressMonitor.Actions);

Expand Down

0 comments on commit 3fb7cdf

Please # to comment.