Ask a questionAsk a question
 

AnswerVSDBCMD error when deploying database

  • Friday, November 06, 2009 4:07 PMLGodwin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Got error when deploying the database using vsdbcmd
    An unexpected failure occurred: Could not load file or assembly 'System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies.
    I have VS2008 SP1,  .net 3.5 SP1 and SQL CE 3.5 SP1 installed on the machine.
    Please help ! Thank you !

Answers

  • Tuesday, November 10, 2009 8:45 PMDuke KamstraMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    I've only seen this when I a) didn't have SQL CE installed, b) my installation was messed up somehow or c) I was running vsdbcmd.exe from a 64-bit command shell. Open a 32-bit elevated command prompt and run the following

    C:\Windows>dir /s System.Data.SqlServerCe.dll

    You should see something like the following. Do you? If not, repair your SQL CE install.

    Directory of C:\Windows\assembly\GAC_MSIL\System.Data.SqlServerCe\3.5.1.0__89845dcd8080cc91

    08/04/2009  06:04 PM           271,440 System.Data.SqlServerCe.dll


    Duke Kamstra - Program Manager - VSTS Database Edition (Data Dude, DBPro)
  • Thursday, November 12, 2009 3:03 PMLGodwin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Thank you. I removed SQL CE SP1 and reinstall it. It works now.

All Replies

  • Tuesday, November 10, 2009 8:45 PMDuke KamstraMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    I've only seen this when I a) didn't have SQL CE installed, b) my installation was messed up somehow or c) I was running vsdbcmd.exe from a 64-bit command shell. Open a 32-bit elevated command prompt and run the following

    C:\Windows>dir /s System.Data.SqlServerCe.dll

    You should see something like the following. Do you? If not, repair your SQL CE install.

    Directory of C:\Windows\assembly\GAC_MSIL\System.Data.SqlServerCe\3.5.1.0__89845dcd8080cc91

    08/04/2009  06:04 PM           271,440 System.Data.SqlServerCe.dll


    Duke Kamstra - Program Manager - VSTS Database Edition (Data Dude, DBPro)
  • Thursday, November 12, 2009 3:03 PMLGodwin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Thank you. I removed SQL CE SP1 and reinstall it. It works now.