none
The Element or Annotation class PersistedResolvableAnnotation does not contain the Property class Length RRS feed

  • Question

  • Hi there,

    after installing the latest SSDT BI Tools Preview on my maschine i get the following error during deployment with SqlPackage.exe:

    Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModelException: Failed to load #####.DACPAC. --->
    Microsoft.Data.Tools.Schema.SchemaModel.ModelSerializationException: 
    The Element or Annotation class PersistedResolvableAnnotation does not contain the Property class Length.

    The source of the error can be found in the model.xml file:

    <Entry>
    	<References ExternalSource="#######.dacpac" Name="[$(#######SERVER)].[$(#######DB)]|[INDIVIDUAL].[EXPORT]" />
    	<Annotation Type="PersistedResolvableAnnotation" Name="[$(#######SERVER)].[$(#######DB)]|[individual].[export]">
    		<Property Name="TargetTypeStorage" Value="ISqlSynonymTarget" />
    		<Property Name="Length" Value="61" />
    		<Property Name="Offset" Value="61" />
    	</Annotation>
    </Entry>

    The corresponding entry created from the build server looks like this:

    <Entry>
    	<References ExternalSource="#######.dacpac" Name="[$(#######Server)].[$(#######DB)]|[INDIVIDUAL].[EXPORT]" />
    	<Annotation Type="PersistedResolvableAnnotation" Name="[$(#######Server)].[$(#######DB)]|[individual].[export]">
    		<Property Name="TargetTypeStorage" Value="ISqlSynonymTarget" />
    	</Annotation>
    </Entry>
    
    Seems like the latest update is creating incorrect models for users and synonyms :(

    Tuesday, March 22, 2016 12:45 PM

Answers

All replies

  • Hi Markus,

    Thanks for reaching out regarding this.  From time to time it's necessary for us to change the format of the model.xml file, and when this happens it's necessary to install the updated version of SqlPackage.exe, so that it can read the revised format.  The download is available here: https://www.microsoft.com/en-us/download/details.aspx?id=51238

    Thanks!

    Tuesday, March 22, 2016 10:04 PM
    Moderator
  • I had this problem immediately after updating to Visual Studio 2015, Update 2

    Steven's answer fixed it for me, but I'll add one extra note:  You need to make use of the new sqlpackage.exe, located at:

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130\sqlpackage.exe

    (\130\ being the new version)

    Wednesday, April 20, 2016 7:48 PM
  • Hi Steven Green,

    Is there a way that the build in VS 2015 Update 2 can be configured to build the dacpac in a format that is readable by earlier version of SqlPackage? Targeting a prerelease version of Sql is not an option in our case as we need to build a dacpac that is runnable wuth a 2008 R2 SqlPackage executable. This was possible to do in VS and build servers until Update 2.

    Thursday, April 28, 2016 11:41 PM
  • We had the same issue and resolved it by ensuring we used the sqlpackage in 

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130

    Rather than the one in 

    C:\Program Files (x86)\Microsoft SQL Server\120\DAC\bin\

    Friday, May 6, 2016 8:51 AM
  • Where is this actually specified? I'm looking at our giant database project, but cant see where the dacpac version is set?
    Monday, June 13, 2016 8:03 AM
  • This is very similar with the issue my company is getting after installing to VS Studio 2015 update 2 on the TFS Build server.  Is there any update on where to modify the run time location of the appropriate dacpac sqlpackage.exe (updating the system path, environment variables, registry) ?  The application uses a SQL Server 2008 back end and want to make sure that when the application is deployed that everything works as before. 

    Thanks.

    Wednesday, June 22, 2016 2:25 PM
  • Hi,

    We're using SQLPackage.exe to deploy the dacpac's to a server which does not have Visual Studio or SSDT installed.  I get the error too.  I've installed the latest version of SQLpackage (both 32 and 64 bit versions).

    but when I deploy the dacpac I get this error.

    the server I deploy to is SQL2014

    An unexpected failure occurred: The type initializer for 'Microsoft.SqlServer.Da
    c.DacPackage' threw an exception..
    
    Unhandled Exception: System.TypeInitializationException: The type initializer fo
    r 'Microsoft.SqlServer.Dac.DacPackage' threw an exception. ---> System.TypeIniti
    alizationException: The type initializer for 'Microsoft.SqlServer.Dac.DacService
    s' threw an exception. ---> System.TypeInitializationException: The type initial
    izer for 'SqlSchemaModelStaticState' threw an exception. ---> System.IO.FileNotF
    oundException: Could not load file or assembly 'Microsoft.SqlServer.TransactSql.
    ScriptDom, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' o
    r one of its dependencies. The system cannot find the file specified.
       at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlCoreAnnotationRegister.Regi
    sterModelAnnotations(ModelSchema storeSchema)
       at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel.SqlSchemaModelS
    taticState.RegisterModelSchema()
       at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel.SqlSchemaModelS
    taticState..cctor()
       --- End of inner exception stack trace ---
       at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel.SqlSchemaModelS
    taticState.get_ModelSchema()
       at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel.InitializeModel
    Schema()
       at Microsoft.SqlServer.Dac.DacServices..cctor()
       --- End of inner exception stack trace ---
       at Microsoft.SqlServer.Dac.DacServices.Initialize()
       at Microsoft.SqlServer.Dac.DacPackage..cctor()
       --- End of inner exception stack trace ---
       at Microsoft.SqlServer.Dac.DacPackage.Load(String fileName, DacSchemaModelSto
    rageType modelStorageType)
       at Microsoft.Data.Tools.Schema.CommandLineTool.DacServiceUtil.<>c__DisplayCla
    ss18.<GetDacPacFromDisk>b__16()
       at Microsoft.Data.Tools.Schema.CommandLineTool.ValidationUtil.SafeFileAccessW
    rapper(Func`1 action, Action`1 reportException)
       at Microsoft.Data.Tools.Schema.CommandLineTool.DacServiceUtil.GetDacPacFromDi
    sk(String filePath, DacSchemaModelStorageType storage, Action`1 writeError)
       at Microsoft.Data.Tools.Schema.CommandLineTool.DacServiceUtil.DoDeployAction(
    DeployArguments parsedArgs, Action`1 writeError, Action`2 writeMessage, Action`1
     writeWarning, CancellationToken cancellationToken)
       at Microsoft.Data.Tools.Schema.CommandLineTool.Program.DoDeployActions(Comman
    dLineArguments parsedArgs)
       at Microsoft.Data.Tools.Schema.CommandLineTool.Program.PerformAction(CommandL
    ineArguments parsedArgs)
       at Microsoft.Data.Tools.Schema.CommandLineTool.Program.Run(String[] args)
       at Microsoft.Data.Tools.Schema.CommandLineTool.Program.Main(String[] args)
    Other suggestions ?

    Wednesday, November 16, 2016 11:11 AM