Visual studio 2010 Sharepoint Designer说:“您可以使用;服务器上的工作流操作列表引用了不存在的程序集";

Visual studio 2010 Sharepoint Designer说:“您可以使用;服务器上的工作流操作列表引用了不存在的程序集";,visual-studio-2010,sharepoint,sharepoint-2010,sharepoint-designer,custom-action,Visual Studio 2010,Sharepoint,Sharepoint 2010,Sharepoint Designer,Custom Action,我已成功地将自定义操作部署到SharePoint Designer中可用的操作列表中,但在打开现有工作流或在设计器中创建新工作流时,我收到消息(当然,我的自定义操作不在操作列表中) 服务器上的工作流操作列表引用了 不存在。某些操作将不可用。大会 强名称为{实际程序集强名称}。联系您的服务器 有关详细信息,请与管理员联系 我检查了强程序集名称、全局程序集缓存、包选项、.ACTIONS文件、web.config。。。一切似乎都很好。有什么新想法吗?我假设自定义操作是一个场部署的活动,它继承自Syst

我已成功地将自定义操作部署到SharePoint Designer中可用的操作列表中,但在打开现有工作流或在设计器中创建新工作流时,我收到消息(当然,我的自定义操作不在操作列表中)

服务器上的工作流操作列表引用了 不存在。某些操作将不可用。大会 强名称为{实际程序集强名称}。联系您的服务器 有关详细信息,请与管理员联系


我检查了强程序集名称、全局程序集缓存、包选项、.ACTIONS文件、web.config。。。一切似乎都很好。有什么新想法吗?

我假设自定义操作是一个场部署的活动,它继承自System.Workflow.ComponentModel.activity(可能使用子类SequenceActivity,但这并不重要)

我猜您尚未创建所需的操作文件,该文件将部署到TEMPLATE\1033\Workflow

<?xml version="1.0" encoding="utf-8" ?>
<WorkflowInfo>
  <Actions Sequential="then" Parallel="and">
    <Action Name="Description for SP Designer"
            Assembly="$SharePoint.Project.AssemblyFullName$"
            ClassName="AssemblyName.ClassName"
            AppliesTo="all"
            Category="SPD category"
            UsesCurrentItem="true"
            >
      <RuleDesigner Sentence="Line as it appears in SPD workflow" />
      <Parameters>
        <Parameter Name="__ActivationProperties" Type="Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties, Microsoft.SharePoint" Direction="In" />
      </Parameters>
    </Action>
  </Actions>
</WorkflowInfo>

SPD从操作文件中读取活动列表。添加文件将使其进入菜单。要将其实际添加到工作流中,还需要按类名授权自定义工作流活动

要添加授权类型,我使用具有以下spwebmodification的功能接收器:

private SPWebConfigModification CreateWebConfigModification(string assembly, string assemblyNamespace)
{
    return new SPWebConfigModification()
    {
        Type = (SPWebConfigModification.SPWebConfigModificationType)0,
        Name = String.Format("authorizedType[@Assembly='{0}'][@Namespace='{1}'][@TypeName='*'][@Authorized='True']", (object)assembly, (object)assemblyNamespace),
        Path = "configuration/System.Workflow.ComponentModel.WorkflowCompiler/authorizedTypes",
        Owner = assemblyNamespace,
        Sequence = 0U,
        Value = String.Format("<authorizedType Assembly='{0}' Namespace='{1}' TypeName='*' Authorized='True' />", (object)assembly, (object)assemblyNamespace)
    };
}
private SPWebConfigModification CreateWebConfigModification(字符串程序集,字符串程序集命名空间)
{
返回新的SPWebConfigModification()
{
类型=(SPWebConfigModification.SPWebConfigModificationType)0,
Name=String.Format(“authorizedType[@Assembly='{0}'][@Namespace='{1}'][@TypeName='*'][@Authorized='True']],(object)assemblymespace,(object)assemblymespace),
Path=“configuration/System.Workflow.ComponentModel.WorkflowCompiler/authorizedTypes”,
Owner=assemblyNamespace,
序列=0U,
Value=String.Format(“,(对象)程序集,(对象)程序集命名空间)
};
}

这将生成一个SPWebConfigModification,可在安装/卸载期间使用。

检查您的本地管理员权限。如果您没有本地权限,则会出现此错误。请创建新网站和网站集,并为新网站创建新工作流。您将收到错误消息。不要保存工作流程。关闭SPD。
重新打开设计器并创建新的工作流程—这将解决问题。

在一个终端服务器环境中,您希望为多个用户使用SharePoint designer,并且他们需要管理SharePoint 2013工作流,这似乎确实是个问题。SharePoint Designer尝试从SharePoint服务器下载工作流程序集并将其安装到GAC中,但除非您是本地管理员(在终端服务器环境中不太可能),否则此操作将失败。