question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MSBuild Task - Store Log file outside Source Folder

See original GitHub issue

When launching an MSBuild task, the command line look like

C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe 
"C:\vso_agent\_work\2\s\MSBuild.targets" /nologo /m /nr:false /fl /flp:"logfile=C:\vso_agent\_work\2\s\MSBuild.targets.log"
/dl:CentralLogger,"C:\vso_agent\agent\worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"*ForwardingLogger,"C:\vso_agent\agent\worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"

This part /flp:“logfile=C:\vso_agent_work\2\s\MSBuild.targets.log” creates a log file inside the source folder. The first instruction of our build script is a git clean and because this file is locked, we have to explicitly skip it to have the git clean work. It could be nice to have this file created outside the source folder. I am not sure this is the right place to post this issue as I’m not sure the code related to that is inside this project. If not, please, tell me where to submit this request.

Thank you

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ericsciplecommented, Jun 27, 2016

Fixed when this commit rolls out: https://github.com/Microsoft/vsts-tasks/commit/97f83b21d5330cddf4d43bbeaf440602f10ba670

Next deployment starting in a couple days.

0reactions
ericsciplecommented, Apr 27, 2016

@chrisrpatterson - the request here is to put the msbuild log somewhere else. The customer is calling git clean -fdx from within their msbuild targets and the log file is in use.

It sounds like there is multiple workarounds. E.g. clean on the repo tab now does git clean fdx (and then reset hard). However, I still wonder if we get in the way if a customer’s normal dev process (i.e. build from dev box) is to have git clean fdx within the targets file.

It might be good to change this as part of the agent.tempdirectory idea we keep finding more potential uses for.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Including content files in .csproj that are outside the project cone
csproj located at "C:\Projects\MyProject\". I also have files that I want copied into the output directory of this project. But, the files are...
Read more >
Copy Task - MSBuild | Microsoft Learn
Learn how to use the MSBuild Copy task to copy files to a new file or folder location in the file system.
Read more >
Including linked files from outside the project directory in ASP ...
In this post I show how to include files in a project that are outside the project directory.
Read more >
MSBuild - Dotfuscator Professional 6.5 - PreEmptive Solutions
Dotfuscator also provides MSBuild tasks that can be called from your own custom ... Build.targets file located in an ancestor directory of your...
Read more >
Configure VS Code for Microsoft C++
vscode folder. tasks.json stores build configurations. Your new tasks.json file should look similar to the JSON below:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found