FileNotFoundException 和文件路径
例外:
无法加载文件或程序集 '文件:///C:\Program%20Files\Microsoft%20Visual%20Studio%209.0\Common7\IDE\Projects\SourceCode_TradeProcessor_branch\BIN\FxGate\LoaderService\Plugins\FixExchangeProvider\FixExchangeProvider.dll' 或其依赖项之一。系统 找不到指定的文件。
代码:
parserPlugin = Assembly.LoadFrom(_transport.Path);
文件路径存在。是因为路径格式还是什么原因?
Exception:
Could not load file or assembly
'file:///C:\Program%20Files\Microsoft%20Visual%20Studio%209.0\Common7\IDE\Projects\SourceCode_TradeProcessor_branch\BIN\FxGate\LoaderService\Plugins\FixExchangeProvider\FixExchangeProvider.dll'
or one of its dependencies. The system
cannot find the file specified.
code:
parserPlugin = Assembly.LoadFrom(_transport.Path);
The filepath exists. Is it because of path format or what?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
“......或其依赖项之一”。检查您的程序集引用的 dll 是否位于同一文件夹中。
"...or one of its dependencies". Check if the dll's your assembly references are in the same folder.
也许:
会更好吗?
Maybe:
would work better?
我的猜测是权限,如果运行程序的用户甚至没有权限查看文件夹中的内容,则必须假设该文件不存在。
My guess would be permissions, if the user the program's running under doesn't even have permission to see what's in the folder it'll have to assume the file's not there.