我有此代码:
public void Initialize()
{
if (Configuration["Integration:Client:" + OrdersIntegrationConstants.ExternalLoadFieldsType] != null && !String.IsNullOrEmpty(Configuration["Integration:Client:" + OrdersIntegrationConstants.ExternalLoadFieldsType].ToString()))
{
var kk1 = Configuration["Integration:Client:" + OrdersIntegrationConstants.ProjectDirectory].ToString();
var kk2 = Assembly.LoadFrom(kk1);
Type[] typesInAsm;
try
{
typesInAsm = kk2.GetTypes();
var kk4 = typesInAsm.ToList();
}
catch (ReflectionTypeLoadException ex)
{
typesInAsm = ex.Types;
}
}
}
在(DLL的)项目中添加对Windowsservice(asmx)的引用时,出现文本错误:无法加载一种或多种请求的类型。检索LoaderExceptions属性以获取更多信息。: