Webpart issue: The given assembly name or codebase is invalid

One gigantic issue that I ran into once was creating a web part, adding it as part of solution/feature, putting it on a site and then getting the error “the given assembly name or codebase is invalid”. Well, what I had done was incorrectly set the Assembly name. After changing and redeploying the solution, did it work? Nope.

I continued to redeploy, reset IIS, reboot the machine, several times over. After giving up and rewriting another project, thinking there was some funky bad mojo going on, I saw that the web part I had created was still available in the webpart gallery. Then it hit me, the webpartname.webpart, once added to a site, needs to be deleted even if you redeploy as a solution. Crazy.

Comments are closed.