Error occurred in deployment step – moving a workflow project to a new SharePoint 2010 machine

你可以看 Paul Andrew 的solution

 

以下是我的探索:

Environment:  Microsoft SharePoint 2010

当我们把一个sharepoint workflow  project 从一台机器移植到另外一台机器的时候,当你deploy 的时候你会发现类似下面的错误:

Error 1 Error occurred in deployment step 'Activate Features': Failed to create workflow association 'WorkflowProject5 - Workflow1'. Cannot find SharePoint list with name "Workflow History" or GUID "bf404d65-7d02-4a2b-901a-2695eb96e2dd".
  0 0 WorkflowProject5

 

下面的步骤可以repro 这个错误, 即使你不从别的机器上移植程序过来。

我们移植程序的时候,工程文件和workflow 的某些属性什么没有变呢?

1. open http://machinename/ create sub site from page,  Site Actions ->New Site, input title name and sub site name, take 1234 as example, you will get  http://machinename/1234/SitePages/Home.aspx

2. File|New|project, navigate to  (visual C# or Visual basic)  sharepoint |2010, select any workflow project type in the template.

3. In the followed wizard, in the page, below " what local site do you want to use for debugging ", input  http://machinename/1234

4. The next couple of wizard pages leave the default settings.

5. Deploy the project.

Expect results: deploy success.

Actual results : deploy success.

6. delete the http://machinename/1234 site, from : Site actions->site settings, look for "Delete this site"  under "Site Actions" group

7. Deploy the project again.

Expect results: deploy success.

Actual results : See the above error.

8. Set the site url of the project to a available site. let say it http://machinename/

9. Deploy the project.

Expect results: deploy success.

Actual results : See the above error.

-----------So how to correct the error ?----------

10. select the workflow project item in the solution explorer. navigate to its properties.

from History List property, we can re-enter to the sharepoint customization wizard (we can re-enter to this wizard from somewhere also), then go through it again.

11. deploy the project.

Expect results: deploy success.

Actual results : deploy success.

问题的关键在于,当你deploy 的时候,负责deploy 的程序会检查你所创建的工程的配置正不正确。当你过去设置association 的位置没有变,但是你的site url 变了时候,产生了不同步,从而导致了错误。

 

posted @ 2010-06-10 12:34  dp/dt  阅读(133)  评论(0)    收藏  举报