Windows Workflow 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我在使用 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.
确保您的自定义活动类标记为公共。
Make sure your Custom Activity class is marked as public.
我也经历过这个问题。我的工作流服务项目是其他项目解决方案的一部分。我从主解决方案中删除了工作流服务项目,并创建了一个仅包含工作流服务项目的新解决方案。构建后,将生成自定义活动并在工具箱中列出。
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.
我不知道这是否仍然与您相关,但我遇到了同样的问题。
我可以这样解决:
I don't know if this is still relevant for you but I had the same problem.
I could solve it like this:
不是同一个问题,但在 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 :)
我通过创建 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.