Visual studio Error : "Object reference not set to an instance of an object" and "Failed to load the document due to an internal error"

Paola FONKOU MBOULA 0 Reputation points
2025-10-02T08:36:44.6966667+00:00

Hello, I have these 2 errors when I do developments in Visual Studio.User's image

This one appears when I delete an object from my VS D365 project, and this one when I try to rename an object in my project (for example I start from a standard d365 report I create a copy in my project that I try to rename and I have this error:

User's image

And then the object is deleted from my project.

Do you have any solutions? Do you need more context?

Thanks

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other
A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Le (WICLOUD CORPORATION) 3,495 Reputation points Microsoft External Staff
    2025-10-02T09:41:52.2866667+00:00

    Hello @Paola FONKOU MBOULA ,

    Thank you for reaching out.

    It seems like your project metadata is corrupted or your workspace synchronization is failing.

    You can follow these steps to resolve the issue. I recommend trying them in order.

    1. Run Visual Studio as Administrator
    2. Clean and Rebuild the Solution
      • Close Visual Studio and delete the bin and obj folders in your project directory.
      • In the Build menu, select Clean Solution.
      • Once complete, select Build > Rebuild Solution.
    3. Synchronize the Database
      • In Visual Studio, go to the Dynamics 365 menu and select Synchronize database....
      • Click Synchronize.
    4. Perform a Full Model Build
      • In Visual Studio, go to Dynamics 365 > Build models....
      • Select your model, check the Synchronize database on build option, and click Build.

    Please try these steps and see if they resolve the errors. If the problem persists after you have tried all of the above, it could indicate an issue with the D365 developer tools installation itself, and you may need to consider repairing your Visual Studio installation.

    I hope this helps.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.