I'm trying to follow the process found at this documentation:
(Can't Link, google "Convert an original SQL project to an SDK-style project")
Goes to Microsoft documentation on Sql Server Data Tools sqlprojx format.
And for the most part the upgrade was easy. I only have one major blocker, which is that the project is unable to reference objects found in the msdb or master db. In the old project format we were able to reference system databases and that does not appear to be available in the new project format.
I thought that the new project style was supposed to support nuget, but when I try to add the Microsoft.SqlServer.Dacpacs.Master nuget as a reference i get the following error:
{
Attempting to gather dependency information for package ‘Microsoft.SqlServer.Dacpacs.Master.160.2.2’ with respect to project ‘Database’, targeting ‘.NETFramework,Version=v4.7.2’
Gathering dependency information took 82 ms
Attempting to resolve dependencies for package ‘Microsoft.SqlServer.Dacpacs.Master.160.2.2’ with DependencyBehavior ‘Lowest’
Resolving dependency information took 0 ms
Resolving actions to install package ‘Microsoft.SqlServer.Dacpacs.Master.160.2.2’
Resolved actions to install package ‘Microsoft.SqlServer.Dacpacs.Master.160.2.2’
Install failed. Rolling back…
Package ‘Microsoft.SqlServer.Dacpacs.Master.160.2.2’ does not exist in project ‘Database’
Package ‘Microsoft.SqlServer.Dacpacs.Master.160.2.2’ does not exist in folder ‘C:\Database1\packages’
Executing nuget actions took 76 ms
Package ‘Microsoft.SqlServer.Dacpacs.Master 160.2.2’ has a package type ‘DACPAC’ that is not supported by project ‘Database’.
}
Example Error:
Procedure: [dbo].[sp_XXXX] contains an unresolved reference to an object. Either the object does not exist or the reference is ambiguous because it could refer to any of the following objects: [sys].[indexes].[I]::[name], [sys].[indexes].[name], [sys].[objects].[I]::[name] or [sys].[schemas].[I]::[name].
Procedure: [dbo].[sp_XXXX] has an unresolved reference to object [dbo].[sp_executesql].[@replacementValueOUT].
Anyone have any suggestions?