Ask a questionAsk a question
 

AnswerFalse "TSD00259" Error for dbschema reference

  • Friday, October 30, 2009 2:22 PMKen Powers Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    One of my database projects keeps losing its reference to one of its dbschema files.  This file has not been modified in any way, nor has it been moved from its original location.  Yet all of us keep having to remove the reference and add it back again.  It works until we do a get latest version, then we get this error again:

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v9.0\TeamData\Microsoft.Data.Schema.SqlTasks.targets(58,5)Error TSD00259: File D:\EHIT\Main\Database\Application Databases\Source\masterCLGTraining.dbschema does not exist.

    What could be causing this bogus error?

Answers

  • Tuesday, November 03, 2009 10:35 AMFigo FeiMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Ken

    This looks like an IDE issue.
    As far as I know, it is by design that all paths within a solution are relative to the solution root.
    You may try to check in/out the whole solution content instead of the single project (including *.suo or *.csproj.user if there is any.)

    Please let me know if that works for you.

    Thanks.

    Figo Fei

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

All Replies

  • Friday, October 30, 2009 4:35 PMAndrew Campbell - MSFTMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hey Ken,

    Quick thought, have you cracked open the dbproj to see if the path for the dbschema file is relative to the project or fixed?  If it is not relative, then in a team working environment the file won't be found unless each user has the exact same path for the workspace.  Dropping the reference and readding of course fixes the issue for that user, but may break it for others.

    Andrew
  • Friday, October 30, 2009 6:11 PMKen Powers Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    I just took a look, and I think I see the problem:

      <ItemGroup>
        <ArtifactReference Include="$(VSTSDBDirectory)\Extensions\SqlServer\2008\DBSchemas\Microsoft.SqlTypes.dbschema">
          <HintPath>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VSTSDB\Extensions\SqlServer\2008\DBSchemas\Microsoft.SqlTypes.dbschema</HintPath>
        </ArtifactReference>
        <ArtifactReference Include="..\masterCLGTrainingDB.dbschema">
          <HintPath>..\masterCLGTrainingDB.dbschema</HintPath>
          <DatabaseVariableLiteralValue>master</DatabaseVariableLiteralValue>
        </ArtifactReference>
      </ItemGroup>
    It IS a relative path, but it's looking in the default location.  We're using a copy of master.dbschema and we keep it in a different folder.  Let me change the hint path to the folder we use and see how that works.
  • Friday, October 30, 2009 7:36 PMKen Powers Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    How can I create a fixed path to the file?  We all have the same local file structure for our projects, so this should not be a problem.

    I am getting really funky behavior with this.  I modified the dbproj file as follows:

      <ItemGroup>
        <ArtifactReference Include="$(VSTSDBDirectory)\Extensions\SqlServer\2008\DBSchemas\Microsoft.SqlTypes.dbschema">
          <HintPath>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VSTSDB\Extensions\SqlServer\2008\DBSchemas\Microsoft.SqlTypes.dbschema</HintPath>
        </ArtifactReference>
        <ArtifactReference Include="D:\EHIT\Main\Database\Application Databases\Source\masterCLGTrainingDB.dbschema">
          <HintPath>D:\EHIT\Main\Database\Application Databases\Source\masterCLGTrainingDB.dbschema</HintPath>
          <DatabaseVariableLiteralValue>master</DatabaseVariableLiteralValue>
        </ArtifactReference>
      </ItemGroup>
    
    I saved my changes and checked in the database project.  Then I had someone else get the latest.  They got the error again.  When I opened up the dbproj file, my changes were gone, as shown here:

      <ItemGroup>
        <ArtifactReference Include="$(VSTSDBDirectory)\Extensions\SqlServer\2008\DBSchemas\Microsoft.SqlTypes.dbschema">
          <HintPath>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VSTSDB\Extensions\SqlServer\2008\DBSchemas\Microsoft.SqlTypes.dbschema</HintPath>
        </ArtifactReference>
        <ArtifactReference Include="..\masterCLGTrainingDB.dbschema">
          <HintPath>..\masterCLGTrainingDB.dbschema</HintPath>
          <DatabaseVariableLiteralValue>master</DatabaseVariableLiteralValue>
        </ArtifactReference>
      </ItemGroup>
    
    Why am I losing my changes to the dbproj file?
  • Tuesday, November 03, 2009 10:35 AMFigo FeiMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Ken

    This looks like an IDE issue.
    As far as I know, it is by design that all paths within a solution are relative to the solution root.
    You may try to check in/out the whole solution content instead of the single project (including *.suo or *.csproj.user if there is any.)

    Please let me know if that works for you.

    Thanks.

    Figo Fei

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.