MSBuild Task - Store Log file outside Source Folder
See original GitHub issueWhen 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:
- Created 8 years ago
- Comments:7 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed when this commit rolls out: https://github.com/Microsoft/vsts-tasks/commit/97f83b21d5330cddf4d43bbeaf440602f10ba670
Next deployment starting in a couple days.
@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.