Friday, March 31, 2017

Visual Studio 2015 Professioanl is raising the following error :- Could not load file or assembly 'Microsoft.Activities.Design.Services

Leave a Comment

I have the following inside my Dev machine:-

  1. Windows server r2 2012.
  2. SharePoint server 2016.
  3. I download/Install Visual studio 2015 Professioanl.
  4. I download Microsoft Office Developer Tools Preview 2 for Visual Studio 2015
  5. i created a new empty sharepoint 2016 project inside VS 2015 community.
  6. inside the project i added a new Event Receiver.
  7. i build the project successfully.

but when i click on start debugging the got this weird exception :-

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

here is how my SP 2016 solution looks like:-

enter image description here

also my project is showing this warning:-

Severity Code Description Project File Line Suppression State Warning Unhandled 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 load file or assembly 'Microsoft.Activities.Design.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. SharePointProject6 0

so can anyone advice on this please? Thanks

EDIT

here is the references

enter image description here :-

EDIT-2 when i checked my current references from the following location "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5", i got the following:-

enter image description here

EDIT-3

now i went to another machine which have visual studio 2015 installed (actually it is my dev laptop), and i copies the Microsoft.Activities.Design.Services.dll from C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Activities.Design.Services\v4.0_1.0.0.0__31bf3856ad364e35, then i paste it inside my server which have sharepoint and visual studio installed:-

enter image description here

then i open the visual studio project, i browse for the Microsoft.Activities.Design.Services.dll, and i add it inside my visual studio project, as follow:-

enter image description here

but i am still facing the same error. now i try running the visual studio as Admin.Plus i clear the bin folder of my project. Plus i repair the visual studio and i repair the development tools for visual studio... but when i run the project I will receive the same error...

1 Answers

Answers 1

  1. Microsoft.VisualStudio.SharePoint.WorkflowDesignerSupport and thus Microsoft.Activities.Design.Services.dll are loaded by Visual Studio (devenv.exe) itself, not by the component you're writing, so VS won't look for it in your project directories.

  2. You could probably work around the problem by copying Microsoft.Activities.Design.Services.dll into the same directory as Microsoft.VisualStudio.SharePoint.WorkflowDesignerSupport, C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\SharePoint\Extensions\WFDesignerSupport\.

  3. The best way to do it is certainly to install the missing Workflow Manager component of which this DLL is a part. It can be downloaded from Microsoft as described here : https://msdn.microsoft.com/en-us/library/jj193448(v=azure.10).aspx

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment