0

need your help.

Environment: Sharepoint 2013 SP1 Foundation, Visual Studio 2013 Community (also tried 2015,2017) with OfficeToolsForVS2013.

I`m new to Sharepoint solution development via Visual Studio, now trying to deploy simple List Workflow Farm Solution with only WriteToHistory action.

I followed this video as example. But I created a farm solution. Sandbox solution makes no difference.

On deploying I got error in Visual Studio:

Error   1   Error occurred in deployment step 'Add Solution': 
    Failed to load receiver assembly "Microsoft.SharePoint.WorkflowServices, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" 
    for feature "SharePointProject6_Feature1" (ID: bd69fc03-21de-49eb-8023-bea8fd211425).: System.IO.FileNotFoundException: 
    Could not load file or assembly 'Microsoft.SharePoint.WorkflowServices, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies.
File name: 'Microsoft.SharePoint.WorkflowServices, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

I also tried to Add solution (and install) (wsp) with Sharepoint Powershell, with Central Administation - it makes no difference to result.

In error text I see that version of assembly is 14, but everywhere in Visual Studio (for ex. in WF properties) the ver. is 15.

This article gives guidance to use gacutil - And I tried to register with gacutil required dlls (Microsoft.SharePoint.WorkflowServices) - but in registered list no ver.14. and I dont know where to got them.

Other article tells to install the hotfix KB2880963. But that hotfix applies only to SP Enterprise Edition, not to Foundation.

All it makes a sense, that I`m doing something (or may be everything?=)) wrong.

Already spent a full week to solve this problem, but got no result.

Thanks in advance for any kind of ideas.

3
  • Are you deploying SharePoint 2010 target workflow or SP 2013 target workflow? Can you also confirm Workflow Management Services configured? May 15, 2017 at 13:31
  • In Visual Studio I create empty project, than I add a new Item - Workflow. There was no choises between versions. As I know, Sharepoint Foundation 2013 allows to create only 2010 workflows (in SP Designer). I`ve found info about Workflow Management Services - now configuring. May 15, 2017 at 14:52
  • According to link I`ve installed and configured WMS, but stacked at Register-SPWorkflowService command - The term ‘Register-SPWorkflowService’ is not recognized as the name of a cmdlet, function... Adding "Add-PSSnapin “Microsoft.SharePoint.PowerShell”" makes no effect. May 15, 2017 at 15:24

1 Answer 1

0

I had errors like this when building a custom timer job for SP 2013 in VS 2013. After confirming the correct .Net version is being used, I removed all DLL files from the GAC and anywhere in the paths referenced in the VS tool. Of course, keep the libraries you need on the stack then rebuild. My scenario is not a direct 1:1 for your post but this worked for when deploying a custom timer job.
Also, if you already have a version of the workflow installed, remove it first then try again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.