I am recreating an Azure resource group deployment that contains a working azure sql
server. I am repeating the targeting of a dacpac
to an azure sql
server instance that has exactly the same specs. I believe I am doing it the same way I did it a year ago.
My method uses a Visual Studio database project spun off ASP Net Core Web App Solution (web app database in VS SQL Server Object Explorer>Create New Project)
Create targeted dacpac
- right-click on project name in VS Solution Explorer & choose Properties
- under VS Project Settings* choose the target platform
- replace default Target Connection String in Properties>Debug
- navigate back to VS Solution Explorer. Right-click on VS Project again & choose Project Snapshot
- the following file type
rollbasesqldatabase_20230301_14-19-35.dacpac
is written to Snapshots folder in VS project - navigate to connected Azure
sql
server instance in VS SQL Server Object Explorer - right click and choose Publish Data-tier Application
The error I'm getting is familiar. But I'm getting it for all versions:
Publish failed. An error occurred during deployment plan generation.
Deployment cannot continue.
A project which specifies SQL Server 2014 as the target platform cannot be published to Microsoft Azure SQL Database V12.
This occurs for me on target platforms SQL Server 2012, 2016 & 2019 too
My data source server is:
Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=aspnet-rollbase-6D7D2449-EB25-45CE-A8D3-EDAB69CDCAB3;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False
My publish database connection is on this server in VS:
Data Source=(localdb)\ProjectsV13;Initial Catalog=master;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False
My Properties>Debug edit is from:
Data Source=(localdb)\ProjectsV13;Initial Catalog=rollbasesqldatabase;Integrated Security=True;Pooling=False;Connect Timeout=30
Edited
Data Source=rollbasesqlserver.database.windows.net;Initial
Catalog=rollbasesqldatabase;Persist Security Info=True;User
ID=rollbaseAdmin;Pooling=False;MultipleActiveResultSets=False;Connect
Timeout=60;Encrypt=True;TrustServerCertificate=False
I noticed the V13
reference of the server which hosts the database that I (right-click) Publish Data-tier Application. Is this relevant? This post Purpose of ProjectsV13 LocalDB instance seems inconclusive to me.
Other than this I have no idea why this dacpac
deployment fails when I have done it before.