Export (0) Print
Expand All

How to: Convert a Visual Studio 2010 Database Projects to SQL Server Database Projects and Retarget to a Different Platform

In SQL Server Data Tools (SSDT), you can convert existing SQL Server Database, CLR and Data-Tier Application projects created in Visual Studio 2010 to the new SQL Server database project. By doing so, you can take advantage of the new database development experience that SSDT provides, such as an updated Transact-SQL editing experience, and the ability to re-target your project to Microsoft SQL Server 2012 and SQL Azure with code validation. The conversion process will convert objects (table, views, stored-procedures, property files, or scripts) that have an equivalent type in SSDT, including their permissions and DAC policy files. Artifacts that cannot be converted will be highlighted in a conversion log/report.

The following table lists all the project artifacts that can or cannot be converted by SSDT.

 

Project artifacts that can be converted Project artifacts that cannot be converted

Project Files

  1. .dbproj (Visual Studio 2010 Database and Server projects, Data-Tier Application projects) project files

  2. .csproj and .vbproj CLR project files can be converted, but may result in data loss

Database Unit Test Projects

Partial Projects such as .files items

Properties Files

  1. *.sqldeployment, .sqlsettings, and .sqlpolicy files are converted to their corresponding Project Property pages

  2. .sqlpermissions files are converted to Transact-SQL scripts

Project Properties

  1. Server.sqlsettings

  2. SQLCMD variables defined in .sqlcmd files

.sql files are imported using their existing folder structure.

Extensibility files.

Pre-Deployment and Post-Deployment scripts

Database references will have to manually re-established after project conversion.

Schema Compare files

Data Generation files.

To convert a project

  1. Open a SQL Server 2005 or 2008 Database Project.

  2. The Convert to SQL Server Database project wizard automatically opens. Select Convert to SQL Server Database project and click OK . Keep the default setting to backup existing files checked.

  3. A conversion report is automatically generated, listing all files that have been converted. Click the + sign next to the project filename to read more information about the conversion process.

  4. Notice that in Solution Explorer , project file, property files and schema objects are all converted.

To change a project’s target platform

  1. Right-click your newly converted project in Solution Explorer and select Properties to access the Project Settings dialog box.

  2. Select any of the SSDT-supported platforms in the Target platform dropdown list.

See Also



Show:
© 2014 Microsoft