Chris
Chris

Reputation: 2364

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

Upvotes: 1

Views: 229

Answers (1)

Brian Kretzler
Brian Kretzler

Reputation: 9938

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.

Upvotes: 1

Related Questions