Skip to content

fix(cli): ignore msbuild binlog files #14621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "fix(cli): ignore msbuild binglog files",
"packageName": "@react-native-windows/cli",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "fix(vnext-templates): update gitignore for MS Build logs",
"packageName": "react-native-windows",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import fs from '@react-native-windows/fs';
import path from 'path';
import child_process from 'child_process';
import chalk from 'chalk';
import os from 'os';
import shell from 'shelljs';
import Version from './version';
import * as checkRequirements from './checkRequirements';
Expand Down Expand Up @@ -93,16 +92,16 @@ export default class MSBuildTools {
newInfo(`Build platform: ${buildArch}`);

const verbosityOption = verbose ? 'normal' : 'minimal';
const defaultLogDirectory = path.dirname(slnFile);
const logPrefix = path.join(
buildLogDirectory || os.tmpdir(),
buildLogDirectory || defaultLogDirectory,
`msbuild_${process.pid}_${target}`,
);

const errorLog = logPrefix + '.err';
const warnLog = logPrefix + '.wrn';

const localBinLog = target === 'build' ? '' : ':deploy.binlog';
const binlog = buildLogDirectory ? `:${logPrefix}.binlog` : localBinLog;
const binlog = `:${logPrefix}.binlog`;

const args = [
`/clp:NoSummary;NoItemAndPropertyList;Verbosity=${verbosityOption}`,
Expand Down
5 changes: 5 additions & 0 deletions vnext/templates/cpp-app/windows/_gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ Ankh.NoLoad

#Files generated by the VS build
**/Generated Files/**

#Files genereated by MS build
*.binlog
*.err
*.wrn
5 changes: 5 additions & 0 deletions vnext/templates/cpp-lib/windows/_gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ Ankh.NoLoad

#Files generated by the VS build
**/Generated Files/**

#Files genereated by MS build
*.binlog
*.err
*.wrn