我的代码通过 localhost 运行良好,但是每当我尝试通过 'master' 分支中的 github 连接将其部署到 heroku 时,我在 heroku 日志中收到以下错误。
public class TypeDescriptionContext : ITypeDescriptorContext
{
Control control;
IServiceProvider provider;
object instannce;
PropertyDescriptor property;
public TypeDescriptionContext(Control control,
IServiceProvider provider, object instannce,
PropertyDescriptor property)
{
this.control = control;
this.provider = provider;
this.instannce = instannce;
this.property = property;
}
public IContainer Container => control.Site?.Container;
public object Instance => instannce;
public void OnComponentChanged() =>
GetService<IComponentChangeService>()
?.OnComponentChanged(control, null, null, null);
public bool OnComponentChanging() => true;
public PropertyDescriptor PropertyDescriptor => property;
public object GetService(Type type) => provider?.GetService(type);
public T GetService<T>() => (T)this.GetService(typeof(T));
}
非常感谢任何提示或答案!
在客户端和服务器端创建 .env 文件