hey-hoho / ScheduleMasterCore

This is a distributed task management system base on .Net Core platform .
Apache License 2.0
853 stars 245 forks source link

定时任务里如果有调用webservice的话,程序会报错 #67

Closed fgb1990 closed 2 years ago

fgb1990 commented 2 years ago

ERROR:A non-collectible assembly may not reference a collectible assembly

堆栈信息 at System.Reflection.Emit.ModuleBuilder.GetTypeRef(QCallModule module, String strFullName, QCallModule refedModule, String strRefedModuleFileName, Int32 tkResolution) at System.Reflection.Emit.ModuleBuilder.GetTypeRefNested(Type type, Module refedModule, String strRefedModuleFileName) at System.Reflection.Emit.ModuleBuilder.GetTypeTokenWorkerNoLock(Type type, Boolean getGenericDefinition) at System.Reflection.Emit.ModuleBuilder.GetTypeTokenInternal(Type type, Boolean getGenericDefinition) at System.Reflection.Emit.TypeBuilder..ctor(String fullname, TypeAttributes attr, Type parent, Type[] interfaces, ModuleBuilder module, PackingSize iPackingSize, Int32 iTypeSize, TypeBuilder enclosingType) at System.Reflection.Emit.ModuleBuilder.DefineType(String name, TypeAttributes attr, Type parent) at System.Reflection.DispatchProxyGenerator.ProxyAssembly.CreateProxy(String name, Type proxyBaseType) at System.Reflection.DispatchProxyGenerator.GenerateProxyType(Type baseType, Type interfaceType) at System.Reflection.DispatchProxyGenerator.GetProxyType(Type baseType, Type interfaceType) at System.Reflection.DispatchProxyGenerator.CreateProxyInstance(Type baseType, Type interfaceType) at System.Reflection.DispatchProxy.Create[T,TProxy]() at System.ServiceModel.Channels.ServiceChannelProxy.CreateProxy[TChannel](MessageDirection direction, ServiceChannel serviceChannel) at System.ServiceModel.Channels.ServiceChannelFactory.CreateProxy[TChannel](MessageDirection direction, ServiceChannel serviceChannel) at System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel[TChannel](EndpointAddress address, Uri via) at System.ServiceModel.ChannelFactory1.CreateChannel(EndpointAddress address, Uri via) at AutoTaskProgram.InitializeWorkDay.SpecificMethod(TaskContext context) at AutoTaskProgram.InitializeWorkDay.Run(TaskContext context)`

hey-hoho commented 2 years ago

可以参考这篇文章的描述https://www.jianshu.com/p/d53458fade0c

fgb1990 commented 2 years ago

谢谢,按照文章操作解决了

可以参考这篇文章的描述https://www.jianshu.com/p/d53458fade0c

谢谢,解决了