我需要安装Microsoft SQL Server还是Visual Studio Community 2017默认提供它?

时间:2018-11-06 06:58:03

标签: c# asp.net sql-server database visual-studio-2017

我已经安装了Visual Studio Community2017。现在我想在应用程序中使用数据库,但是我

TITLE: Error
------------------------------

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

The system cannot find the file specified

------------------------------
BUTTONS:

OK
------------------------------

i 有人可以告诉我我做错了什么吗?

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

Visual Studio默认不提供此功能。但是您可以立即使用LocalDB,它是SQL Server Express的兼容轻量级开发版本,在大多数情况下都可以满足您的需求。 为此,您只需要在安装过程中勾选某些复选框,您的Visual Studio安装也可以在以后进行修改,请参见以下非常有用的文章:

How to install LocalDB 2016 along with Visual Studio 2017?