web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Startspacers / Resolution: Failed to write...

Resolution: Failed to write runtime metadata to disk. Metadata file ‘ApplicationSuite_AxReport.md’ is corrupted.

Basheer17 Profile Picture Basheer17 2,720

I have created extensions for SRSPrintDestinationSettingsForm, SRSPrintDestinationSettings class and other elements of reporting framework in my solution. I was getting below error while building the solution.

Failed to write runtime metadata to disk. The exception was: ‘Unable to read metadata. Offset for element ‘AssetTaxStatistic’ is beyond the end of file ‘J:\AosService\PackagesLocalDirectory\ApplicationSuite\bin\ApplicationSuite_AxReport.md’.’

I have also tried running the full build. Then I was getting below error.

Unable to read metadata. Metadata file ‘J:\AosService\PackagesLocalDirectory\ApplicationSuite\bin\ApplicationSuite_AxReport.md’ is corrupted.

I have been working on this solution from many days, it was the first time I encountered this issue.

Resolution steps:

First trial:

  1. I have taken the backup of corrupted file, deleted it from the Bin directory.
  2. Then I’ve run a full build, I didn’t get any error, I’ve also checked the Bin directory it has created the .md file for me but it was of 1MB size, actual file was of 200MB+ size.
  3. Then I have tried to open a report from UI, I got “We’re working on it” message.
  4. Then I tried deploying all reports using powershell script from J:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask directory.
  5. Again no luck.

My second trial was I’ve added an existing report to my project by customizing, I’ve not made any changes and done build my solution, this time .md file size changed to 1.6MB from 1MB.

Although the .md has been updated, I wasn’t able to view the report from UI. After deploying the report I was able to view the report, only the one for which metadata has been updated.

So my final trial was

  1. Created a new project in my custom model (Application Suite package), added all reports to my project by Right click > Customize. I’ve done this because all reports reside in Application Suite model (In custom models if we do any customizations).
  2. I’ve done build on my new project, now the .md file’s size has changed to 200MB+.
  3. After deploying all reports using powershell script I was able to view all the reports
  4. (Optional) do a full build if you aren’t able to view the reports after above steps.
  5. Finally deleted all the customized reports from my new project, and deleted the project as well

Note: Every time that I’ve performed full build, Synchronize database check box was checked in options tab.

 

 


This was originally posted here.

Comments

*This post is locked for comments