本文介绍了数据库项目部署在 Visual Studio 2013 中失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的解决方案中有一个数据库项目,该项目不会从 Visual Studio 2013 部署.它失败并显示错误消息 无法连接到目标服务器".

I have a database project in a solution which will not deploy from Visual Studio 2013. It fails with an error message "Unable to connect to target server".

同一个项目,在 Visual Studio 2012 中打开时部署没有问题.

The same project, when opened in Visual Studio 2012 deploys without an issue.

数据库是 Sql 2012 托管在 Sql 2014 引擎 (express) 中

The database is Sql 2012 hosted in a Sql 2014 engine (express)

因此部署设置(更改名称以保护无辜者):

The deployment settings are thus (with names changed to protect the innocent):

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <IncludeCompositeObjects>True</IncludeCompositeObjects>
    <TargetDatabaseName>TestDatabase</TargetDatabaseName>
    <DeployScriptFileName>TestDatabase.Database.sql</DeployScriptFileName>
    <TargetConnectionString>Data Source=.\SQL2014;Integrated Security=True;Pooling=False</TargetConnectionString>
    <ProfileVersionNumber>1</ProfileVersionNumber>
  </PropertyGroup>
</Project>

我还尝试使用用户名和密码而不是集成安全性进行部署...

I have also tried the deployment with using a username and password rather than Integrated security...

推荐答案

Visual Studio 2013 现在有一个更新,在工具下添加了 SQL Server 2014 支持 –> 扩展和更新 –> 更新

Visual Studio 2013 now has an update that adds SQL Server 2014 support under Tools –> Extensions and Updates –> Updates

帮助 -> 关于 Microsoft Visual Studio 下安装更新后,我看到我现在有SQL Server 数据工具 12.0.40403.0

After installing the update under Help -> About Microsoft Visual Studio I see I now haveSQL Server Data Tools 12.0.40403.0

现在 SQL Server 2014 是我的数据库项目设置中的一个选项,一切正常!

Now SQL Server 2014 is an option in my database project settings and everything works!

原始回复:

我也有同样的问题.看起来 Visual Studio 2013 的更新还没有出来:(

I have the same problem. It looks like the update for Visual Studio 2013 isn't out yet :(

在接下来的几天内,Visual Studio 2013 下载将通过 Visual Studio 更新通道(工具 –> 扩展和更新 –> 更新)出现.

http://blogs.msdn.com/b/ssdt/archive/2014/03/25/sql-server-data-tools-for-sql-server-2014-is-available.aspx

这篇关于数据库项目部署在 Visual Studio 2013 中失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 00:30
查看更多