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 retarget your project to Microsoft SQL Server 2012 and SQL Azure with code validation. The conversion process converts 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 are 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|
.dbproj (Visual Studio 2010 Database and Server projects, Data-Tier Application projects) project files
.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
*.sqldeployment, .sqlsettings, and .sqlpolicy files are converted to their corresponding Project Property pages
.sqlpermissions files are converted to Transact-SQL scripts
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
Open a SQL Server 2005 or 2008 Database Project.
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.
A conversion report is automatically generated, listing all files that have been converted. To read more information about the conversion process, click the + sign next to the project filename.
Notice that in Solution Explorer, project file, property files, and schema objects are all converted.
To change a project's target platform
Right-click your newly converted project in Solution Explorer and select Properties to access the Project Settings dialog box.
Select any of the SSDT-supported platforms in the Target platform dropdown list.