且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

发布配置文件中的Visual Studio数据库项目目标平台

更新时间:2022-12-05 20:11:17

Azure,MSSQL 2014和MSSQL 2016对数据库项目有不同的限制和要求.

Azure, MSSQL 2014, MSSQL 2016 have different limitations and requirements to Database Project.

让我们想象一下: 您正在MSSQL 2014中使用FILESTREAM,并将在MSSQL 2016中使用.数据库项目中描述了您的FILESTREAM.现在,您在解决方案中添加了Azure支持,并希望部署数据库.但是,Azure 不支持文件流.

Let's imagine: You are using FILESTREAM in MSSQL 2014 and will use in MSSQL 2016. And your FILESTREAM is described in Database Project. Now, you add Azure support in your solution and want to deploy database. But, Azure does not support FILESTREAM.

因此,在这种情况下,您不能拥有一个数据库项目.您需要选择支持的最小目标项目:

So you can't have one database project in this case. You need to select minimal supported target project:

在这种情况下,它是Microsoft Azure SQL数据库(或V12).选择最低支持的目标平台后,可以确定所有更高"版本都将支持它.

In this case, it's Microsoft Azure SQL Databse (or V12). When you select minimal supported target platform, you can be sure that all "higher" versions will support it.

假设,Azure是MSSQL Server功能的某些子集.然后Database Project会在目标平台上验证所有使用的功能.

Assume, that Azure is some subset of MSSQL Server features. And Database Project validates all using features across target platform.

如果您担心选择Microsoft Azure SQL Databse作为目标平台,则无法发布到MSSQL Server 2016-没问题,它将起作用.

If you afraid that selecting Microsoft Azure SQL Databse as target platform you won't able to publish to MSSQL Server 2016 - no problem, it will work.

如果您需要使用其他连接字符串或发布设置,请创建其他发布配置文件.

If you need to use different connection strings or publish settings - create different publish profiles.