Windows Workflow 4.0 活动未添加到工具箱

发布于 2024-08-08 19:10:15 字数 108 浏览 4 评论 0原文

我在 VS 2010 Beta 2 中创建了一个类项目。我向其中添加了一项活动。保存了。创建了另一个活动。我希望第一个活动出现在工具箱中,以便我可以将其拖到我的工作流程中,但事实并非如此。有什么想法吗?

I've created a class project in VS 2010 Beta 2. I've added one Activity to it. Saved it. Created another Activity. I would expect the first Activity to appear in the toolbox so I could drag it into my workflow, but it's not. Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

夏至、离别 2024-08-15 19:10:15

我在使用 Visual Studio 2010 RTM 时也遇到了这个问题。我写了一篇博客文章,提出了一个潜在的解决方案 这里

本质上,如果解决方案中有两个共享同一文件夹的项目,工具箱不会加载您的自定义活动。

I had this problem with Visual Studio 2010 RTM as well. I wrote a blog post with a potential solution here.

Essentially, the toolbox doesn't load your custom activities if you have two projects in your solution that share the same folder.

瘫痪情歌 2024-08-15 19:10:15

确保您的自定义活动类标记为公共。

Make sure your Custom Activity class is marked as public.

聚集的泪 2024-08-15 19:10:15

我也经历过这个问题。我的工作流服务项目是其他项目解决方案的一部分。我从主解决方案中删除了工作流服务项目,并创建了一个仅包含工作流服务项目的新解决方案。构建后,将生成自定义活动并在工具箱中列出。

I experienced this issue too. My workflow service project was part of a solution with other projects. I removed the workflow service project from the main solution and created a new solution only containing the workflow service project. After a build, the custom activities were generated and listed in the toolbox.

昔梦 2024-08-15 19:10:15

我不知道这是否仍然与您相关,但我遇到了同样的问题。

我可以这样解决:

  • 右键单击工具箱以打开上下文菜单
  • 选择选择项目...
  • 选择选项卡System.Activities Components
  • 单击浏览并选择包含自定义活动的 dll
  • 确保活动显示在列表中并已选中
  • 单击确定

I don't know if this is still relevant for you but I had the same problem.

I could solve it like this:

  • Right click on the Toolbox to open context menu.
  • Select Choose Items...
  • Select the tab System.Activities Components
  • Click on browse and select the dll that contains the custom activity
  • Make sure that the activity shows in the list and is checked
  • Click OK
高冷爸爸 2024-08-15 19:10:15

不是同一个问题,但在 Visual Studio 2012 中,在 64 位 Windows 上,我有一个包含 CodeActivity 和 NativeActivity 的 64 位应用程序,但它们没有显示在工具箱中。我将应用程序更改为 AnyCPU 并构建它,现在显示活动......
我希望它能帮助别人:)

Not really the same question but in Visual Studio 2012, on a 64 bit windows, I had a 64 bit application with CodeActivity and NativeActivity and they were not showing up in the toolbox. I changed the application to AnyCPU and built it, and the activities are now displayed...
I hope it will help someone :)

执手闯天涯 2024-08-15 19:10:15

我通过创建 Windows Workflow 4.0 控制台应用程序然后删除 Program.cs 解决了这个问题。很奇怪,但它有效。

I resolved this by creating a Windows Workflow 4.0 Console application and then removing out the Program.cs. Very odd, but it worked.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文