35

The error says:

Failed to create extension manager for the target platform 'Microsoft.Data.Tools.Schema.Sql.Sql120DatabaseSchemaProvider'.

My teammate created the DB Project, but when I pulled it down from source control it failed to create.

jocull
  • 20,008
  • 22
  • 105
  • 149

4 Answers4

57

The solution is to get an update to the "SQL Server Data Tools". You apparently have an older version.

Look in Visual Studio 2013 under Tools-->Extentions and Updates. On the left pane from there, click on Updates. Hopefully you'll be able to find the update you need there.

(Alternatively, run a repair installation on "SQL Server Data Tools" under Windows' Control Panel-->Programs.)

Wayne Bloss
  • 5,370
  • 7
  • 50
  • 81
Glen Weaver
  • 594
  • 5
  • 2
  • this was helpful, note I had to shut down VS2013 and reopen after the install of the SSDT update. – Chris Amelinckx Feb 18 '15 at 19:32
  • 2
    I got this error today and I don't have an SSDT update listed under Extensions and Updates. So, I ran a repair on Microsoft SQL Server Data Tools 2013 and that worked. – Wayne Bloss Feb 25 '15 at 17:43
16

I fixed this problem by lowering the required version of the tools. I'm not sure why they are installed on his machine and not on mine, but edit the dbproj file and change the requirement to a lower version, like this:

Original:

<SchemaVersion>2.0</SchemaVersion>
<ProjectVersion>4.1</ProjectVersion>
<ProjectGuid>{......}</ProjectGuid>
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql120DatabaseSchemaProvider</DSP>
<OutputType>Database</OutputType>
<RootPath>
</RootPath>

Updated: (don't include the *'s)

<SchemaVersion>2.0</SchemaVersion>
<ProjectVersion>4.1</ProjectVersion>
<ProjectGuid>{......}</ProjectGuid>
**<DSP>Microsoft.Data.Tools.Schema.Sql.Sql110DatabaseSchemaProvider</DSP>**
<OutputType>Database</OutputType>
<RootPath>
</RootPath>
jocull
  • 20,008
  • 22
  • 105
  • 149
  • 1
    Awesome! I had the same problem and your question and answer helped me a lot. – Water Cooler v2 Jul 24 '14 at 00:32
  • 2
    This isn't fixing the problem, this is accommodating it. If your project is trying to use the latest and greatest you shouldn't dumb it down. – Michael Eakins Oct 19 '14 at 15:13
  • 1
    I think it's a byproduct of every developer not having exactly the same thing installed. Having a tightly controlled toolchain for everyone is probably the "fix". – jocull Oct 20 '14 at 16:18
  • Downvoted because updating the SQL Server Data Tools should be the accepted answer/solution. – dgundersen Jan 13 '15 at 16:22
  • 2
    In my corporate environment, I am not allowed to install a higher version so this was the only solution that actually worked for me. – michaelkoss Mar 09 '16 at 14:15
  • My project is **not** '*trying to use the latest and greatest*', our strategy is more '*string this stack along for as long as possible, ideally my retirement*', so this is good for me. – Chris Jun 25 '18 at 19:34
5

Had the same problem and tried the above solutions, though even creating a new project from scratch was getting the same error message. I was also getting "File exists" for some reason.

I found the following in the event viewer:

Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.IOException
   at System.IO.__Error.WinIOError(Int32, System.String)
   at System.IO.Path.InternalGetTempFileName(Boolean)

Cleared my temp directory and now the database projects are once again behaving. This is probably not a real common solution to this problem, but wanted to get the info out there in case it can help anyone else!

Brian Riley
  • 926
  • 1
  • 7
  • 12
  • I tried the repair (both the SQL Server Data Tools and Visual Studio), neither worked. Finally deleted %TEMP% folder contents as suggested here and opened quickly and first time! Thanks @Brian – John Warlow Jun 16 '16 at 13:51
  • 1
    after doing all of the above deleting the %TEMP% contents worked for me. – user2246494 Oct 24 '17 at 13:28
  • 1
    This should be the selected answer. I've wasted more than 3 hours. Thanks for letting us know about the TEMP folder – Erlis Vidal Jul 27 '18 at 22:13
0

You can try these steps:

  1. Try adding another database project in your solution.
  2. Enter in the edit the DBProj File
  3. Copy the DSP and use that one.

I was trying to move the proj from vs2013 to vs2012 and it worked for me. The provider was:

<DSP>Microsoft.Data.Tools.Schema.Sql.Sql110DatabaseSchemaProvider</DSP>

You can try the one above if you have VS2012.

istruble
  • 13,363
  • 2
  • 47
  • 52