引用 SharpSVN 时 IEFrame.DLL 和 SHLWAPI.DLL 中缺少外部函数
注意:本节包含不正确的信息 - 请跳至下面的更新以了解详细信息。此部分出于历史目的而保留。
我在 Visual Studio 2008 中有一个针对 .NET 3.5 的 WPF 项目,该项目引用 SharpSVN。当我调用 SvnClient.Export 时,我收到一个异常,Marshal.GetExceptionCode 告诉我是 0xc06d007e。这似乎是由错误的 DLL 引起的。我(使用 Dependency Walker)跟踪了该 DLL 的两个罪魁祸首:IEFRAME.DLL 和 SHLWAPI.DLL。它们缺少以下导出函数:
SHLWAPI.DLL:#270 IEFRAME.DLL:#141、#159、#160
我最初也有一个丢失的 DLL,通过将 %ProgramFiles%\Internet Explorer 添加到路径来修复。我不记得 DLL 名称了。
这是 Visual Studio 2008 SharpSVN 1.7002.1998.12257 的全新安装。
我可以运行 SharpSVN 提供的“svn”命令从我们的存储库导出,所以我倾向于解决方案/项目配置/参考问题。
我该如何修复这个错误?
*更新:我已经完善了对这个问题的理解。 SHLWAPI 和 IEFRAME 问题似乎是正常情况 - User32.dll 具有相同的行为。我通过以下方式修改了我的环境:
环境变量 [SVN_SSH] 设置为 TortoisePlink [C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe]
更新了 uri 目标以使用当前用户名:
SvnUriTarget uriTarget =
new SvnUriTarget("svn+ssh://" + Environment.UserName + "@myserver/mypath");
通过此配置,我可以在运行时成功导出将此代码作为 WPF 应用程序的一部分。但是,作为 MSTest 项目的一部分运行时,我仍然遇到错误。
System.Runtime.InteropServices.SEHException: External component has thrown an exception.\r\n
at svn_client_export5(Int32* , SByte* , SByte* , svn_opt_revision_t* , svn_opt_revision_t* , Int32 , Int32 , Int32 , svn_depth_t , SByte* , svn_client_ctx_t* , apr_pool_t* )\r\n
at SharpSvn.SvnClient.Export(SvnTarget from, String toPath, SvnExportArgs args, SvnUpdateResult& result) in g:\\dist\\src\\sharpsvn\\commands\\export.cpp:line 100
at SharpSvn.SvnClient.Export(SvnTarget from, String toPath, SvnExportArgs args) in g:\\dist\\src\\sharpsvn\\commands\\export.cpp:line 66
at SimulationManager.Model.SubversionInterface.Export() in C:\\Users\\phines\\Documents\\Projects\\SimulationManager\\SimulationManager\\SimulationManager\\Model\\SubversionInterface.cs:line 43
我怀疑这是由于对演示框架的依赖,但仍然想知道是否有办法让它以无 GUI 的方式工作。
Note: This section contains incorrect information - skip to the update below for details. This section left in for historical purposes.
I have a WPF project in Visual Studio 2008 targeting .NET 3.5 that references SharpSVN. When I make a call into SvnClient.Export, I get an exception that Marshal.GetExceptionCode tells me is 0xc06d007e. This seems to be caused by a bad DLL. I have tracked (with the Dependency Walker) that DLL to two culprits: IEFRAME.DLL and SHLWAPI.DLL. They are missing the following export functions:
SHLWAPI.DLL: #270
IEFRAME.DLL: #141, #159, #160
I also initially had a missing DLL that was fixed by adding %ProgramFiles%\Internet Explorer to the path. I do not recall the DLL name.
This is a fresh install of Visual Studio 2008, SharpSVN 1.7002.1998.12257.
I can run the "svn" command that is provided with SharpSVN to export from our repository, so I am leaning toward a solution/project configuration/reference problem.
How do I fix this error?
*Update: I have refined my understanding of this problem. The SHLWAPI and IEFRAME issues appear to be a normal condition - User32.dll has the same behavior. I modified my environment in the following ways:
Environment variable [SVN_SSH] set to TortoisePlink [C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe]
Updated uri target to use current username:
SvnUriTarget uriTarget =
new SvnUriTarget("svn+ssh://" + Environment.UserName + "@myserver/mypath");
With this configuration, I can successfully export when running this code as part of the WPF application. However, I still get errors when running as part of a MSTest project.
System.Runtime.InteropServices.SEHException: External component has thrown an exception.\r\n
at svn_client_export5(Int32* , SByte* , SByte* , svn_opt_revision_t* , svn_opt_revision_t* , Int32 , Int32 , Int32 , svn_depth_t , SByte* , svn_client_ctx_t* , apr_pool_t* )\r\n
at SharpSvn.SvnClient.Export(SvnTarget from, String toPath, SvnExportArgs args, SvnUpdateResult& result) in g:\\dist\\src\\sharpsvn\\commands\\export.cpp:line 100
at SharpSvn.SvnClient.Export(SvnTarget from, String toPath, SvnExportArgs args) in g:\\dist\\src\\sharpsvn\\commands\\export.cpp:line 66
at SimulationManager.Model.SubversionInterface.Export() in C:\\Users\\phines\\Documents\\Projects\\SimulationManager\\SimulationManager\\SimulationManager\\Model\\SubversionInterface.cs:line 43
I suspect this is due to a reliance on the presentation framework, but would still like to know if there is a way to get this working in a GUI-less way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IEFrame 和 SHLWAPI 的错误是正常问题,取决于报告为错误,但实际上不会导致错误。就我而言,该错误是由于在非用户界面项目中使用 SharpSVN 引起的。当转移到 WPF 项目时,它按预期工作。
我改变了策略来调用命令 shell“svn”应用程序来实现无 UI 自动化。
The errors with IEFrame and SHLWAPI are normal problems that depends reports as errors, but do not acutally cause the error. In my case, the error was caused by using SharpSVN in a non-user interface project. When moved to a WPF project, it worked as expected.
I have changed strategies to call a command shell "svn" application to achieve UI-less automation.