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

[Bug]: Enclosed property value works differently in different powershell versions #9944

Closed
f-alizada opened this issue Mar 28, 2024 · 1 comment · Fixed by #10025
Closed
Assignees
Labels

Comments

@f-alizada
Copy link
Contributor

f-alizada commented Mar 28, 2024

Issue Description

While invoking msbuild from different versions of powershell and cmd the arguments of property interpreted differently.

Steps to Reproduce

<Project>
  <Target Name="TargetName">
      <Message Text="Property value = $(property)" Importance="high" />
  </Target>
</Project>

PWD:

msbuild projectfile.proj  /p:property=`"asdf`"`

results

" Property value = asdf "

CMD:

msbuild projectfile.proj  /p:property=`"asdf`"`

results

"  Property value= `asdf`  "

PowerShell 7.4.1:

msbuild projectfile.proj  /p:property=`"asdf`"`

results

"   Property value= "asdf"  "

Expected Behavior

The output to be the same when invoked from cmd, powershell, powershell windows

Actual Behavior

the output is different

@f-alizada f-alizada added the bug label Mar 28, 2024
@f-alizada f-alizada changed the title [Bug]: Enclosed property value works differently in different PWS versions [Bug]: Enclosed property value works differently in different powershell versions Mar 28, 2024
@AR-May AR-May added Priority:2 Work that is important, but not critical for the release and removed Priority:2 Work that is important, but not critical for the release labels Apr 2, 2024
@f-alizada
Copy link
Contributor Author

Discussed offline: The outcome of this issue/resolution is to add documentation about the properties command line argument of msbuild command and its usage in different clients.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants