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 :
Microsoft Dynamics AX (Archived)

TFS sync error + MSB4018: The "GenerateRdlTask" task failed unexpectedly.

(0) ShareShare
ReportReport
Posted on by 1,235

MSB4018: The "GenerateRdlTask" task failed unexpectedly.
Microsoft.VisualStudio.Modeling.ModelingException: Cannot save \SSRS Reports\Reports\CustAccountStatementExt because it is checked-in. Check out the node and redo your operation.

Receiving the above error for couple of other reports on Force synchronizing with TFS.

Steps followed to receive this error. Our TFS is linked to a model in CUS layer

1. Take SQL Backup from prod

2. Restore the backup in DEV environment

3. Delete the TFS workspaces from Visual studio>solution explorer on DEV 

4. Start AOS

5. open AX> Setup TFS parameters

6. Start Force Sync

Tried deleting and readding the reports to TFS

Tried on couple of other dev machines

Tried deleting all the CUS layer changes(deleted the model), Compile, database sync, CIL and TFS sync

Please help

*This post is locked for comments

I have the same question (0)
  • Klaas Deforche Profile Picture
    2,433 on at

    Hi,

    Do you have visual studio projects for these ssrs reports in the AOT under \Visual Studio Projects\Dynamics AX Model Projects?

    I think I saw this error before. I believe that simply compiling the report will also trigger the same error as it tries to modify the project that matches the report. It does that when compiling a report (of for example when synchronizing with tfs, which will also compile the report). This won't happen with a full compile for some reason. It also doesn't happen in my environment anymore, maybe it was fixed (I'm on FP CU5), I'm not sure.

    I'm not sure but I think adding those projects to the AOT is optional. There is not a project for every report in AX so... If this is the case you could remove them from the AOT. If not, do a checkout of the project for that report and then sync with tfs.

    Please provide an update if that was the problem. SSRS is not my specialty but I hope this helps.

    Kind regards,

    Klaas.

  • SomuAx2012 Profile Picture
    1,235 on at

    Klaas,

    Thanks for you reply.

    One of the reports i am receiving error is standard purchase order report(PurchPurchaseOrderReport) which we have customized.

    There is already existing visual studio project for this report.

    This does not happen when i compile the report. The latest report changes are not being imported with TFS sync. I have my TFS Sync log fully in incomplete state. I mean the complete checkbox in TFS sync log is not checked for all the items.

    I tried to compile the report in other dev environments where the report was developed and checkedin from, it compliles ok. no errors.

    Please help.

  • Klaas Deforche Profile Picture
    2,433 on at

    Hi,

    Your first priority should be to clean up your sync log. If you can, process everything by clicking the Process button in the synchronization log. You might have to process it multiple time. Until everything is processed, no new items will be imported.

    You could also start anew by deleting the layer that contains your customization and by removing all items in the synchronization log. Followed by a force sync with TFS.

  • SomuAx2012 Profile Picture
    1,235 on at

    I have tried to process the sync log previously, but only once. I am now going to process it multiple times as you said.

    When i try to checkout my ssrs report, it is failing with error message saying something like - the item has not been imported correctly in previous sync and cannot checkout.

    Will try deleting the layer simultaneously on another box.

    Will keep you posted. Thank you very much for all your ideas. Talked to microsoft people about this, but didi not get any useful response yet.

    Delete the layer - Did you mean delete the models in the layer?

  • Community Member Profile Picture
    on at

    We are facing a similar issue on one of our development box. Were you able to fix. Also the synchronization log will not process thru.

  • SomuAx2012 Profile Picture
    1,235 on at

    I have been breaking my head on this issue for 10 days now.

    After some research i found that compiling visual studio project corresponding to the report will also give the same error.

    You can process the log by deleting the records related to visual studio projects> ax model projects from the log table.

    Also try processing the log with your SSRS reports checked-out.

    The reason behind this may be the fact that after importing the changes from local repository, AX tries to compile the objects it imported. When compiling the visual studio project it tries to write some information to corresponding SSRS reports, which are not editable because they are locked by TFS.

    This problem most likely occurs only for the reports with their corresponding visual studio projects modified.

  • Community Member Profile Picture
    on at

    Thank you for the response. Following your approach it will compile the SSRS report and VS project, but in return It keeps popping the error on a different SSRS report. Also the synchronization log does not complete even after tying to process multiple times.

  • SomuAx2012 Profile Picture
    1,235 on at

    Were you able to fix this issue? I was able to move forward by restoring an old sql backup and then doing the TFS sync.

    Did you find the solution?

  • Community Member Profile Picture
    on at

    I still need to investigate deeper on what causes this, but a quick resolution is to check out the SSRS report, then compile the Visual Studio Project, then check the SSRS report back in.  If you export the SSRS report to XPO before and after the check-in, you will see it gets a new RDL # (RDL 232436 for example) and that's pretty much the only change.

  • Suggested answer
    Ivan 84 Profile Picture
    10 on at

    Hi everyone,

    I see the last post was written four years ago, I'm late, but better late than never.

    I reproduce this error in an AX 2012 R2 CU9. When synchronize TFS with force option I get that "TFS sync error + MSB4018: The "GenerateRdlTask" task failed unexpectedly".

    Then I change app code to try to sync only some folders and I found that the folder that was generated these compilation errors was the Project folder (The folder that contain the ax projects definition). It not only affect to the error that we want solve, also it’s a big performance issue, because the sync process with force option, not only compile all the objects included in the TFS one time, also compile all the objects included in projects node, then is possible for example that if “custTable” object form is included in 10 projects, it will be compiled 11 times by the process. If the project include many objet that not are included in the control version these are compiled also many times.

    Then, one time we know the issue, the solution is to exclude the projects node from compile when sync TFS with force option. We check that isn’t necessary compile a project definition, when we synchronize a project definition without compile we get the changes without any problem.

    To apply the solution we can use the next code:

    In the method “compileAndSaveAfterImport” in the Table “SysVersionControlSynchronizeLog” we must change the next code:

    If(!(treeNode is DocNode)) //line 36

    To

    If( !(treeNode is DocNode) //line 36

    && !(treeNode is ProjectNode)) //line 37

    Best regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans