SharePoint Experts, Information Architects, Expert Witness

SICG provides a broad array of business and technology consulting from architecture to design to deployment of global systems with a focus on surfacing data in the enterprise. We focus on the "How", not just the possible. Contact me direct: or call 704-873-8846 x704.

Search This Blog

Monday, December 17, 2012

'Add Solution': Cannot access a disposed object - SharePoint Project

Something I've seen a few times - specifically when using a project that came from a Source Control tool like TFS. 

First, you may get errors attempting to edit parts of the project - the cause of this is simple: some files are read only due to the source control. Simply right click on the Project Folder in Windows Explorer and un-check the Read Only flag and apply to all sub-folders and files.

Second, in attempting to deploy the project, you get an error like:

Error occurred in deployment step 'Add Solution': Cannot access a disposed object.
Object name: 'SharePointProjectItemFile'.

This is turns out is a simple issue - simply close the project and re-open it and the error should go away (double check the first issue if it does not work the second time).


Anonymous said...

Excellent. This saved my time.

sayitfast said...

Worked for me also.. .thanks!

aks said...

Wow..Thanks , worked for me too...Just need to restart and relogin in TFS as only close and reopen solution didn't worked at first.