Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8516507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:26:56+00:00 2026-06-11T05:26:56+00:00

I’m working with Entity Framework 5 using code-first with DBContext and no config file

  • 0

I’m working with Entity Framework 5 using code-first with DBContext and no config file (all defaults). I have SQL Server 2008 R2 with the default instance .\SQLEXPRESS installed and also SQL Server 2012 Express LocalDB (localdb)\v11.0).

The framework doesn’t seem to be able to handle these side by side and throws an exception when I run my app. I confirmed by removing SQL Server 2012 Express LocalDB and it works fine.

An interesting point is that when I run NuGet to install Entity Framework in either VS 2010 or VS 2012 it crashes VS and fails to install the framework. My suspicion is that similar code is being used to find/select servers in both cases. This post is intended to bring this to the attention of the Entity Framework team and not necessarily solve it here. I’d be happy to provide any addtional data that the team might require.

Edit –

I found where the problem with NuGet may be exposed:

When you installed the EF NuGet package a default connection factory
was registered that points to either SQL Express or LocalDb, depending
on which one you have installed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:26:57+00:00Added an answer on June 11, 2026 at 5:26 am

    It is hard to tell whether it is a EF bug or not since there is not enough details in the post. The scenario where you have both SqlExpress and LocalDB is supported and should work. SqlExpress is by default installed with VS2010 but not with VS2012 where the default database solution is LocalDb. It’s true that there is a piece of code that detects if you have SqlExpress installed on your box and if you do it will add entries to you config file accordingly. AFAIR on VS2012 if you don’t have SqlExpress LocalDB should be used by default. I have never seen VS crashing when installing EF nuget package. As I said above – there is not enough details to tell whether this is an EF bug or not – there just too many things in the play i.e. VS itself (the installation / common components can be somehow broken), NuGet, PowerShell (the scripts actually installing dlls are PowerShell scripts) and of course EF. Feel free to report this issue here: http://entityframework.codeplex.com/ – this way the bug will be looked at by the EF team. Put as much details as possible so that we are able to replicate the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and
I have this code to decode numeric html entities to the UTF8 equivalent character.
We're building an app, our first using Rails 3, and we're having to build
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
I have a reasonable size flat file database of text documents mostly saved in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.