I have a database project in Visual Studio 2012. When selecting "Deploy MyDBProj" on the Build menu nothing happens.

When I hit F5 to debug however, the database project is deployed, using the settings in the debug section of the database project properties. This is enabled in by checking the "deploy" checkbox in the solution's configuration manager.

I would like to be able to do a deploy, without starting a debug session. How do I do that?

Note: This is not publishing, which is something else. I want to know how to manually initiate the deploy that is part of the build process. Since the deploy is already done automatically it should be possible to initiate it manually too.

有帮助吗?

解决方案

I got an answer from Microsoft at MS Connect:

There was a bug in the version of SSDT that shipped in Visual Studio 2012 in wuich the Deploy menu command appears but is a no-op. This has since been fixed and is available in the latest version of SSDT: http://msdn.microsoft.com/en-us/data/hh297027

其他提示

The only way I can think of doing it (though I haven't tested it) would be to use the command line to do it as outlined at http://msdn.microsoft.com/en-us/library/dd193258(v=vs.100).aspx.

Though once you have your manifest, you can run:

VSDBCMD /a:Deploy /dd:+ /manifest:manifestFileName.dbmanifest

from a command line to deploy your database.

The manifest will contain your target database name, connection string, and so on but you can also specify those as part of the command line instead.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top