开发者

Serialize() not using .XmlSerializers.dll produced with Sgen

开发者 https://www.devze.com 2023-02-07 12:25 出处:网络
I have a sgen step in my .NET 3.5 library, producing a correct XYZ.XmlSerializers.dll in the output directory.

I have a sgen step in my .NET 3.5 library, producing a correct XYZ.XmlSerializers.dll in the output directory. Still having poor serialization performance, I discovered that .NET w开发者_StackOverflow中文版as still invoking a csc at runtime. Using process monitor, I saw that .NET was searching for a dll named "XYZ.XmlSerializers.-1378521009.dll".

Why is there a '-1378521009' in the filename ? How to tell .NET to use the 'normal' DLL produced by sgen ?


Poking around a bit with Reflector, this seems to happen when you use the XmlSerializer(Type, string) constructor, specifying a custom namespace. Try using the XmlSerializer(Type) constructor instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消