简体   繁体   中英

MSBuild define logfile in project

I'm wondering if it's possible to define a logging output in a msbuild project file? I'm aware of the command line switch /l:FileLogger,Microsoft.Build.Engine;logfile=MyLog.log My build process is started from a separate build.proj that includes other VS project files.

I would like to get rid of the command line option and place it in the build file.

Thanks in advance

Chris

You have two options, neither are great:

  1. Run MSBuild from within your build.proj file using the Exec task rather than using the MSBuild task.
  2. Create a default response file named MSBuild.rsp containing the logger parameters and place it beside MSBuild.exe. This will affect every build, not just that one project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM