![]() |
SendMail Problem
1 Attachment(s)
I am getting the following error when trying to send the Fail Message produced when a Vs.Net C# Project Fails to build
Error expanding macros in property Message: The only macro in the message contains the text output from the VS.Net Build Step. Any Ideas what Could be causing the problem ? Text from macro in attached File Thanks Andy |
How is the macro referenced by the step being created? Can you post or send a .bld file that demonstrates the problem? If you use the FAILSTEP_OUTPUT/LASTSTEP_OUTPUT system macros, any characters that VBP treats specially (%, [, and ]) will normally be doubled to be treated as literal characters. Somehow, the macro that you are referencing contains non-doubled bracket chars which VBP is trying to evaluate as script code.
|
Calling Method
The SendMail is part of a Subroutine and the LASTSTEP_OUTPUT is copied to a Temporary macro as a parameter so I assume that the Special characters have not been doubled up in the copy.
Any way that I can solve this ? |
At the place where you're referencing %LASTSTEP_OUTPUT%, use
[vbld_EscapeString("%LASTSTEP_OUTPUT%")] instead |
Still Fails
It fails on the Macro call with an "Unterminated String Constant" error Line 1 Character 37
This would appear to be a LineFeed 0x0A character. I wonder is the macro only interprates CRLF pairs I know some VB stuff fails on standalone LF charaters but this is the output from DEVENV so I have litle control over it. Thanks for your support Andy |
Duh, my test string didn't have multiple lines. In that case, use this instead:
[vbld_EscapeString(vbld_AllMacros()("LASTSTEP_OUTPUT").Value)] |
Thanks
That's sorted it.
Andy |
All times are GMT -5. The time now is 05:27 PM. |
Copyright © 1999-2023 Kinook Software, Inc.