Don't want to strongly sign sharePoint project assembly
-
Saturday, May 05, 2012 12:52 PM
Hi,
Using Visual Studio 2010 i created a sharepoint project i changed deployment target as WebApplication.Then i removed signing of my SharePoint project.Its building but failing to deploy throwing exception "Value cannot be Null, Parameter name :PublicKey".Previously this project was signed and was deploying correctly.
Pls help me out.
All Replies
-
Saturday, May 05, 2012 1:07 PM
Hi,
When deploying a Web Part to the global assembly cache, the assembly must have a strong name. An assembly without a strong name is not recommended in SharePoint Foundation. Take a look at this article Deploying Web Parts in SharePoint Foundation
Dmitry
Lightning
Tools Check out our SharePoint tools and web parts |
Lightning Tools Blog -
Saturday, May 05, 2012 1:32 PM
Dmitry thanx for quick reply
My deployment target is web application and my dlls including sharepoint dll is coming to web application bin folder i am not GACing any dll.If its in bin folder of web application no signing is required i feel any hint is highly helpful for me
http://msdn.microsoft.com/en-us/library/dd583168(v=office.11).aspx
"Deploying Custom Web Parts" section its mentioned that strong naming is not required if we are deploying in bin folder.
- Edited by ashiof Saturday, May 05, 2012 1:42 PM
-
Saturday, May 05, 2012 2:14 PMPlease take a look at this forum discussion error while signing sharepoint assembly with certificate
Dmitry
Lightning
Tools Check out our SharePoint tools and web parts |
Lightning Tools Blog -
Saturday, May 05, 2012 3:30 PM
Try removing the AssemblyKeyFile attribute from the assemblyinfo.cs file - and recompile.
If this doesnt work also try the suggestions at http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/6c24bb92-e488-4a91-b4e7-dc3269904697/.
Hope this helps...
-Sangeetha
-
Sunday, May 06, 2012 9:57 AMWhy did you remove the key in the first place if I may ask? As far as I know Visual Studio 2010 SharePoint Developer Tools require you to sign your assembly hence the error that you are getting.
w: http://blog.mastykarz.nl | t: @waldekm | c: http://mavention.codeplex.com | c: http://mavention.nl
-
Monday, May 07, 2012 5:54 AM
Thanx dmitry,Sangeetha,Waldek for quick reply
if we are deploying in local bin folder of web application sign assembly should not be required(Its best practise but still) i don't want to sign my class library generated dll referred in sharepoint project or sharepoint project build dll to be strongly sign but it forcing me to sign external assembly and sharepoint assembly to strongly sign otherwise if external assembly not signing throwing exception assembly should be sign in sharepoint projeect and not building solution.if not signing sharepoint assembly(with signed external assembly) its building but failing in deployment with exception"Value cannot be Null, Parameter name :PublicKey"
if it is mandatory for bin deployment also pls share that link.
-
Monday, May 07, 2012 2:14 PM
Although signing assemblies that are deployed to bin is not mandatory from the .NET perspective it's the tools that require you to sign the assembly. Please note that even if you don't sign the assembly and would create and deploy the WSP manually everything would work correctly. Once again it's only the tools that require signing assemblies. You can confirm it by exploring the MSBuild configuration used by the tools to package the solution (the exact location should be mentioned in the error message).w: http://blog.mastykarz.nl | t: @waldekm | c: http://mavention.codeplex.com | c: http://mavention.nl
- Marked As Answer by ashiof Tuesday, May 08, 2012 8:52 AM
-
Tuesday, May 08, 2012 8:53 AM
Thanx a lot Waldek!!!

