views:

35

answers:

0

Hi,

I've been trying to use sgen.exe to genererate serialization assembly for my strong name signed assembly. I tried various set of parameters for sgen, but all my attempts ended with this error:

SGEN: error SGEN1: Could not load file or assembly MyLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) Strong name validation failed. (Exception from HRESULT: 0x8013141A)

Sgen command I 'm trying to execute looks like this:

sgen.exe $(OUTPUT_DIRECTORY)/MyLibrary.dll /type:MyLibrary.MyType /compiler:\"/keyfile:keyfile.snk\" /force /verbose /parsableerrors

I 'm using .Net 3.5 and my assembly is written in managed c++.