<< Back to previous view

[QB-3113] MSBuild: step fails with the "MSBUILD : error MSB1006: Property is not valid. Switch ..."
Created: 09/Jan/18  Updated: 10/Jan/18

Status: Open
Project: QuickBuild
Component/s: None
Affects Version/s: 7.0.30
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Alexey Shumkin Assigned To: Steve Luo
Resolution: Unresolved Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown
Environment: Operating System Linux 4.4.0-98-generic, amd64
JVM OpenJDK 64-Bit Server VM 1.7.0_111, Oracle Corporation
QuickBuild Version 7.0.30 - Sat Dec 09 00:03:52 UTC 2017


 Description   
This must be the reopened issue QB-2695, but I have no permissions to do it.

I run a task sending email-notification.
Task is "MSBuild.ExtensionPack.Communication.Email" from "MSBuild Extension Pack".
It has several recipients passed as a list with a ";" (semicolon) delimiter and now they contain spaces in them.

So, step is msbuild task, properties are
EmailSender=Quickbuild <quickbuild@server>
EmailRecipient=Recipient1 <recipient1@domain.com>;Recipient2 <recipient2@domain.com>
AnyOtherProperty=Value

run
step fails
16:39:42,171 DEBUG - Executing command: msbuild.exe /nologo /t:sendmail "/property:EmailSender=Quickbuild <quickbuild@server>" "/property:EmailRecipient=Recipient1 <recipient-1@domain.com>;Recipient2 <recipient-2@domain.com>" /property:AnyOtherProperty=Value ...\test.dproj
...
16:39:42,200 ERROR - MSBUILD : error MSB1006: Property is not valid.
16:39:42,200 INFO - Switch: Recipient2 <recipient-2@domain.com>
16:39:42,200 INFO -
16:39:42,200 INFO - For switch syntax, type "MSBuild /help"

But if I run command
 msbuild.exe /nologo /t:sendmail "/property:EmailSender=Quickbuild <quickbuild@server>" /property:EmailRecipient="Recipient1 <recipient-1@domain.com>;Recipient2 <recipient-2@domain.com>" /property:AnyOtherProperty=Value ...\test.dproj
(note a quote before a property EmailRecipient VALUE, but not the option "/property" itself)
it will succeed

Generated at Fri Apr 19 12:17:22 UTC 2024 using JIRA 189.