1

Closed

parameter metadata is being lost when using readlines

description

For some reason some of the metadata that I am using is coming back null.
 
<ItemGroup>
<Database">
    <Name>MyDatabase</Name>
    <UserRoleName>MyDatabase</UserRoleName>
    <TablesDir>$(SchemaDir)\Tables</TablesDir>
</Database>
</ItemGroup>
 
<Target Name="CreateDatabase">
<CreateItem Include="%(Database.Name)DatabaseParams" AdditionalMetaData="name=@dbUser;value=%(Database.UserRoleName)User">
    <Output TaskParameter="Include" ItemName="%(Database.Name)DatabaseParams"/>
</CreateItem>
<ReadLinesFromFile File="$(DatabaseTablesDir)\CreationOrder.txt">
  <Output TaskParameter="Lines" ItemName="DatabaseTables"/>
</ReadLinesFromFile>
 
<!-- the line will work and pass in the parameters -->
<Sql.Execute Path="$(DatabaseTablesDir)\File1.ddl"                                  ServerName="localhost"  DatabaseName="$(DatabaseName)"  CommandTimeout="60" Parameters="@(%(Database.Name)DatabaseParams)" />
<!-- the line will NOT work and the parameters will be null -->
<Sql.Execute Path="$(DatabaseTablesDir)\%(DatabaseTables.Identity).ddl" ServerName="localhost"  DatabaseName="$(DatabaseName)"  CommandTimeout="60" Parameters="@(%(Database.Name)DatabaseParams)"  />
 
</Target>
 
I think doing the loop in $(DatabaseTablesDir)\%(DatabaseTables.Identity).ddl is somehow losing the metadata for @(%(Database.Name)DatabaseParams)   Is there a way around this?
 
Cheers
Dewy
Closed Aug 26, 2010 at 9:46 PM by mikeFourie
This library is no longer under active development / support. Please see the home page for details.

comments