Did anyone manage to generate XmlSerializers assembly from IDE?

Hello,

We need to generated XmlSerializers assembly for some of our components. Visual Studio 2005 has a convenient way to achieve this: Project properties -> Build -> Output -> Generate serialization assembly -> (On). We tried this on several machines, but no serialization assembly is generated. However, if I run SGEN.EXE on the same assembly, then it works fine.

BTW, our assemblies are signed, so we have to pass a key to SGEN command. Can this be a reason?

Best regards

Vagif Abilov

[531 byte] By [Vagif] at [2007-12-25]
# 1
at least one problem I see with it that it automagically passes a hardcoded /proxytypes to sgen.exe which might or might not explain your problem
SimonDahlbacka at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# IDE...
# 2

The Visual Studio 2005 IDE only seems to honor the Generate Serialization Assembly = On switch when you set this in a project that references a web service. Like the other post mentioned, this is probably due to the flag that indicates you only want to generate serialization assemblies for proxy types.

AaronTM at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# IDE...
# 3

Also, if you have a large number of web references in the sgen'd assembly, the sgen tool can crash. The crash is semi-random in that it depends on how much memory you happen to have available at build time, and sometimes it crashes silently - without aborting the build process, but still not writing the serializer assembly.

If this is happening, the only resolution to my knowledge is to split your references into multiple assemblies.

HTH

KeithRome at 2007-10-8 > top of Msdn Tech,Visual C#,Visual C# IDE...