VS 工作流设计器不扩展活动 [英] VS Workflow designer not expanding activities

查看:30
本文介绍了VS 工作流设计器不扩展活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不明白为什么 WF 设计器中的某些活动没有展开.

I can't figure out why some activities in the WF designer do not expand.

查看 WizardActivityPack 活动的示例文档:

Looking at the sample documentation for the WizardActivityPack activities:

但是当我尝试在 Visual Studio 2010 的 WF 设计器中打开同一个文件时:

But when I try to open the same file in Visual Studio 2010's WF designer:

如果我使用 XML 编辑器查看文件,我可以看到文件中的所有活动,但设计器只向我显示了一个框,我无法单击进入或展开它.

If I look at the file using the XML editor I can see all the activities are in the file, but the designer only shows me the one box and I cannot click into or expand it.

推荐答案

您必须将 *.design.dll 放在 Visual Studio 可以找到的地方. 喜欢在 %programfiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies 中.

You have to place the *.design.dll somewhere that visual studio can find it. Like in the %programfiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies.

VS 按照惯例寻找设计师;如果活动位于名为 Activity.dll 的程序集中,VS 会在 VS 的代码库(和子目录)下名为 Activity.Design.dll 的程序集中查找其设计类,或者(我相信)在 GAC 中.

VS looks for designers by convention; if the activities are in an assembly called Activity.dll, VS looks for its design classes in an assembly called Activity.Design.dll under VS' codebase (and subdirectories) or (I believe) in the GAC.

在创建您自己的活动/设计师时,了解这一事实很重要!这背后的原因是您的 Activity 程序集不需要引用 Designers dll;您可以将 Activity 程序集本身交付到生产中,同时将 Designers dll 留在设计机器上.

This fact is important to know when creating your own activities/designers! The reason behind this is so that your Activity assembly doesn't need to reference the Designers dll; you can deliver the Activity assembly by itself to production while leaving the Designers dll on the design machine.

(如果您从您的活动程序集中引用了 *.Design.dll,或者如果它们存在于同一个程序集中,则这不适用.推荐的模式是将两者分开并允许VS 通过约定加载它们.有关示例,请参阅此示例.)

(If you reference the *.Design.dll from your Activities assembly, or if they exist in the same assembly, this doesn't apply. The recommended pattern is to separate the two and allow VS to load them via convention. For an example of this, see this sample.)

这篇关于VS 工作流设计器不扩展活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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