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
2
votes
2 answers

Too long command line for sgen.exe

I have a .net 4.5 project with a lot of nuget packages and I upgraded it to 4.7.2. To resolve some specific update problems with packages(like requireReinstallation="true" in packages.config) I upgraded related packages. Now I have upgraded packages…
chromigo
  • 1,134
  • 1
  • 15
  • 25
2
votes
2 answers

SQL Server "version, culture or public key mismatch" during "create assembly" when loading XMLSerializers created with sgen utility

I'm trying to create a CLR function in SQLServer that calls a web service. When I create the first assembly, the AssemblyVersion in AssemblyInfo.cs is 1.0.*. I'll run sgen to create the accompanying XMLSerializers assembly, and I don't see any…
bhnat
  • 97
  • 2
  • 11
2
votes
1 answer

How to force Sgen to create .net 3.5 serializers assembly

I have a sgen build step in my .NET 3.5 library. In VS2010 this generates .NET 4 MyLib.XmlSerializers.dll, which cannot be loaded from .NET 3.5 apps. Does anyone know how to change build step to get correct version of the assembly? Is it possible to…
Marko
  • 5,437
  • 4
  • 28
  • 47
2
votes
1 answer

sgen serialization assembly not signed

I have been reading for the past two days about how to make asmx web service first call quicker. after tracing and testing i realized that the service is doing nothing on initialize so after reading a couple of answers on that matter, the…
dori naji
  • 980
  • 1
  • 16
  • 41
2
votes
1 answer

Is this a memory leak in Linux Mono application?

I have been struggling to determine if what I am seeing is a memory leak in my Debian Wheezy Mono-Sgen 2.10.8.1-8 embedded application. The system has 512MB of RAM. Swap is disabled. I have been studying to try to understand how Linux manages…
CCS
  • 299
  • 4
  • 13
2
votes
1 answer

"sgen.exe" exited with code -532462766

Good day, I am attempting to build my project in Release mode, but keep getting the error as stated in the title. What causes this and how can I prevent or fix it? The other answers I saw on stackoverflow, like this one, made no sense to me.
Eon
  • 3,833
  • 10
  • 46
  • 75
2
votes
1 answer

How to make sgen.exe keep the version of the assembly?

I want to create a serialization assembly for my assembly. sgen does it fine, but I can't figure out how to get it to assign the serialization assembly the same version as the source assembly. Any ideas?
AngryHacker
  • 59,598
  • 102
  • 325
  • 594
2
votes
2 answers

SGEN doesn't work after upgrading from VS2012 to VS2013

When I compile my c# solution under VS2013 (Version 12.0.21005.1 REL) it cannot build part of projects with error message: Error 32 The command "“C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bin\NETFX 4.0 Tools\sgen.exe” /a:"Project.dll"…
constructor
  • 1,412
  • 1
  • 17
  • 34
2
votes
1 answer

Which MSBuild tasks initiate a call to SGen?

I have inherited a complex MSBuild script which builds & deploys multiple solutions. When I run the script I see the following error in log: SGEN: Cannot generate serialization assembly C:\B\268\Agents\Agents.XmlSerializers.dll because it…
Badgerspot
  • 2,301
  • 3
  • 28
  • 42
2
votes
1 answer

SGEN, InternalsVisibleTo and assembly signing

I'm trying to do something a bit unusual... I have this class Foo : public class Foo { public Foo(string name) { this.Name = name; } internal Foo() { } public string Name { get; internal set; } public int…
Thomas Levesque
  • 286,951
  • 70
  • 623
  • 758
2
votes
1 answer

An attempt was made to load an assembly with an incorrect format

I'm working with VS2008 and VS2010 for different projects simultaneously. Recently I tried to generate the serialization assemblies for the Entities Project and was unable to generate the same via visual studio 2010. This throws up the below…
Kay
  • 702
  • 7
  • 16
1
vote
1 answer

XmlSerializer.Serialize takes a long time... why?

Given the following code from RssToolkit in RssXmlHelper.cs: /// /// Returns XML of the Generic Type. /// /// The RSS document. ///
ElHaix
  • 12,846
  • 27
  • 115
  • 203
1
vote
1 answer

Custom building SGEN assemblies and including in installer

I've been rather confused by some SGEN stuff. I've enable the generation of serialization assemblies for one of my projects. Originally I got the follow error which I believe I've solved by doing some caspol stuff on a remote assembly. Unable to…
Ian
  • 33,605
  • 26
  • 118
  • 198
1
vote
2 answers

What is the cause of "Could not load file or assembly XYZ" erros?

I must be going mental, right? Since a couple of days I have been getting errors like MyAssembly Could not load file or assembly 'AnotherAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=' or one of its dependencies. Access denied …
Name
  • 11
  • 1
1
vote
1 answer

Why is my application using CSC during execution

I've been experimenting with the Remotesoft Linker and Mini Deployment tools to create a single native executable (that doesn't need the framework installed) from my managed code. One of the configurable features it has is if csc.exe is available…