Running SPMetal on Sharepoint site or any of its subsites returns

object reference not set to an instance of an object

Is there a log or any way to find out what's going wrong? I cant seem to generate classes

I am using Sharepoint 2013 and a Webpart in C#


SharePoint write the logs (called ULS) on the server. if you have access to the server then you can checked it from there.

  • go to the central admin site --> Monitoring --> Configure diagnostic logging. on this page you will see the path of the logs file.
  • if you have multiple servers then you have to collect logs from all server. there is a command which can merger log file from all server in one file. you can user Merge-Splogfile.
  • To read the files in good way you can use ULS viewer tool

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.