|
#1
|
|||
|
|||
square brackets []
Hi
When I compile a sln and it fails I capture the failure info in a macro and write it out to a file. But some time this errors out. I believe it is b/c the macro contains a line with the following string: [Microsoft .NET Framework, Version 2.0.50727.42] It happens if I use the macro in a "Log Message" step or if I email the macro as the txt body of an email. I believe the square brackets are the issue...but is there anyway around this? Thanks, Frank |
#2
|
|||
|
|||
VBP automatically escapes special characters (brackets and percent) in the build output so that they are not interpreted specially by VBP. Please ZIP and post or send:
1) The info from Help | About | Install Info. 2) The .bld file that is building the solution. 3) The solution and project files being built. 4) The build log file. Thanks. |
#3
|
|||
|
|||
square brackets []
I have attached a script that has the issue...it is not everything you asked for but I think I narrowed it down to, for my case, text in macros with brackets AND periods...it seems to be different if it is numbers or chars. I tried writing a vbscript to walk thru the macro and Replace the "[", "]" but I'm missing something in just walking thru the macro itself.
Thanks, Frank |
#4
|
|||
|
|||
In your sample, you have script expressions in your project macros (see http://www.visualbuild.com/Manual?scriptexpressions.htm for details). Use double brackets chars [[ ]] to store literal bracket characters in the macros and everything in the sample will work properly.
|
#5
|
|||
|
|||
I wrestled around on this issue for hours. I found that our HTML log was erroring out when we tried email it out in the body of the email as opposed to an attachment. After some finagling around I found the culprit, MS.NET 2.0.
MS.NET 2.0 likes to put there name on everything. So to ellviate this try the following: add "/Nologo" (without the quotes) as an argument to the MSbuild.exe. This is on the "options" tab of the compile code step I was hoping to resolve this issue in the XSLT .. but to no avail. example: C:\WINNT\Microsoft.NET\Framework\v2.0.50727\msbuil d.exe /nologo |
#6
|
|||
|
|||
That should work ok, as long as you escape out special characters. The simplest way to do that is to use
[vbld_GetFileContents("c:\path\to\logfile.htm")] for the message body. http://www.visualbuild.com/Manual/sysscriptfile.htm |
|
|