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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Object Reference Not set to an instance of an object

(0) ShareShare
ReportReport
Posted on by 60

Hi Everyone,

Hi There,

I get an error on Visual Studio when I open the Project. I am using Visual Studio 2017. 

Its gives the error "Object Reference Not set to an instance of an object" tried couple of things I found n the web and no success.

I have attached the Screen shot of what happens.Neither I can build models and even synchronization database is running continue??

Many errors getting while opening visual studio also"Object Reference Not set to an instance of an object"Value cannot be nullerror reading metadata

I have the same question (0)
  • Martin Dráb Profile Picture
    236,289 Most Valuable Professional on at
    RE: Object Reference Not set to an instance of an object

    As the first thing, I would restart the machine. It sometimes solves weird problems.

    Did it work before? If so, what has changed? For example, didn't you install an update or something?

    If I understand it correctly, you're getting errors already when opening VS; it's not a problem specific to opening of a project. Is that correct?

  • GirishS Profile Picture
    27,825 Moderator on at
    RE: Object Reference Not set to an instance of an object

    Hi Yasir Khan,

    Last screenshot you have pasted is not clear. Its saying something like metadata is corrupted or there is duplicate elements with same name in different models. Check whether you have duplicate items(Elements with same name in multiple models) in the custom model.

    Thanks,

    Girish S.

  • YasirKhan Profile Picture
    60 on at
    RE: Object Reference Not set to an instance of an object

    Visual Studio was updated and problem that any project I am opening ,Object Reference Not set to an instance of an object is shown in output window also. Earlier it was working

  • YasirKhan Profile Picture
    60 on at
    RE: Object Reference Not set to an instance of an object

    Thanks for that and what about other errors you have to say.

  • GirishS Profile Picture
    27,825 Moderator on at
    RE: Object Reference Not set to an instance of an object

    Hi Yashir Khan,

    Because of the duplicate elements in the custom model you are getting all the above error I guess. Try to find out the duplicate elements in your custom models and delete them or rename it.

    Thanks,

    Girish S.

  • YasirKhan Profile Picture
    60 on at
    RE: Object Reference Not set to an instance of an object

    But I am unable to open projects,How can I find duplicate elements in custom models?Do I have to go source/repos folder of projects

  • GirishS Profile Picture
    27,825 Moderator on at
    RE: Object Reference Not set to an instance of an object

    Is the Application explorer opening? If yes you can search it there.

    Also as per martin comments what changes you made to the model before the issue is thrown? Also he said to restart the server - Have you done that?

    Thanks,

    Girish S.

  • Martin Dráb Profile Picture
    236,289 Most Valuable Professional on at
    RE: Object Reference Not set to an instance of an object

    Projects don't contain actual model elements. They're stored in the metadata folder (PackagesLocalDirectory, by default).

  • YasirKhan Profile Picture
    60 on at
    RE: Object Reference Not set to an instance of an object

    I have restarted the server and still same issue.

  • YasirKhan Profile Picture
    60 on at
    RE: Object Reference Not set to an instance of an object

    These errors were already coming before update visual studio also.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,188

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 868 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 593 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans