I am trying to deploy an ssdt project using sqlpackage.exe utility.
I get the following error (in German):
Fehler bei der Erstellung des Bereitstellungsplans. Die Bereitstellung kann nicht fortgesetzt werden. Die Property-Klasse
Length ist nicht in der Element- oder Annotation-Klasse
PersistedResolvableAnnotation enthalten.
It means sth. like:
Error while creating deployment plan. Deployment cannot proceed. The
property-class Length is not included in the element or annotation
class PersistedResolvableAnnotation.
I could not find much information about "PersistedResolvableAnnotation". But I realized that it is included in the model.xml in the dacpac.
It contains handful of SqlLogins defined similar to this one:
<Element Type="SqlUser" Name="[Angela]">
<Property Name="IsWithoutLogin" Value="True" />
<Relationship Name="DefaultSchema">
<Entry>
<References Name="[Angela]" Disambiguator="8" />
<Annotation Type="**PersistedResolvableAnnotation**" Name="[Angela]">
<Property Name="TargetTypeStorage" Value="SqlSchema" />
<Property Name="Length" Value="8" />
<Property Name="Offset" Value="62" />
</Annotation>
</Entry>
</Relationship>
</Element>
Angela (and the other candidates) do not exist on destination server as Login, although they are registered database users in the target db. I would expect another error – if any – than this useless one.
The database the project is based on a pretty old SQL Server verison. Is it possible that this is some deprecated feature / syntax or property coming from Sql Server version and is simply not supported ?
Does anyone know more details?
Best Answer
I found the issue myself. I will document it in case anyone else is facing the issue in future.
The following user definition:
created the following code in the model.xml that avoids publishing, maybe because the schema (Angela) used there is invalid because it simply does not exist:
After changing the user definition to:
the model lookes as followes and could be published:
I have a feeling that this strange behavior is kind of a follow-up of another misbehavior because I would expect the not existing schema to raise a compiler error.