I recently switched to VS2012 from VS2010, when opening a database project I get below error
C:\Trunk\Database\Database.dbproj : error : Internal Error. The database platform service with type Microsoft.Data.Schema.Sql.Sql100DatabaseSchemaProvider is not valid. You must make sure the service is loaded, or you must provide the full type name of a valid database platform service.
I'm guessing it might be the following line in the project file which it is choking on
<DSP>Microsoft.Data.Schema.Sql.Sql100DatabaseSchemaProvider</DSP>
or possibly this
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.SqlTasks.targets" />
Any idea how to get past this error so I can load my project in VS2012?
Apparently Microsoft has a new Sql1110 DSP in VS2012. VS2010 has version Sql1100.
To fix this, inside your .dbproj file, change the following lines:
<ProjectVersion>4.0</ProjectVersion>
<ProjectGuid>{a233d7e8-b460-4b72-a345-aaeee4fb3aca}</ProjectGuid>
<DSP>Microsoft.Data.Schema.Sql.Sql100DatabaseSchemaProvider</DSP>
...
<!--Import the settings-->
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.SqlTasks.targets" />
<ItemGroup>
to this:
<ProjectVersion>4.1</ProjectVersion>
<ProjectGuid>{6cd7e290-f844-4410-97f6-e8fd6e63c5b5}</ProjectGuid>
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql110DatabaseSchemaProvider</DSP>
...
<!--Import the settings-->
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
<ItemGroup>
I created a new blank database project file in VS2012, compare the .sqlproj file to my old .dbproj, and the lines above are the main differences. Yes, microsoft changed the proj file extension, but you dont have to change your old dbproj extension. It works on me.
Since we don't have a full set of code to check on, it's hard to understand the exact problem, but for your import - you should change it to this:
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Schema.SqlTasks.targets" />
If this doesn't solve the problem, please also update if you have Resharper installed by any chance, and try deleting its cache.
Just so other people may also encounter this same issue on VS2013, open your database project file .dbproj or .sqlproj in text editor:
Change:
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.SqlTasks.targets" />
To:
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
And from
<ProjectVersion>4.0</ProjectVersion>
To:
<ProjectVersion>4.1</ProjectVersion>
And from
<DSP>Microsoft.Data.Schema.Sql.Sql100DatabaseSchemaProvider</DSP>
To:
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql120DatabaseSchemaProvider</DSP>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With