Поделиться через


Error Saving Your Access 2013 Web App as an .app Package

If you are getting an error tying to save your Access 2013 Web App as an app package, either for backup purposes or for migration purposes, you may encounter some (a lot) difficulty getting it to work.

image

The error message you’ll receive from the Access 2013 Client after the packaging process spins for a few seconds is not terribly helpful, but it does have a correlation id, so it’s a start, right?

image

After a few hours of staring at SharePoint Diagnostic (ULS) logs on a raining Friday afternoon, I finally found this gem on the SharePoint server hosting the Access Services Service Instance (not the WFE server where the correlation id matched in the error message). 

Product Access Services   
Category Application Design   
EventID aibye   
Level Unexpected   
Message DacManager.ExecuteDacOperation: DAC operation failed with exception {Microsoft.Office.Access.Services.Design.TemplateException: Sorry, an app package could not be created.     at Microsoft.Office.Access.Services.Design.DacManager.Extract(String connectionString, Stream dacStream)     at Microsoft.Office.Access.Services.Design.DacManager.ExecuteDacOperation(DacOperation operation, DacOperationType type)}.

Followed by this

Product Access Services
Category Data Layer
EventID aiouy
Level Critical
Message Access Services encountered an exception while performing an operation on an Access package. Message: 'The DAC component Microsoft.SqlServer.Dac, Version=10.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a was not found at C:\Program Files (x86)\Microsoft SQL Server\110\DAC\Bin\Microsoft.SqlServer.Dac.dll.'.

After a bit searching, I finally found that the that DLL is party of the Microsoft SQL Server 2012 Data-Tier Application Framework:

Microsoft® SQL Server® 2012 Data-Tier Application Framework

The SQL Server Data-tier Application (DAC) framework is a component based on the .NET Framework that provides application lifecycle services for database development and management. Application lifecycle services include extract, build, deploy, upgrade, import, and export for data-tier applications in SQL Azure, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, and SQL Server 2005 through SQL Server Data Tools and SQL Server Management Studio. Note: Microsoft SQL Server 2012 Data-tier Application Framework requires Microsoft SQL Server System CLR Types, and Microsoft SQL Server Transact-SQL ScriptDom both of which are available on this page.

X64 Package

Naturally, I downloaded the package installed on the application server and figured all was good.  I tried to package the app again and still encountered the error popup.  Back to the ULS logs.  This time I found a new error:

Product Access Services   
Category Application Design   
EventID aibyf   
Level Unexpected   
Message

DacManagerPeer.Extract: Exception thrown during package extraction: {System.TypeInitializationException: The type initializer for 'Microsoft.SqlServer.Dac.DacServices' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SqlSchemaModelStaticState' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.TransactSql.ScriptDom, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.     at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlCoreAnnotationRegister.RegisterModelAnnotations(ModelSchema storeSchema)     at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel.SqlSchemaModelStaticState.RegisterModelSchema()     at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel.SqlSchemaModelStaticState..cctor()     --- End of inner exception stack trace ---     at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel.InitializeModelSchema()     --- End of inner exception stack trace ---     at Microsoft.SqlServer.Dac.DacServices..ctor(String connectionString)     at Microsoft.Office.Access.Services.Design.DacManagerPeer.Extract(String connectionString, Stream dacStream, IEnumerable`1 includedData, String databaseName)}  

Getting closer…  Turns out, I didn’t bother to read the requirements of the Data-Tier Application Framework, it clear states that the package requires both the Microsoft SQL Server System CLR Types, and Microsoft SQL Server Transact-SQL ScriptDom.  

Microsoft® System CLR Types for Microsoft® SQL Server® 2012

  • The SQL Server System CLR Types package contains the components implementing the geometry, geography, and hierarchy id types in SQL Server 2012. This component can be installed separately from the server to allow client applications to use these types outside of the server.

  • Note:

  • This component also requires

  • Windows Installer 4.5

Microsoft® SQL Server® 2012 Transact-SQL ScriptDom

  • Microsoft SQL Server Transact-SQL ScriptDom is a .NET Framework API that provides parsing and scripting services for Transact-SQL. This API supports SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2 and SQL Server 2012 versions.

After installing both, and IIS reset for good measure, BAM! a successful packaging of my Access 2013 Web App package.

Comments

  • Anonymous
    February 03, 2014
    The comment has been removed