开发者

Providing private key for SGEN

My .NET assembly is signed with digital certificate from comodo. I use SGEN to generate serialization assembly. SGEN requires a key file in order to generate such assembly for a signed source. I tried the following lines:

sgen.exe  /force /parsableerrors /compiler:/keyfile:"mycert.pfx" "myproduct.exe"

but this says me

SGEN: error SGEN1: Unable to generate a temporary class (result=1).
error CS1548: Cryptographic failure while signing assembly' -- 'Key file 'mycert.pfx'
- Bad Version of provider.

I tried to get .snk which can surely be used for SGEN, using SN -p mycert.pfx mycert.snk and then

sgen.exe  /force /parsableerrors /compiler:/keyfile:"mykey.snk" "myproduct.exe" 

but this says me

SGEN: error SGEN1: Unable to generate a temporary class (result=1).
error C开发者_JS百科S1548: Cryptographic failure while signing assembly' -- 
'Key file 'mykey.snk' is missing the private key needed for signing'

I read over the internet that this is SGEN error that it cannot use pfx to sign an assembly. So what can I do? Can I extract private key to snk file from pfx?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜