Error occurred in deployment step 'add solution'. Object reference not set to an instance of an object
Monday, February 13, 2012 5:20 PM
I am trying to create my first webpart. This webpart contains hello webpart lable only.
There is no error while build or a package is selected it runs successfully.
When I try to deploy it gives me the above error.
There is one more issue which I think is related to the same error.
I am trying to insert/add new records in my lists and document libraries but I am unable to do the same. No error is shown and the record also is not added in the list.
Monday, February 13, 2012 5:51 PM
Below link are of steps by step & a video on how to create a webpart in VS 2010
Follow these steps
& Watch this video
Happy Sharepointing... Regards SPTECH07
Monday, February 13, 2012 5:58 PM
I have followed all the steps mentioned in the video. My code is a sandbox solution and when I try to deploy the code to the site collection it gives me the above error.
Tuesday, February 14, 2012 1:24 AM
It would be really difficult to earmark what is the exact issue without the code.
If you can share the code, we can try debugging the issue for you.
If my post solves your problem could you mark the post as Answered or Vote As Helpful if my post has been helpful for you.
Wednesday, February 15, 2012 9:56 AMModerator
From your description, it seems to be a permission issue, please check the permission of the user that running the code, and try to use site owner or administrator to run the code to check whether it works.
Also, as you said, you cannot insert new item to lists and libraries, did you add list items using code or from UI, if from UI, if having permission, would you please try to use another user with contribute permission to check whether the items can be added.
TechNet Community Support
- Marked As Answer by Shimin Huang Friday, February 24, 2012 7:14 AM