Tuesday, February 11, 2014

SQL Server Compact Toolbox 3.7.1–Visual Guide of new features

After 250.000 (!) downloads, version 3.7.1 of my SQL Server Compact Toolbox extension for Visual Studio 2013, 2012 and 2010 is now available for download (and available via Tools/Extensions in Visual Studio). This blog post is a visual guide to the few new features included in this minor release, which all centre around Server Explorer (DDEX) , including support for Visual Studio 2012 and 2013.

 

Simple DDEX providers for Visual Studio 2012 and 2013

image

I already blogged about this feature here, it has been extended to also support SQL Compact 3.5. Follow these steps to use the providers with Entity Framework Tools:

- Install this version of the toolbox and launch Visual Studio 2012/2013.
- Open the Toolbox (this will silently run the “installation” of the DDEX provider if required).
- Restart VS 2012/2013.
- Add new Toolbox connection to a new or existing SQL Server Compact 4.0 or 3.5 database file.
- Add EntityFramework.SqlServerCompact or EntityFramework.SqlServerCompact.Legacy NuGet package to project and build project.
- You can now use this connection for Generate Model from Database, Generate Database from Model and Update Model from Database, and with the Power Tools.

With this release, the DDEX support matrix looks like this:

  SQL Server Compact 3.5 SQL Server Compact 4.0
Visual Studio 2010 Microsoft None
Visual Studio 2010 SP1 + SQL CE 4.0 Tools Microsoft Microsoft
Visual Studio 2012 ErikEJ Microsoft
Visual Studio 2013 ErikEJ ErikEJ

“Microsoft” means full featured, Microsoft supplied provider
ErikEJ” means simple, basic support, enough to enable Entity Framework Tools, provided by this version of SQL Server Compact Toolbox.

Currently, the 3.5 DDEX provider does not fully work with the Entity Framework Tools, due to a bug (my bug!) in the EntityFramework.SqlServerCompact.Legacy Entity Framework provider; I am working on getting it fixed.

Scan Solution for sdf files

This new menu item will scan the active Solution for any sdf files, and add those to the Toolbox:

image

Prefer DDEX

image

This new option allows you to always use the Toolbox supplied dialogs for connecting to a SQL Server Compact database file, which will allow you to connect to any file, and does not require an .sdf file type. (By choosing not to prefer!)

Bug fixes and enhancements

Add connection will now always use DDEX provider if available
Handle apostrophe in file and folder names when saving connections
Fixed error: The specified table does not exist. (Databases)
Make it clearer that sqlmetal dependent features requires 3.5 to be installed

Please report any issues you encounter and provide feature suggestions and requests here.

7 comments:

David said...

Looks like an excellent release!

By the way - I cloned the code and tried to build it in VS2012 but failed - should it build in VS2012? Is there anything special that needs to be done before building?

My goal - should I get it to build - would be to contribute some changes to the DGML generation, which I use a lot. I would particularly like to see FK constraints represented as links in DGML.

ErikEJ said...

David: Thanks. You need VS 2010 + SDK to build the project, as documented here: https://sqlcetoolbox.codeplex.com/documentation
The DGML generation code is not in the Toolbox codebase, but in my scripting api here: https://exportsqlce.codeplex.com/wikipage?title=Command%20line%20utilities&referringTitle=Documentation - but the DGML code already links tables via FKs in DGML, so something else must be wrong, feel free to log an issue with mere info here: https://exportsqlce.codeplex.com/WorkItem/Create

Clay Shannon said...

Thanks! Great work!

msVlinuxMeet said...

Hi Erik thanks for your great work.
I am using SQL Server Compact toolbox 3.7.1 and I have create the new db using it mydb.sdf now I want to create Linq to SQL datacontext for my windows phone 8 application from this db. But in toolbox the option is disabled. How I will create the datacontext for my project ?? can you please help??
here is screenshot of project: http://postimg.org/image/oqubfk7an/

ErikEJ said...

msV... : The SQL Server Compact 3.5 DbProvider is not properly installed on your machine, re-install or repair your SQL Server Compact 3.5 installation

Unknown said...

Hi Erik,

I am working on a project where I need to access several SqlCE 3.5 databases and I wanted to use Entity Framework 6, code first.

I do not have control over the databases and they probably won't be updated to 4.0 anytime soon.

The problem is that I couldn't find a provider, that is until I found your blog.

However, I have a couple of issues with the package you published.

1) it's a prerelease package, which means I can use it for development but they won't let me use it in production. Any idea when it would be stable?
2) Even for development, it has a dependency on EF 6 alpha, I I was using the released version of EF and certainly cannot use an alpha version.

While I can think of maybe using the package, I definitely cannot use an alpha version of entity framework in production, is there a way around this or, is there a date when a stable version using the released version of EF 6 will be available?

Thanks in advance.

ErikEJ said...

Ricardo: I do not know about release dates, but I would be very suprised if EF 6.1, which combined with my add-in contains everything you need for 3.5, would not be released around //BUILD Conference date (beginning April)