且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法加载 MyAssembly.XmlSerializers.dll.该系统找不到指定的文件

更新时间:2023-10-27 21:59:04

情况比我预想的要棘手一些.该程序集的 XMLSerializers DLL 似乎对我的解决方案中的身份验证至关重要,并且只是按 [ing] F5 继续运行直到真正的问题发生"并没有导致一些不相关的错误.

The situation was a little trickier than I had expected. The XMLSerializers DLL for that assembly seems to be essential for authentication in my solution, and just "Press[ing] F5 to continue running until the real problem occurs" did not lead to some unrelated error.

我一直无法完全理解根本问题是什么,但似乎在 Visual Studio 升级后动态创建 DLL 出现问题.

I have not been able to completely understand what the underlying issue is, but it seems that there is a problem creating the DLL dynamically after Visual Studio is upgraded.

我解决这个问题的方法是运行 sgen 工具来手动创建序列化程序并将生成序列化程序集"标志设置为关闭.通过添加构建后指令来运行该工具,该过程可以自动化.

The way I have worked around the issue is by running the sgen tool to manually create the serializers and setting the flag "Generate Serialization Assemblies" to Off. The process can be automated by adding a post-build instruction to run the tool.

话虽如此,我不知道为什么会首先出现这个问题,因为我确定我没有在 VS2012 中打开该项目.

That being said, I have no idea why this issue comes up in the first place, as I am certain that I did not open the project in VS2012.