{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/msbuild/issues/477","repository_url":"https://api.github.com/repos/Microsoft/msbuild","labels_url":"https://api.github.com/repos/Microsoft/msbuild/issues/477/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/msbuild/issues/477/comments","events_url":"https://api.github.com/repos/Microsoft/msbuild/issues/477/events","html_url":"https://github.com/Microsoft/msbuild/pull/477","id":132743604,"number":477,"title":"Adjusts so all command line propertied are logged when using diagnostic","user":{"login":"devlead","id":1647294,"avatar_url":"https://avatars.githubusercontent.com/u/1647294?v=3","gravatar_id":"","url":"https://api.github.com/users/devlead","html_url":"https://github.com/devlead","followers_url":"https://api.github.com/users/devlead/followers","following_url":"https://api.github.com/users/devlead/following{/other_user}","gists_url":"https://api.github.com/users/devlead/gists{/gist_id}","starred_url":"https://api.github.com/users/devlead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devlead/subscriptions","organizations_url":"https://api.github.com/users/devlead/orgs","repos_url":"https://api.github.com/users/devlead/repos","events_url":"https://api.github.com/users/devlead/events{/privacy}","received_events_url":"https://api.github.com/users/devlead/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/msbuild/labels/cla-signed","name":"cla-signed","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-10T16:12:31Z","updated_at":"2016-02-11T21:04:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Microsoft/msbuild/pulls/477","html_url":"https://github.com/Microsoft/msbuild/pull/477","diff_url":"https://github.com/Microsoft/msbuild/pull/477.diff","patch_url":"https://github.com/Microsoft/msbuild/pull/477.patch"},"body":"This PR relates to solve an issue reported to the CakeBuild system ( cake-build/cake#680 ).\r\n\r\nCurrently when running MSBuild and specifying multiple properties all aren't logged when diagnostic verbosity.\r\nThis might be by design? but when debugging and logging at least I and 1 more users find this a bit confusing when parts of the command line is omitted.\r\n\r\nI tracked the issue to GetEquivalentCommandLineExceptProjectFile() in [./src/XMakeCommandLine/XMake.cs#L1840](https://github.com/Microsoft/msbuild/blob/a804b8a3e47f388a31272c0cf95da888f99a2457/src/XMakeCommandLine/XMake.cs#L1840)\r\n\r\nAnd the value is set on each iteration in [./src/XMakeCommandLine/CommandLineSwitches.cs#L448](https://github.com/Microsoft/msbuild/blob/a804b8a3e47f388a31272c0cf95da888f99a2457/src/XMakeCommandLine/CommandLineSwitches.cs#L448) which of course results in last value always being used.\r\n\r\nRepro instructions:\r\n\r\nif you call MSBuild using the following parameters\r\n```cmd\r\nmsbuild /m /v:diagnostic /p:Configuration=\"Release\" /p:firstProperty=one /p:secondProperty=two /target:Build \"C:/temp/dev/gh/Philo/example/src/Example.sln\"\r\n```\r\n_*the verbose output will be something like*_\r\n```\r\nMicrosoft (R) Build Engine version 14.0.24720.0\r\nCopyright (C) Microsoft Corporation. All rights reserved.\r\n\r\nC:/Program Files (x86)/MSBuild/14.0/Bin/amd64/MSBuild.exe /m /p:secondProperty=two /target:Build /v:diagnostic C:/temp/dev/gh/Philo/example/src/Example.sln\r\nBuild started 2016-02-10 17:08:05.\r\n```\r\n_*same in MSBuild 12*_\r\n```\r\nMicrosoft (R) Build Engine version 12.0.31101.0\r\n[Microsoft .NET Framework, version 4.0.30319.42000]\r\nCopyright (C) Microsoft Corporation. All rights reserved.\r\n\r\nC:/Program Files (x86)/MSBuild/12.0/Bin/amd64/MSBuild.exe /m /p:secondProperty=two /target:Build /v:diagnostic C:/temp/dev/gh/Philo/example/src/Example.sln\r\nBuild started 2016-02-10 17:01:51.\r\n```\r\n_*after the adjustments done in this PR output will be*_\r\n```\r\nMicrosoft (R) Build Engine version 14.1.0.0\r\nCopyright (C) Microsoft Corporation. All rights reserved.\r\n\r\nC:/temp/dev/gh/devlead/msbuild/bin/Windows_NT/Debug/msbuild.exe /m /p:Configuration=Release /p:firstProperty=one /p:secondProperty=two /target:Build /v:diagnostic C:/temp/dev/gh/Philo/example/src/Example.sln\r\nBuild started 2016-02-10 16:29:57.\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/msbuild/issues/comments/183059235","html_url":"https://github.com/Microsoft/msbuild/pull/477#issuecomment-183059235","issue_url":"https://api.github.com/repos/Microsoft/msbuild/issues/477","id":183059235,"user":{"login":"AndyGerlicher","id":9847849,"avatar_url":"https://avatars.githubusercontent.com/u/9847849?v=3","gravatar_id":"","url":"https://api.github.com/users/AndyGerlicher","html_url":"https://github.com/AndyGerlicher","followers_url":"https://api.github.com/users/AndyGerlicher/followers","following_url":"https://api.github.com/users/AndyGerlicher/following{/other_user}","gists_url":"https://api.github.com/users/AndyGerlicher/gists{/gist_id}","starred_url":"https://api.github.com/users/AndyGerlicher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndyGerlicher/subscriptions","organizations_url":"https://api.github.com/users/AndyGerlicher/orgs","repos_url":"https://api.github.com/users/AndyGerlicher/repos","events_url":"https://api.github.com/users/AndyGerlicher/events{/privacy}","received_events_url":"https://api.github.com/users/AndyGerlicher/received_events","type":"User","site_admin":false},"created_at":"2016-02-11T21:04:03Z","updated_at":"2016-02-11T21:04:03Z","body":"LGTM, thanks!"}}