Questions tagged [sgen]

The Microsoft XML Serializer Generator Tool - creates xml serialiser assembly from an existing assembly.

The Microsoft XML Serializer Generator Tool - creates xml serialiser assembly from an existing assembly.

https://learn.microsoft.com/en-us/dotnet/standard/serialization/xml-serializer-generator-tool-sgen-exe

92 questions
1
vote
1 answer

What type of things can cause sgen msbuild task to fail intermittantly with Access Violation?

In our MSBuild file for our project we sgen an assembly containing classes used during xml serialization. The classes are generated via xsd.exe. We use the following SGen task configuration.
Mark Allanson
  • 1,368
  • 1
  • 10
  • 19
1
vote
0 answers

Why do Outbound URL Rewrite rules require an XmlSerializers.dll

I'm trying to enable OutboundRules in the rewrite section of a web.config to convert all .html extensions to extensionless. However, when I add any rule (it doesn't matter what it contains), I receive a 500 error stating that .XmlSerializers.dll…
Martin
  • 2,180
  • 4
  • 21
  • 41
1
vote
0 answers

C# + Java service soap message interoperability, soap messages not getting deserialized in c# APP + SGEN

One of the Java webservices that I consume within my c# application has a returned type "marketCalendar" defined like following in the wsdl. WSDL's Target name space is http://www.xyz.com
Vinay Dwivedi
  • 767
  • 2
  • 11
  • 23
1
vote
1 answer

SGen can not generate an assembly for a valid type

I have a valid for a XmlSerializer type: public class MyItem { public MyItem() { Values = new List(); } public List Values { get; private set; } } It successfully serialized and deserialized (Full code example here…
Viacheslav Ivanov
  • 1,535
  • 13
  • 22
1
vote
1 answer

Can .XmlSerializers.dll assembly be embedded?

Can the .XmlSerializers.dll assembly generated by SGEN be embedded into the final executable, and still function and provide the performance boost?
Jiri
  • 19
  • 1
1
vote
1 answer

Missing Assembily Reference

I have produced a custom class serializer for a sole class contained in 'VcdcClassStructure.dll' using sgen as-per the documentation. The documents now state that all I need to do is Add assembaly references to both 'VcdcClassStructure.dll' and…
MoonKnight
  • 23,214
  • 40
  • 145
  • 277
1
vote
1 answer

Sgen throws an error with internal setter in VS2012

Does SGen generate xml serialization assemblies only if all setters are public? I've got this class in DummyProject: public class DummyClass { public int Sequence { get; internal set; } } In my AssemblyInfo.cs, I've declared this: [assembly:…
1
vote
2 answers

Using Mono mkbundle To Target SGEN Garbage Collector

Is it possible to bundle a Mono executable using mkbundle that uses the sgen GC? I assume that because the produced bundle requires the libmono-2.0.so.1 instead of the libmonosgen-2.0.so that it is using the standard boehm GC. I have tried using…
drg
  • 83
  • 1
  • 10
1
vote
2 answers

Problems installing Windows SDK 7.1 for dot.net Framework 4.0 / 2 Problems in 1

Since yesterday I try to install Windows SDK 7.1 for dot.net Framework 4.0 on my windows 7 x64 machine. I get everytime the same Error during the installation. Error message: "Installation of the "Microsoft WIndows SDK for Windows 7" product has…
Micha
  • 5,117
  • 8
  • 34
  • 47
1
vote
1 answer

SGen does not use FileVersion from parent assembly

It seems that SGen does not use the file version from the parent assembly but the AssemblyVersion instead. This is problematic if you want to keep the strong name constant and release via MSI API compatible patches. If for example new data types are…
Alois Kraus
  • 13,229
  • 1
  • 38
  • 64
1
vote
0 answers

Problems with sgen.exe & Oracle.DataAccess.dll (Visual Studio 2012)

We tried to migrate our webservice project to Visual Studio 2012 from Visual Studio 2010. The project uses the Oracle.DataAccess.dll (v 11.2.0.3 32 and 64 Bit) and we create *.XmlSerializers.dll with sgen.exe. The sgen.exe always fails to create the…
Andre Fly
  • 156
  • 9
1
vote
1 answer

Bug in Sgen.exe

It seems that sgen.exe could not generate generic type XmlSerializer, right? My genereic type: [Serializable] [XmlRoot(ElementName = "Masterx")] public class Masterx where T : class, new() {....} Serializer code: protected virtual List
Rock
  • 263
  • 1
  • 2
  • 10
0
votes
1 answer

Compiling Mono from Visual Studio with sgen support

I have a Mono binary obtained from a build with Visual Studio. The option --gc=sgen used to enable sgen garbage collector is not available: Error: --gc= option not supported on this platform. How to enable this option ? Is there any define ?
Ghassen Hamrouni
  • 3,138
  • 2
  • 20
  • 31
0
votes
2 answers

How does sgen.exe decide which types to generate serializers for?

You can use sgen.exe to create serialization assemblies ahead of time rather than have them created on the fly. But how does it decide what types to make serializers for? I've tried to switch to using sgen, but it's been telling me that it can't…
RandomEngy
  • 14,931
  • 5
  • 70
  • 113
0
votes
1 answer

How to use SGen to generate a serialization assembly for a XML schema that is mapped to a two-level array?

I'm consuming a third-party service that requires XmlSerializerFormat contracts; I want to speed up startup by creating a serialization assembly, but Sgen.exe really doesn't like a particular construct in the schema that Xsd.exe spits out a nested…
millimoose
  • 39,073
  • 9
  • 82
  • 134