dreinmann
asked on
Create a Strong Name for Assembly
I am having troubles with this error:
Unable to emit assembly: Referenced assembly 'CalendarLibrary' does not have a strong name.
I wasn't getting it while debugging before, but now that I tried to Publish, I'm getting it all the time.
A little background:
I'm using a CalendarLibrary.dll that was created from another project. I put the CalendarLibrary.dll file in then bin/release folder of my current project and I'm referencing it there. It works fine for debugging, but when I try to publish, I get the strong name error.
I've tried using - sn -k --.snk, created a keyfille, then tried tlbimp on CalendayLibrary.dll and it came up with an error saying CalendarLibrary.dll is not a valid type library. (Also, no commands work in the command window of Visual Studio ???, so I'm doing this from the regular cmd prompt - I put the sn.exe, tblimp.exe, keyfile, and .dll all in the bin/release folder and running cmd prompt from that folder)
I've really been trying to solve this myself though looking at other solutions, msdn, etc. and I just can't figure it out. If you have the info, please list step by step, 'cause I must be missing something.
Thanks
Unable to emit assembly: Referenced assembly 'CalendarLibrary' does not have a strong name.
I wasn't getting it while debugging before, but now that I tried to Publish, I'm getting it all the time.
A little background:
I'm using a CalendarLibrary.dll that was created from another project. I put the CalendarLibrary.dll file in then bin/release folder of my current project and I'm referencing it there. It works fine for debugging, but when I try to publish, I get the strong name error.
I've tried using - sn -k --.snk, created a keyfille, then tried tlbimp on CalendayLibrary.dll and it came up with an error saying CalendarLibrary.dll is not a valid type library. (Also, no commands work in the command window of Visual Studio ???, so I'm doing this from the regular cmd prompt - I put the sn.exe, tblimp.exe, keyfile, and .dll all in the bin/release folder and running cmd prompt from that folder)
I've really been trying to solve this myself though looking at other solutions, msdn, etc. and I just can't figure it out. If you have the info, please list step by step, 'cause I must be missing something.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It sounds like your application is supposed to serialize the class CalendarItem for remoting or xml or some other use. You may have to mark it as serializable:
<Serializable()> _
Public Class CalendarItem .... etc.
<Serializable()> _
Public Class CalendarItem .... etc.
ASKER
Actually, I went back to the original C# project (I was working on the one I converted to vb.net), signed it and rebuilt. Recreated the CalendarLibrary.dll and put it in the bin/Release folder of the project I'm working on and I was able to Rebuild it successfully and Debug as well.
But now a new error (I think I'm getting closer though):
SignTool reported an error 'Failed to sign bin\Release\Logistics Manager.publish\\setup.exe . SignTool Error: ISignedCode::Sign returned error: 0x80880253
The signer's certificate is not valid for signing.
SignTool Error: An error occurred while attempting to sign: bin\Release\Logistics Manager.publish\\setup.exe
'. LogisticsManager
What now...(by the way, you've answered my first question successfully, would you like me to award this question and start a new one for this new error?)
But now a new error (I think I'm getting closer though):
SignTool reported an error 'Failed to sign bin\Release\Logistics Manager.publish\\setup.exe
The signer's certificate is not valid for signing.
SignTool Error: An error occurred while attempting to sign: bin\Release\Logistics Manager.publish\\setup.exe
'. LogisticsManager
What now...(by the way, you've answered my first question successfully, would you like me to award this question and start a new one for this new error?)
ASKER
Got it!! Had to do the 'install into Trusted Root Certificate' thing.
Thanks paulhews!
Thanks paulhews!
ASKER
The "GenerateResource" task failed unexpectedly.
System.Runtime.Serializati
at Microsoft.Build.Shared.Exc
at Microsoft.Build.Tasks.Proc
at Microsoft.Build.Tasks.Proc
at Microsoft.Build.Tasks.Gene
at Microsoft.Build.BuildEngin
????