将预先生成的序列化程序集放置在哪里?
我试图通过传送预生成的 XML 序列化程序集来加快我的 Click-Once(VS2008 中的 .net 2.0)应用程序的启动速度。
因此,为了测试我的场景,我将 VS2008 设置为在引发异常时中断。尽管 XML 序列化程序集在那里,但仍然存在异常,表明它无法找到或加载序列化程序集。
所以我用 FileMon 来解决这个问题,结果发现 VS2008 到处寻找序列化程序集,但程序集实际上在哪里(例如 bin 文件夹)。
有人可以澄清为什么 VS2008 在所有错误的地方寻找序列化程序集,以及我是否一开始就分配了错误的树。
I am trying to speed up the start-up of my Click-Once (.net 2.0 in VS2008) app by shipping the pre-generated XML serialization assemblies.
So to test my scenario, I set VS2008 to break when an exception is thrown. Even though, the XML Serialization assemblies are there, there is still an exception, saying that it can't find or load the serialization assembly.
So I threw FileMon at the problem and it turns out that VS2008 looks for the serialization assemblies everywhere but where the assemblies actually are (e.g. bin folder).
Can someone clear up on why VS2008 is looking for the serialization assemblies in all the wrong places and whether I am barking up the wrong tree distributing them in the first place.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯...我的 sgen'ed XML 序列化程序集与其原始 dll 位于同一文件夹中。
例如,对于
MyAssembly.dll
,我在它旁边有MyAssembly.XmlSerializers.dll
。另外,请确保两个程序集在其属性中声明相同的程序集版本。
Hmmm... My sgen'ed XML serialization assemblies are in the same folder with their original dll.
E.g. for
MyAssembly.dll
I haveMyAssembly.XmlSerializers.dll
right next to it.Also, make sure that both assemblies declare the same Assembly Version in their properties.