Search code examples
c#sqlvisual-studiosqlproj

Error "database compatibility level is not supported." while import MSSQL db


I try to import db schema (MSSQL2008) by Visual Studio 2015 using SqlProj. There are two database to do.

DevDb ver. 10.50.4000 <- I log with Windows Credentials
TestDb ver. 10.50.6000 <- I log with sql's user

Compability level 100 for both dbs is "100".

For first everything goes fine, but for second db error occurs.

"The server version or database compatibility level is not supported."

There is no logs, any entry in EventLog. Mayby I should install something plugin for VisualStudio to handle litter newer version?


Solution

  • Just ran into this one myself importing a 2008 database into VS 2017.

    To start, make sure the project is set for the database version you're using.

    • Go to Project -> Properties ...
    • Pick the correct Target Platform
    • Hit Database Settings, and go to Miscellaneous
    • Verify your Compatibility level
    • Save these changes (Control + S)
    • Then - CLOSE THE PROJECT. I closed VS completely
    • Open everything back up.

    Your changes should have taken effect, allowing you to import the database.