I have a DB project I created by connecting to a SQL 2016 instance and importing the database into visual studio.
I created a deployment by creating a publish file and checking it into the source control. Among the settings I had to change were to not deploy any user accounts or permission changes as it wanted to drop several accounts from my system.
When TFS executes MSBuild to do the deployment, here's the command line arguments that are passed: /p:VisualStudioVersion=14.0 /t:Build;Publish /p:SqlPublishProfilePath=MyDBProj.publish.xml
The problem lies in that if I do not exclude the CLR user defined types and also exclude assemblies, the deployment fails with the following (among many other similar) errors:
C:\Builds\1\MyDBProj\MyDBProj - Prod\bin\MyDBProj.publish.sql (0, 0)
[System.Web] has an unresolved dependency to [System.Design]. A deployment script with correct ordering cannot be created.
C:\Builds\1\MyDBProj\MyDBProj - Prod\bin\MyDBProj.publish.sql (0, 0)
[System.Runtime.Remoting] has an unresolved dependency to [System.Web]. A deployment script with correct ordering cannot be created.
C:\Builds\1\MyDBProj\MyDBProj - Prod\bin\MyDBProj.publish.sql (0, 0)
[System.Design] has an unresolved dependency to [System.Web]. A deployment script with correct ordering cannot be created.
C:\Builds\1\MyDBProj\MyDBProj - Prod\bin\MyDBProj.publish.sql (0, 0)
An error occurred during deployment plan generation. Deployment cannot continue.
(-1, 0)
Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException)
Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
I've tried referencing master as a database reference. I'm not sure what else to do though. I need the CLR components deployed with the database when built on TFS.