Couldn't add Database file in Visual Studio 2013

Yes I know that this question has been asked many times, but this problem seems to be persistent.

I have had this error before but that was during hosting on IIS.For that reason I shifted from VS2013 to VS2010. There is no problem in VS2010, but I need VS2013 and now here I stand where I can’t even add a DATABASE FILE.

  • Query fails on “converting character string to smalldatetime data type”
  • SQL 2012 - Pivot and Unpivot
  • LINQ Confusion - Database not persisting after the application closes?
  • Check if SQL Server Client Is Installed
  • Subquery returned more than 1 value regardless of identity for Update statement
  • Query taking long time with DISTINCT
  • Now here is the error which I am getting while adding a database :

    A network-related or instance-specific error occurred while
    establishing a connection to SQL Server. The server was not found or
    was not accessible. Verify that the instance name is correct and that
    SQL Server is configured to allow remote connections. (provider: SQL
    Network Interfaces, error: 50 – Local Database Runtime error occurred.
    Cannot create an automatic instance. See the Windows Application event
    log for error details. )

    Now I understand there is some error with the SQL Server’s version, I tried all that is said within this : http://kbijayanta.azurewebsites.net/tag/localdbv12-0/ link.

    What is a definitive solution for this ?

  • Best way to extract segments / values from VARCHAR field in SET based SQL
  • SQL - Dynamic Condition in Where Clause
  • Alternate of lead lag function in sql server 2008
  • SQL select on a many-to-many table
  • Three way join in sql
  • select where x in y with varying lengths
  • 2 Solutions collect form web for “Couldn't add Database file in Visual Studio 2013”

    Just don’t copy paste question anyway if you want asnwer

    1. Open command prompt
    2. Run SqlLocalDB.exe start v11.0
    3. Run SqlLocalDB.exe info v11.0
    4. Copy the instance pipe name that starts with np:…
    5. In Visual Studio select Tools > Connect to Database...
    6. For Server Name enter (localdb)\v11.0. If it doesn’t work, use the instance pipe name that you copied earlier. You can also use this to connect with SQL Server Management Studio.
    7. Select the database on next dropdown list
    8. Click OK!

    Try this

    delete and recreate your LocalDB\v11.0 database! At the command prompt type:

    sqllocaldb delete v11.0  
    sqllocaldb create v11.0
    

    I copied it but I got same error and thanks it worked for me perfectly

    1. Open command prompt
    2. Run SqlLocalDB.exe start v11.0
    3. Run SqlLocalDB.exe info v11.0
    4. Copy the instance pipe name that starts with np:…
    5. In Visual Studio select Tools > Connect to Database...
    6. For Server Name enter (localdb)\v11.0. If it doesn’t work, use the instance pipe name that you copied earlier. You can also use this to connect with SQL Server Management Studio.
    7. Select the database on next dropdown list
    8. Click OK!
    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.