无法阻止运行时编译MyLib.XmlSerializers.dll [英] Trouble preventing runtime compile of MyLib.XmlSerializers.dll

查看:57
本文介绍了无法阻止运行时编译MyLib.XmlSerializers.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我在Win7 32bit上使用VS2005来构建一个调用Web服务的强类型类库。我已经使用VS2005中的"添加Web引用"向导来添加对服务的引用。


除了第一次调用服务需要20多秒之外,一切都有效。后续调用大约需要40毫秒(如预期的那样)。其他客户端(例如SOAPUI)每次都非常快速地调用服务,所以它不是服务。


我几乎可以肯定问题是编译MyLib.XmlSerializers.dll 。但无论我做什么,我都无法防止它发生。我已经设置了Project Properties>构建>生成序列化程序集为'On'并且文件确实生成,
但是当我调用该服务时,新版本的MyLib.XmlSerializers.dll仍然被编译到%TEMP%目录。


我已经尝试过sgen.exe,再次成功生成了MyLib.XmlSerializers.dll,但第一次调用仍需要很长时间,并且文件在第一次调用时以%TEMP%生成。


我在这里不知所措,如果有人能提出可能的解决方案,我将非常感激。


干杯,Leuis


  ;

解决方案

查看
http://stackoverflow.com/questions/485 1626 /串行化 - 不使用-xmlserializers-DLL制作与 - SGEN

Hi All, I am using VS2005 on Win7 32bit to build a strongly typed class library that calls a web service. I've used the Add Web Reference wizard in VS2005 to add the reference to the service.

Everything works a treat, except the first call to the service takes 20+ seconds. Subsequent calls take around 40ms (as expected). Other clients (eg. SOAPUI) call the service very fast every time, so it's not the service.

I'm almost certain that the problem is the compiling of the MyLib.XmlSerializers.dll. But no matter what I do I can't prevent it from happening. I've set Project Properties > Build > Generate serialization assembly to 'On' and the file does get generated, but when I call the service a new version of MyLib.XmlSerializers.dll still gets compiled to the %TEMP% directory.

I've tried sgen.exe, again successfully generating the MyLib.XmlSerializers.dll, but still the first call takes ages and the file gets generated in %TEMP% on the first call.

I'm at a loss here and would be extremely grateful if anybody can suggest a potential solution.

Cheers, Leuis

 

解决方案

Have a look to http://stackoverflow.com/questions/4851626/serialize-not-using-xmlserializers-dll-produced-with-sgen


这篇关于无法阻止运行时编译MyLib.XmlSerializers.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆