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

Xamarin Apps Build on VS2017 but not VS for Mac

I'm able to build the app in Windows on the latest version of VS2017 (15.9.2) for both Android and iOS, and I'm able to use the Remote iOS Simulator to run my iOS app as built on my Mac. However, when I use the same solution on my 2009 iMac on High…
0
votes
2 answers

SGEN (x86): Tells me .NET4.6 is required

I've installed Visual Studio 2015 and am trying to upgrade our (32bit) VS2010 projects. When the project compiles, it tries to run SGEN (Generate Serialization Assembly=on) from C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6…
GilesDMiddleton
  • 2,279
  • 22
  • 31
0
votes
0 answers

Running sgen.exe on a .NET 4.5 assembly?

I used to run sgen.exe from C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\sgen.exe and targeted a .NET 4 assembly and it built just fine. After upgrading the project to .NET 4.5, it fails with this error: Microsoft (R) Xml Serialization support…
RandomEngy
  • 14,931
  • 5
  • 70
  • 113
0
votes
1 answer

I can't build project in release mode

I can build project in debug mode, when I change to Release mode show this message: The assembly mix mode was compiled in relation of version 'v2.0.50727' in runtime and do not be loaded in runtime 4.0 without configuration of additional…
Ivo Villa
  • 99
  • 1
  • 2
  • 12
0
votes
1 answer

Cannot publish Website with web reference - SGEN error

I have website (MVC) with one Web reference. Build and run in VS working. But when I tried to publish to disk I get error: SGEN: error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more…
Musketyr
  • 745
  • 1
  • 16
  • 37
0
votes
2 answers

Sgen and x64 project configuration to create XML Serializers assembly

Looks like there are many similar problems without good explanation. Environment: Win 7 VS2012 Pro Windows SDK 7.0 In our environment we generate 2 code bases - x86 and x64. For this specific project we generate *.XMlSerializers.dll. The setting in…
T.S.
  • 18,195
  • 11
  • 58
  • 78
0
votes
0 answers

Sgen errors produced by .NET Reflector

I put an sgen.exe command in target (post-build) of my project's .csproj. It works fine, the command generate XmlSerializers.dll and project uses it as expected. The problem comes when someone that has the project also uses .NET Reflector to…
Didako
  • 1
  • 3
0
votes
1 answer

SGEN.exe - Microsoft.Xml namespace not found

I have a strange issue with my generated serialization .dll. The .dll is successfully generated I can reference it in my project, all the types are contained within the namespace Microsoft.Xml.Serialization.GeneratedAssembly as expected, even the…
rtlayzell
  • 608
  • 4
  • 20
0
votes
1 answer

How to Serialize a list after using SGEN

How can I serialize a list when using SGEN generated assembly? After generating the assembly I have access to classes such as: PersonSerilizer and can serialize one object, but how can I Serialize a list of this objects? Any help will be…
MetalGeorge
  • 321
  • 6
  • 16
0
votes
1 answer

How to get advantage from sgen.exe

I successfully used sgen.exe to create my MyLibrary.XmlSerializer.dll assembly, because I want to avoid the waste of time for the "first" deserialization. But now, how to use it? I mean, where do I have to put MyLibrary.XmlSerializer.dll to be used?…
ff8mania
  • 1,553
  • 3
  • 19
  • 28
0
votes
1 answer

Visual Studio 2010 Can't Find 'sgen.exe'

I have a C# assembly project which I have selected to build in Visual Studio 2010, which is set to serialize itself. When I try to build the project, I get this error: Error 1 The specified task executable location …
Alexandru
  • 12,264
  • 17
  • 113
  • 208
0
votes
1 answer

Run sgen on a 5MB assembly with many classes with the same name

I'm trying to generate the XmlSerializers assembly for a project that outputs a 5MB dll. This project has many classes with different .Net namespaces but with the same name, so sgen is returning the error message "The top XML element 'XXXX' from…
juliano.net
  • 7,982
  • 13
  • 70
  • 164
0
votes
1 answer

SGEN with delay-signing on 64-bit Server

I'm trying to resolve a problem where SGEN is throwing an error when invoked as part of my .NET solution build on a build server. I'm running the build from the command-line on the server to eliminate the CI server as a factor. The specific error…
Paul Turner
  • 38,949
  • 15
  • 102
  • 166
0
votes
2 answers

XML Serializer Generator Tool (Sgen.exe) to generate 64-bit Windows DLL?

I am building a 64-bit C# .NET DLL in Visual Studio 2010. My project's post-build steps include the running of sgen.exe to generate a corresponding XmlSerializer DLL for my assembly. (I'm trying to load a CLR function into SQL Server 2012. The…
Buggieboy
  • 4,636
  • 4
  • 55
  • 79
0
votes
1 answer

SGEN fails on where clause of public generic method

I have a project where SGEN is used to precompile the serialization assemblies (without the /proxytypes flag). In this project lives a class that up until now has been internal (thus sgen would leave it alone). I need to make the class public, and…
roken
  • 3,946
  • 1
  • 19
  • 32