【发布时间】:2017-03-29 17:17:34
【问题描述】:
我在使用 VS 2015 MSBuild 通过命令行部署数据库项目时遇到问题。问题是我需要能够在没有安装 VS 2013 的情况下仅使用 14.0 的 MSBuild。
我正在使用 14.0 MSBuild:
C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe
因为我还安装了 Visual Studio 2013 和相应的 SQL Server 数据工具,所以以下工作有效:
MSBUILD "C:\Users\XYZ\Desktop\temp\Testing\TestProject\TestProject.sqlproj" /t:build "/p:Platform=AnyCPU" /t:deploy "/p:TargetConnectionString=Data Source=localhost;IntegratedSecurity=True" /p:TargetDatabase=TestDeployDb /p:Configuration=Release /p:VisualStudioVersion=12.0
但是,如果我将“VisualStudioVersion”更改为“VS 2015 的 14.0”,则会出现错误:
Deploy error Deploy72002: Unable to connect to master or target server 'TestDeployDb'. You must have a user with the same password in master or target server 'TestDeployDb'.
【问题讨论】:
标签: sql-server visual-studio visual-studio-2015 msbuild database-project