Solved problems with cooperating of Visual Studio 2012 and SQL Server 2008

Hi guys,

  Today I've solved a problem of absense of SQL Server on mine machine after I had installed new Visual Studio 2012. So, a lil'bit of story...

  Recently I was needed to reinstall Windows 7 on mine machine and clearly install all the software for my work, like IDE's, SQL server, etc. So, after I've installed Visual Studio 2010 I decided to install trial version of newely available Visual Studio 2012 to look at it. VS 2010 installed some SQL Server 2008 developer tools and components and VS 2012 did the same for the SQL Server 2012. And I thought that all is gonna be OK with installing of SQL Server 2008 Express for working with databases from ASP.NET MVC... and I've installed it.

  I have ASP.NET MVC3 application with using of Entity Framework Code First as the ORM. As you probably now it lazily generates the database depending on the rules you have created for it (Inherit yours DBContext from the DropCreateDatabaseAlways or DropCreateDatabaseIfModelChanges classes). But after staring of my application it didn't call Seed method of my DatabaseInitializer and generated exception like "A network-related or instance-specific error occurred..." (here is description from Microsoft).

  When I came to the "My Computer -> Manage -> SQL Server Configuration management" and I saw the error instead of loaded information about the SQL Servers and services. Furthermore, after I've tried to reinstall SQL Server 2008 Express it finished with the Crash. Unfortunately I didn't have the screenshot, but it was telling about some conflit with assemblies dependencies.

  The probem is in the order of installing components. You should install SQL Server 2008 BEFORE you have installed Visual Studio 2012.

  All became perfect after I've completely uninstalled VS 2012 and than installed (1) SQL Server and (2) VS 2012.

  That's it for now. I hope to help someone who got the problem like this.

Комментарии

Популярные

Кастомизируем ASP.NET Identity 2.0

Делаем себе бесплатный VPN на Amazon EC2

Выбираем все плюсы из трех парадигм Entity Framework