This project has moved and is read-only. For the latest updates, please go here.

Name cannot begin with the "1" character Error getting started

Aug 14, 2013 at 1:21 PM
I am working through the "getting started tutorial" and as soon as I embed c# code I am getting the error building packages. Am I missing something

The compile error is "Name cannot begin with the "1" character , hexadecimal value 0x31. Line 4, position 4 "

First example works fine (without embeded code)
Aug 14, 2013 at 1:58 PM
Could you copy and paste your code directly from the biml file into a reply? That will enable us to diagnose the issue quickly.
Aug 14, 2013 at 2:12 PM
This is the code
Running in Bids 2008
    <Biml xmlns="">
        <# for(int i = 1; i <= 5; i++) { #>
        <Package Name="MyPackage"
            <#=i#>" ConstraintMode="Linear">
                <Dataflow Name="My Dataflow">
        <# } #>
Aug 14, 2013 at 10:11 PM
Edited Aug 14, 2013 at 10:14 PM
It looks like you have an extra closing quote in the Name element of your package

Your code will generate the following which is not valid xml:
<Package Name="MyPackage"  1" ConstraintMode="Linear">
I'm also not sure if you should have a new line in the name attribute, I don't that is valid either, so I think you should change your package element to look like the following so that the reference to the i variable is embedded in the name string:
<Package Name="MyPackage <#=i#>" ConstraintMode="Linear">
Marked as answer by furmangg on 3/17/2015 at 6:14 PM
Aug 15, 2013 at 9:43 AM
Yes now working, ooks like a visual studio auto formated the script for me
Thanks for your help