Activator.CreateInstance(Type.GetType(srcm.ClassName)) [英] Activator.CreateInstance(Type.GetType(srcm.ClassName))

查看:67
本文介绍了Activator.CreateInstance(Type.GetType(srcm.ClassName))的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用nocommerce购物车,在将商品添加到购物车后,当我要进行运输时,出现以下错误:

Hi guys,

I am working on a nocommerce shopping cart, where after adding items to cart, when I am going for shipping process, I am getting the following error:

Activator.CreateInstance(Type.GetType(srcm.ClassName)) as IShippingRateComputationMethod



有人可以帮我吗?



Can anybody help me?

推荐答案

您的问题有些含糊,但可能是您必须指定程序集(甚至是域)才能正确解决此问题.目标环境.当然,如果它在您的开发环境中有效.

使用Reflection.Assembly.GetExecutingAssembly().GetName()检索程序集名称.

另外,您确定程序集在您的目标环境中可用吗?尝试在干净的映像上检查安装.

祝你好运!
Your question is somewhat vague, but it could be you must specify the assembly (or maybe even the domain) to get this right on the target environment. Certainly if it works in your development environment.

Use Reflection.Assembly.GetExecutingAssembly().GetName() to retrieve the assembly name.

Also, are you sure the assembly is available on your target environment? Try check your installation on a clean image.

Good luck!


这篇关于Activator.CreateInstance(Type.GetType(srcm.ClassName))的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆