English 中文(简体)
普通集会和参考集会
原标题:RuleSetDialog and referenced assemblies

I m 试图在生产现场打开 规则SetDialog表格,但用电坠毁:

FileNotFoundException: Could not load file or assembly  IBM.Data.Informix, Version=9.0.0.2, Culture=neutral, PublicKeyToken=7c307b91aa13d208  or one of its dependencies. The system cannot find the file specified.

情况是,我们的项目中正在提及这一组,但由于将使用不同的数据库,因此在生产现场确实没有组别。

这是 trace痕:

at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at System.Workflow.Activities.Rules.SimpleRunTimeTypeProvider.get_ReferencedAssemblies()
at System.Workflow.Activities.Rules.SimpleRunTimeTypeProvider.GetTypes()
at System.Workflow.Activities.Rules.Parser..ctor(RuleValidation validation)
at System.Workflow.Activities.Rules.Design.RuleSetDialog..ctor(Type activityType, ITypeProvider typeProvider, RuleSet ruleSet)

我不敢确定要做什么。 由于我们的机器安装了所有司机,因此,在开发和测试过程中,一切工作都很出色,但我们的使用者却不这样做,他们只安装必要的司机。

最佳回答

我本周遇到了类似的错误,因为我们的所需批量没有在申请中部署,而是放在单独的子里。 我找不到任何工作方式告诉规则Engine去找他们。 对我来说,把哈萨克带进来似乎不是最佳解决办法。

就我的情况而言,目标一用于操作规则Engine没有推广方法,因此没有直接用于其方法定义的参考组件。 不需要参考议会来验证规则。

因此,我的工作是告诉大家,没有参考议会。 我写了我自己的ITypeProvider,并将这交给了规则Engine/规则SetDialog的建筑商。

参考书目/参考书/文献/材料/材料

    public ICollection<Assembly> ReferencedAssemblies
    {
        get
        {
            if (this.references == null)
            {
                List<Assembly> list = new List<Assembly>();
                // ADAPTATION TO ORIGINAL SOURCE: tell the RuleEngine that there are no referenced assemblies and hence no Extension Methods
                //foreach (AssemblyName name in this.root.GetReferencedAssemblies())
                //{
                //    list.Add(Assembly.Load(name));
                //}
                this.references = list;
            }
            return this.references;
        }
    }
问题回答

我认为这并不是最正确的解决办法,但我可以通过在我的申请中增加这一点来做到这一点:

var currentDomain = AppDomain.CurrentDomain;
currentDomain.AssemblyResolve += (o, args) =>
{
     // I resolve the not found assemblies here.
}

希望能够帮助他人。





相关问题
Xoml only Workflow parameters

Is is possible to pass parameters to an XOML only workflow? I m creating the workflow using XmlReader. Now is it possible to have parameters on an xoml only workflow?

Workflow no-code authoring

I want to use the no-code authoring in the workflow. So no code behind. Let s say I have 2 custom activities with dependency properties. How can I bind a property from activity1 to activity2 ?

Look and feel of workflow (.net WF4, beta2)

can i change the standard look and feel of a sequential workflow back to the wf 3.5 look and feel? I miss the on DragOver automatically expanding arrows between the elements. If this is not possible, ...

在工作流程中增加多个不动产元数据

我正在视窗工作流程中开展一些习俗活动,我需要增加一种依赖性,可以列出用户在使用......时可以选择的若干价值。

Exception practices when creating a SynchronizationContext?

I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...

热门标签