But two things bothered me and I think more people find them annoying:
1) Copy & Paste
When you copy and paste something from an other script, Visual Studio adds extra chars and the BIML Script doesn't work: Directive value without name.
<#@ template language="C#" hostspecific="true"#>
<#@ template="" language="C#" hostspecific="true"#>
|Copy and paste error: adding =""|
|Directive value without name|
You van overcome this by changing the XML formatting options in Visual Studio. Go to the Tools menu and choose options. Then go to the Text Editor options, XML and formatting. There you must change auto format on paste from clipboard. Now try again pasting some BIML code. See this for more details.
|disable on paste from clipboard|
2) Losing format & intellisense
When you mix the XML from BIML Script with C# code, the XML code obviously gets corrupt, because the brackets are not opening and closing one after the other:
<ExecutePackage Name="EPT - <#=row["name"]#>">
And then, when you re-open the BIML Script, you have lost formatting and even worse you have lost intellisense.
|Formatting and intellisense gone!|
You can overcome this by right clicking the BIML Script and select Open With... Then choose the XML (Text) Editor. Now it opens with formatting and intellisense. Setting it as the default editor didn't work.
|Open in XML (Text) Editor|
An alternative is using the online editor at http://www.bimlscript.com/Develop. This editor doesn't have the formatting issues and the <# and #> are formatted properly.
UPDATE: easier solution, move imports to bottom.
Next BIML blog post: Mixing BIML with .Net code