“You cannot write updates to the target” in Visual Studio 2010

First, the good news. Data dude is now included in Visual Studio 2010.

If you get a message “You cannot write updates to the target when you compare the specified types of schema models” when you try and import your database into a data dude project, it’s because you’ve done a schema compare of your database against a “SQL Server Data-tier Application” instead of a “SQL Server 2008 Database” project.

UPDATE: you might also get this error message if you import the schema from a SQL 2005 database into a SQL Server 2008 Database Project.

Advertisements

3 thoughts on ““You cannot write updates to the target” in Visual Studio 2010

  1. Another update: The same error message also appears if you do a schema compare comparing a SQL Server 2005 project to a .dbschema file (that was created from a SQL server 2005 project, so the versions do match). The message in itself is correct here, because it doesn’t make sense to update the .dbschema-file using the schema compare tool. However it is due to this error message also not possible to show the “Schema Update Script”. I would very much like to get at the generated update script because this way I would be able to generate an alter script from a database version that I do not currently have an instance of. But MS decided for me that I should not ever need to do this :-(.

    Probably this also occurs comparing a SQL server 2008 project to a 2008 .dbschema file, but I haven’t tested that (yet).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s