dotnet / dotnet/msbuild

[Bug]: Escape , and ;= doesn't work for global property when build with dotnet, but html encode %3C and %3B= works well

Open
#10,128 3 comments 1 reaction 0 assignees View on GitHub
Area: Language backlog bug triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Issue Description

1. Test escape ',' and "," and %3C in the powershell , cmd, bash and zsh. Found "," and ',' is not supported in the following 4 shells and cmd error is different from others.

2. Test ";=" and ';=' and %3B in 4 shells. Found when ";=" and ';=' global property, it reports error in 4 shells with the same error MSB1006: Property is not valid. But = and ; work well separately for global property

**Powershell**

With quotes: MSBUILD : error MSB1005: Specify a property and its value.

With double quotes: MSBUILD : error MSB1005: Specify a property and its value.

Html Codes. Works well

![image](https://github.com/dotnet/msbuild/assets/26814373/d7f75b94-8226-416c-ab34-fa87ff30c1e9)

**CMD**

With quotes: MSBUILD : error MSB1006: Property is not valid.

With double quotes: MSBUILD : error MSB1005: Specify a property and its value.

With html codes: Good
![image](https://github.com/dotnet/msbuild/assets/26814373/6db712b4-d914-4c60-9cb7-779e263059e4)

**bash**

With quotes: MSBUILD : error MSB1005: Specify a property and its value.

With double quotes: MSBUILD : error MSB1005: Specify a property and its value.

Html codes: works well


![image](https://github.com/dotnet/msbuild/assets/26814373/997ff755-6ae5-484e-9578-f8bc25ca1b69)

**ZSH**

With quotes: MSBUILD : error MSB1005: Specify a property and its value.

With double quotes: MSBUILD : error MSB1005: Specify a property and its value.

Html codes work well
![image](https://github.com/dotnet/msbuild/assets/26814373/da5da97e-562c-4420-81f2-bbdd4db98add)

### Steps to Reproduce

[custom-proj1.zip](https://github.com/dotnet/msbuild/files/15293091/custom-proj1.zip)
dotnet version 9.0.100-preview.3.24204.13
1. dotnet build custom-proj1.csproj /t:Init /p:F1=","
2. dotnet build custom-proj1.csproj /t:Init /p:F1=";="

### Expected Behavior

dotnet build should support such properties "," and ";=" as msbuild.exe

### Actual Behavior

Dotnet build doesn't support the global property ", " and ";="

### Analysis

_No response_

### Versions & Configurations

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.