I deployed a webpart by admin user in Visual Studio 2013 through in SharePoint 2013.
It's working fine. But when I deploy using another user which already have admin permission then it is showing below error.
Error occurred in deployment step 'Retract Solution': Object reference not set to an instance of an object.
null
in your code, so I suggest you try debugging your code step by step and check each variable values by placing watch to that variable. Still you are facing problem try elevating the privileges using thisSPSecurity.RunWithElevatedPrivileges
Method, MSDN article: msdn.microsoft.com/en-us/library/…