Switching Solution Type of a Web Part Causes Errors

I had been working on a sandboxed web part for some time, and had it deployed onto a development server for testing purpose. Then some requirements changed, and I had to change it from being a sandboxed solution into being a Farm one. I made sure I uninstalled my sandboxed solution from the solution gallery before trying to install the new one. The Farm solution’s WSP installation went through fine, without any errors. I was also able to activate its associated feature without a problem. However, whenever I was trying to go and insert the web part onto a page, I would get the following error (“The request could not be completed because the specified solution was not found):


Basically what happened here, was that the server still had a reference to the sandbox’s assembly, and the webpart reference couldn’t be found when trying to insert it on a page. The solution to this error was to go in the Web Part’s gallery at the root of my site collection (/_catalogs/wp/Forms/AllItems.aspx), and to delete the entry for my web part in there, because it still referenced the sandbox version. After that entry as removed, all I had to do was reactivate my feature, and I was then able to add my web part without any issues!

Leave a Reply

Your email address will not be published. Required fields are marked *