Skip to content
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

MSBuild command line arguments aren't logged in dotnet build #7216

Closed
rainersigwald opened this issue Jan 4, 2022 · 0 comments · Fixed by #7326
Closed

MSBuild command line arguments aren't logged in dotnet build #7216

rainersigwald opened this issue Jan 4, 2022 · 0 comments · Fixed by #7326

Comments

@rainersigwald
Copy link
Member

After dotnet/sdk#16577, the binlog no longer contains the MSBuild command line (because the process command line isn't MSBuild's any more).

Process = "S:\sdk\artifacts\bin\redist\Debug\dotnet\dotnet.exe"
MSBuild executable path = "S:\sdk\artifacts\bin\redist\Debug\dotnet\sdk\6.0.200-dev\MSBuild.dll"
Command line arguments = "S:\sdk\artifacts\bin\redist\Debug\dotnet\sdk\6.0.200-dev\dotnet.dll build -bl S:\work\wpf_demo\wpf_demo.csproj"
Current directory = "S:\sdk"
MSBuild version = "17.1.0-preview-21610-01+96a618ca5"

instead of

Process = "C:\Program Files\dotnet\dotnet.exe"
MSBuild executable path = "C:\Program Files\dotnet\sdk\5.0.404\MSBuild.dll"
Command line arguments = ""C:\Program Files\dotnet\sdk\5.0.404\MSBuild.dll" -maxcpucount -verbosity:m -restore -consoleloggerparameters:Summary -bl -p:TargetFramework=net5.0-windows "-distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,C:\Program Files\dotnet\sdk\5.0.404\dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,C:\Program Files\dotnet\sdk\5.0.404\dotnet.dll""
Current directory = "S:\work\wpf_demo"
MSBuild version = "16.11.2+f32259642"

Filing this here instead of in the SDK because I think it's more of an MSBuild-layer concern, but happy with a fix in either spot.

@rainersigwald rainersigwald added this to the VS 17.1 milestone Jan 4, 2022
@marcpopMSFT marcpopMSFT modified the milestones: VS 17.1, VS 17.2 Jan 7, 2022
@rokonec rokonec self-assigned this Jan 23, 2022
ladipro pushed a commit that referenced this issue Jan 26, 2022
…mmandLine (#7326)

Fixes #7216 

### Context
See #7216 

### Changes Made
- Logging commandLine arguments passed into Execute method as oppose to Environment.CommandLine

### Testing
- ren before and after and compared its binary log in viewer.

### Notes
- I reviewed other places which uses  Environment.CommandLine and it seems to be OK with respect to `dotnet build` use case.
@AR-May AR-May added the triaged label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants