gpt4 book ai didi

.net - Visual Studio 2015 Professional 引发以下错误 :- Could not load file or assembly 'Microsoft. Activities.Design.Services

转载 作者:行者123 更新时间:2023-12-04 02:04:28 25 4
gpt4 key购买 nike

我的开发机器中有以下内容:-

  • Windows 服务器 r2 2012。
  • SharePoint 服务器 2016。
  • 我下载/安装 Visual Studio 2015 Professioanl。
  • 我下载了适用于 Visual Studio 2015 的 Microsoft Office 开发人员工具预览版 2
  • 我在 VS 2015 社区中创建了一个新的空 Sharepoint 2016 项目。
  • 在项目中,我添加了一个新的事件接收器。
  • 我成功地构建了项目。

  • 但是当我点击开始调试时出现了这个奇怪的异常:-

    Severity Code Description Project File Line Suppression State ErrorUnable to load one or more of the requested types. Retrieve theLoaderExceptions property for more information. SharePointProject6


    这是我的 SP 2016 解决方案的样子:-
    enter image description here
    我的项目也显示此警告:-

    Severity Code Description Project File Line Suppression State WarningUnhandled exception occurred while calling method'projectService_ProjectInitialized' of type'Microsoft.VisualStudio.SharePoint.WorkflowDesignerSupport.PackageBootstrapper,Microsoft.VisualStudio.SharePoint.WorkflowDesignerSupport,Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.Exception: System.IO.FileNotFoundException. Message: Could not loadfile or assembly 'Microsoft.Activities.Design.Services,Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' orone of its dependencies. The system cannot find the file specified.SharePointProject6 0


    所以有人可以就此提出建议吗?
    谢谢
    编辑
    这是引用资料
    enter image description here :-
    编辑 2
    当我从以下位置“ C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5”检查我当前的引用资料时,我得到以下信息:-
    enter image description here
    编辑 3
    现在我去了另一台安装了visual studio 2015的机器(实际上它是我的开发笔记本电脑),我复制了 Microsoft.Activities.Design.Services.dll来自 C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Activities.Design.Services\v4.0_1.0.0.0__31bf3856ad364e35 ,然后我将其粘贴到安装了 sharepoint 和 Visual Studio 的服务器中:-
    enter image description here
    然后我打开 Visual Studio 项目,浏览 Microsoft.Activities.Design.Services.dll ,并将其添加到我的 Visual Studio 项目中,如下所示:-
    enter image description here
    但我仍然面临同样的错误。现在我尝试以 Admin.Plus 身份运行 Visual Studio,我清除了项目的 bin 文件夹。另外,我修复了visual studio并修复了visual studio的开发工具……但是当我运行项目时,我会收到同样的错误……
    Edit-4
    现在我已经修复了 Visual Studio 2015,并且收到了以下消息:-
    enter image description here
    所以我不确定这些消息是否与我面临的问题有关?

    最佳答案

  • Microsoft.VisualStudio.SharePoint.WorkflowDesignerSupport因此 Microsoft.Activities.Design.Services.dll由 Visual Studio ( devenv.exe ) 本身加载,而不是由您正在编写的组件加载,因此 VS 不会在您的项目目录中查找它。
  • 您可能可以通过复制 Microsoft.Activities.Design.Services.dll 来解决这个问题。进入与 Microsoft.VisualStudio.SharePoint.WorkflowDesignerSupport 相同的目录, C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SharePoint\Extensions\WFDesignerSupport\ .
  • 最好的方法当然是安装缺少的 Workflow Manager此 DLL 所属的组件。它可以从 Microsoft 下载,如下所述:https://msdn.microsoft.com/en-us/library/jj193448(v=azure.10).aspx

  • 编辑

    根据 https://msdn.microsoft.com/en-us/library/yx7xezcf(v=vs.110).aspx ,可执行文件可以在它的配置文件中指定在哪里查找程序集,VS 这样做。 devenv.exe.config包含:
    <probing privatePath="PublicAssemblies;PrivateAssemblies;...

    所以它应该在 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies 中寻找 dll .

    关于.net - Visual Studio 2015 Professional 引发以下错误 :- Could not load file or assembly 'Microsoft. Activities.Design.Services,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42951482/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com