locked
Case Sensitivity RRS feed

  • Question

  • In our project, we rebuild the database, the stored procedures, and the test data with each build. Here's how the item for stored procedures is created:

     

     

    Code Block

    <CreateItem Include="$(StoredProceduresPath)\**\*.sql">

    <Output TaskParameter="Include" ItemName="StoredProcedures" />

    </CreateItem>

     

     

    Unfortunately, the project is quite large, and some people have named their files .SQL instead of .sql. I just discovered that the uppercase versions are not being added to the collection, which implies that this is case sensitive. How can I change it to be case insensitive?
    Monday, November 26, 2007 10:31 PM

Answers

  • Chris,

    I can't explain this. MSBuild is case INsensitive and I just double checked this exact kind of expression on my machine and it works no matter what the file case. Can you triple check you haven't got a typo somewhere?

     

    What happens if you create a little project with it outside the target ,eg

     

            <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">

    <PropertyGroup>
     <StoredProceduresPath>c:\whateveryourpathis</StoredProceduresPath>
    </PropertyGroup>

    <ItemGroup>
     <StoredProcedures Include="$(StoredProceduresPath)\**\*.sql"/>
    </ItemGroup>

    <Target Name="test" >

     <Message Text="@(StoredProcedures)"/>

    </Target>

            </Project>

     

     

    Dan

    Tuesday, November 27, 2007 12:12 AM

All replies

  • Chris,

    I can't explain this. MSBuild is case INsensitive and I just double checked this exact kind of expression on my machine and it works no matter what the file case. Can you triple check you haven't got a typo somewhere?

     

    What happens if you create a little project with it outside the target ,eg

     

            <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">

    <PropertyGroup>
     <StoredProceduresPath>c:\whateveryourpathis</StoredProceduresPath>
    </PropertyGroup>

    <ItemGroup>
     <StoredProcedures Include="$(StoredProceduresPath)\**\*.sql"/>
    </ItemGroup>

    <Target Name="test" >

     <Message Text="@(StoredProcedures)"/>

    </Target>

            </Project>

     

     

    Dan

    Tuesday, November 27, 2007 12:12 AM
  • Thanks for your help Dan. Using the Message task helped me debug it. I found that when I did it in a test project, it worked fine. Researching further, I discovered that StarTeam is case sensitive. It wasn't pulling down all of the files.

     

    Tuesday, November 27, 2007 4:52 PM