Bite my bytes

What I learn by day I blog at night - A blog from Microsoft Consultant working from Ljubljana, Slovenia

  Home :: Contact :: Syndication  
  999 Posts :: 7691 Comments :: 235 Trackbacks


Most popular posts


My Projects



Copyright © by David Vidmar
Contact me!
LinkedIn Profile

Here is another little trick I came up with. I was writing a NAnt script and I had to include quote in quotes in quotes. How do I do that? You have to escape it somehow but if you don't write XML by hand every day you have some searching to do.
Well, I had something better planed:

  • I renamed my .build file to .xml
  • I opened it in VS.NET
  • I switched to "Data view"
  • Then I entered my quotes as needed
  • Switched back to XML mode and I was smarter than before.
This was the result I needed in my .build script:
<exec program="osql.exe">
    <arg line="-S (local) -U user -P password -Q &quot;ALTER DATABASE [DB${Version.Last}] SET SINGLE_USER WITH ROLLBACK IMMEDIATE&quot;" />
Posted on Friday, March 24, 2006 9:23 PM | Filed under: Developement |
Comments have been closed on this topic.