Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/261.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.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# 动态编译服务并包含来自其他文件夹的dll引用_C#_Wcf_Dynamically Generated - Fatal编程技术网

C# 动态编译服务并包含来自其他文件夹的dll引用

C# 动态编译服务并包含来自其他文件夹的dll引用,c#,wcf,dynamically-generated,C#,Wcf,Dynamically Generated,我在这条路上找到了图书馆: “.\ServiceGenerator\bin\Debug\ExternalClassLibrary.dll” ServiceGenerator项目从文本动态生成服务,并包含对此库的引用 objCompilerParameters.ReferencedAssemblies.Add(AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "ExternalClassLibrary.dll"); Servic

我在这条路上找到了图书馆:

“.\ServiceGenerator\bin\Debug\ExternalClassLibrary.dll”

ServiceGenerator项目从文本动态生成服务,并包含对此库的引用

objCompilerParameters.ReferencedAssemblies.Add(AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "ExternalClassLibrary.dll");
ServiceGenerator将服务放入此文件夹:

“.\ServiceGenerator\bin\Debug\Services\”

如果我不将ExternalClassLibrary.dll放入这个文件夹,然后生成服务,那么使用ExternalClassLibrary.dll的方法就会冻结。 如果我把图书馆放进去

“.\ServiceGenerator\bin\Debug\Services\”

那么一切都很好

如何使生成的服务从路径与库一起工作

“.\ServiceGenerator\bin\Debug\ExternalClassLibrary.dll”


看起来您可能可以使用程序集绑定重定向的探测部分:我将app.config放入带有探测元素的服务文件夹。设置privatePath=“..\”。这不起作用。这应该是另一个问题-如果你把链接发回到这里,我会看一看。对不起,你是什么意思?我的意思是你应该发一个新问题来询问你遇到的具体问题