Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   square brackets [] (https://www.kinook.com/Forum/showthread.php?t=1575)

fkish 02-22-2006 04:59 PM

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

kinook 02-23-2006 06:25 AM

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.

fkish 02-23-2006 03:19 PM

square brackets []
 
1 Attachment(s)
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

kinook 02-23-2006 03:53 PM

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.

Dr. House 03-07-2006 06:06 PM

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

kinook 03-08-2006 08:43 AM

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


All times are GMT -5. The time now is 10:16 AM.


Copyright © 1999-2023 Kinook Software, Inc.