Resolved: The given assembly or codebase was invalid error by stsadm command
18 Aug 2011 1 Comment
in Sharepoint 2007, SharePoint 2010 Tags: Microsoft.SharePoint, moss, moss 2007, sharepoint, SharePoint 2010, SharePoint Portal Server, sharepoint server 2007, stsadm, Windows SharePoint Services, wss, wss 3.0
I was trying to register custom profiledeletehandler by using stsadm command line utility. My command, code and assembly were perfect. But even then when I was trying to execute stsadm then it was displaying “The given assembly or codebase was invalid”.
Humnnn what could be the problem then after doing some research I came to know that I wrote the part of the command in notepad first and then copy/paste this part in command line. OMG, that was some encoding problem while copy/pasting the command.
Though if you delete the stsadm command and retype this in command line console then both (earlier & retyped) will look same. But this was only and major difference and solve the problem.
Solution: Please type the whole command by your own including each and everything.
Moral of the Story:
1. Avoid copy/pasting the stsadm command from other application as you can be the victim of this type of problem.
2. Always do check for PublicKeyToken values (If u are using assembly reference) twice and other spelling mistakes in stsadm command, as it can be the cause of these type of problems.

One Comment (+add yours?)