locked
Could not load file or assembly System.Data.SqlServerCe Version 3.5.1

    Question

  • I'm trying to create a new SQL Server 2008 Database Project in Visual Studio 2010. I chose the option New Project\Database\SQL Server\Advanced\SQL Server 2008 Database Project. When I create the project, I get the error Could not load file or assembly System.Data.SqlServerCe Version 3.5.1 ... System cannot find the file specified. A moment later the Visual Studio crashes.

    However I'm able to create a sql project via New Project\Other Languages\SQL Server\SQL Server Database Project.

    My settings:

    • Visual Studio 2010
    • Windows 7
    • .net 4.0
    • SQL Server 2008 Express
    • SQL Server 2012
    • ADO.net EF 4.1

    What I'm trying to do is, create a database project in my solution so that any of my peers can deploy the project on their box and the database can get created in their sql express.

    I'm also doing windows phone development on my machine, so I need SQL CE also installed.
    Wednesday, May 16, 2012 12:38 PM

Answers

  • Hello salescrusade,

    Which is edition of your VS2010? Ultimate or Professional or..? And as far as I know that you should already have SQLCE installed when you install VS Ultimate. Do you delete it manually after you installed VS2010 Ultimate? You should try to repaire your VS2010 Ultimate.

    If reparing VS2010 Ultimate still does not help you, please also try to install  Microsoft SQL Server Compact Edition 3.5 SP1

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, May 17, 2012 3:22 AM
  • Finally it worked. Installing SQL Server Management Objects (SMO) from the link that you provided did not work. I had to install SQL Server 2008 RC2 Management Studio Express from the link. Now I can create the SQL 2008 Database project from VS2010 and.

    Thanks for the help though.

    Monday, May 21, 2012 12:13 PM

All replies

  • Hello salescrusade,

    Which is edition of your VS2010? Ultimate or Professional or..? And as far as I know that you should already have SQLCE installed when you install VS Ultimate. Do you delete it manually after you installed VS2010 Ultimate? You should try to repaire your VS2010 Ultimate.

    If reparing VS2010 Ultimate still does not help you, please also try to install  Microsoft SQL Server Compact Edition 3.5 SP1

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, May 17, 2012 3:22 AM
  • I'm using VS2010 Professional.

    I installed the SQL Server Compact Edition from the link that you provided. Now I'm not get the error that I was getting before. BUT I get an error that Microsoft.SqlServer.Management.SqlParser.dll is missing.

    I re-installed VS2010, but I get the same error.

    Saturday, May 19, 2012 1:51 PM
  • Now I find that creating a database project is not possible in VS2010 Professional as per this link:http://msdn.microsoft.com/en-us/library/aa833292.aspx I'm confused as why I see the optionSQL Server 2008 Database project if I should not be creating a database project.
    Saturday, May 19, 2012 11:29 PM
  • Hello salescrusade,

    Firstly, I need to say it is possible for you to create database projects by using VS2010 Professional edition. And just as you mentioned above, as you are using Visual Studio 2010 Professional, you must expand the Advanced node before you choose SQL Server. Please see the "Note" part of the Create a database project topic of this MSDN article for the reference.

    And for the error message you encountered: "Microsoft.SqlServer.Management.SqlParser.dll is missing", I think that the main reason for it is that you install Express edition SQL 2008 so you do not have the SQL Server Management installed. As far as I know that the assembly Microsoft.SqlServer.Management.SqlParser.dll is in SQL Server Management Objects (SMO) Class Library. To get it, you need to have the SQL Server Management Objects (SMO) Class Library installed. Go http://go.microsoft.com/fwlink/?LinkId=123709&clcid=0x409

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Monday, May 21, 2012 7:18 AM
  • Finally it worked. Installing SQL Server Management Objects (SMO) from the link that you provided did not work. I had to install SQL Server 2008 RC2 Management Studio Express from the link. Now I can create the SQL 2008 Database project from VS2010 and.

    Thanks for the help though.

    Monday, May 21, 2012 12:13 PM