Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# VisualStudio2010中的参考资料_C#_Visual Studio 2010 - Fatal编程技术网

C# VisualStudio2010中的参考资料

C# VisualStudio2010中的参考资料,c#,visual-studio-2010,C#,Visual Studio 2010,这可能是一个愚蠢的问题,但当我添加对我的项目的引用并将Copy Local设置为false(这样它就不会将dll复制到工作目录)时,会出现以下错误: Could not load file or assembly 'HtmlAgilityPack, Version=1.4.0.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a' or one of its dependencies. The system cannot find the fil

这可能是一个愚蠢的问题,但当我添加对我的项目的引用并将Copy Local设置为false(这样它就不会将dll复制到工作目录)时,会出现以下错误:

Could not load file or assembly 'HtmlAgilityPack, Version=1.4.0.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a' or one of its dependencies. The system cannot find the file specified.
我只想从“(工作目录)/DLL”加载DLL“
这可能吗?我做错了什么


提前谢谢

引用并不是相对于进程的工作目录解析的-它们是相对于试图加载它们的程序集解析的(当然也可以是从GAC解析的)


不清楚您为什么要这样做,但基本上您应该确保DLL与可执行文件位于同一位置。

好的,谢谢您的回答!但我之所以希望将它们放在单独的文件夹中,是为了让它看起来更“有条理”。@Darkshadw:您可以使用AppApplication configuration的私有路径功能将它们放在可执行文件的子目录中。请参阅-但这与“进程的工作目录”不同。