Trending Issue: System.Memory.dll missing after installing August 2025 CU for SharePoint Workflow Manager

[Update from August 22nd – additional assemblies added]

SharePoint Workflow Manager August 2025 CU switched from using the System.Data.SqlClient database connectivity layer to the modern and more powerful Microsoft.Data.SqlClient database connectivity layer.

Microsoft.Data.SqlClient has different dependencies which are not automatically fulfilled on machines which do not have SharePoint Server Subscription Edition installed.

Error messages similar to the following can be found in the logs

Could not load file or assembly ‘System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ or one of its dependencies.

Solution

A fix for this issue has been released with October 2025 CU for SharePoint Workflow Manager

The following dependencies have to be manually resolved by adding these files to the global assembly cache:

  • Microsoft.Data.SqlClient version 5.1.5 (assembly version 5.0.0.0)
  • Microsoft.Identity.Client version 4.56.0 (assembly version 4.56.0.0)
  • System.Memory.dll version 4.5.4 (assembly version 4.0.1.1)
  • System.Buffers.dll version 4.5.1 (assembly version 4.0.3.0)
  • System.Runtime.CompilerServices.Unsafe.dll version 4.5.3 (assembly version 4.0.4.1)

These files can be either downloaded as NuGet packages or copied from a SharePoint Server Subscription Edition machine with at least 25H1 feature update.

Solution Script

For your convenience I have created a sample script, which downloads nuget.exe and the required Dlls and the required NuGet Packages and adds the dlls to the Global Assembly Cache (GAC):
https://github.com/stefangossner/Install-Missing-Assemblies-For-SPWFM/blob/main/SPWFM-Install-Missing-Assemblies.ps1

The script will

  • check if the required dlls are already installed
  • create a new temporary directory in the following path: C:\temp\Nuget
    After the script has been executed successfully you can remove this folder.
  • download nuget.exe
  • execute nuget.exe to download the nuget packages
  • register the downloaded assemblies in the global assembly cache
  • verify that the assemblies are correctly registered in the GAC

It is required to execute the script as Administrator to ensure that the assemblies can be registered in the Global Assembly Cache (GAC)

40 Comments


  1. This may be a dumb question and if so I apologize, but if SharePoint Workflow Manager was installed on a separate server and running with a SharePoint 2019 farm, would the files still need to be downloaded from NuGet and installed on SharePoint Workflow Manager Server, the SharePoint 2019 Servers or all of the servers. Thanks in advance.

    Reply

    1. Hi Daniel,
      should be only on the SPWFM server – but don’t have a SP2019 farm connected to SPWFM to test right now.
      Cheers,
      Stefan

      Reply

  2. This update didn’t quite work out as expecte hmm, gotta be fair about it.

    Reply

    1. Hi Patrick, do you have more details?

      One known issue with the script is that it requires Internet access. If this is blocked from the SPWFM server it will not be able to download the packages.

      In this case it would be possible to run the script on a desktop or notebook with internet access and later copy the downloaded assemblies to the SPWFM server.

      Reply

      1. Hallo Stefan,

        do we need to copy all the files downloaded with the script to C:\Windows\assembly\GAC_MSIL or only the 5 assemblies you mentioned above?

        Reply

        1. Hi Marc, only the 5 assemblies. But copying will not work. You need to register them in the GAC, either using the gacutil tool or using similar code as in my powershell script:

          [System.Reflection.Assembly]::Load(“System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”) > $null
          $publish = New-Object System.EnterpriseServices.Internal.Publish

          $publish.GacInstall(“C:\temp\nuget\System.Memory.4.5.4\lib\net461\System.Memory.dll”)

          By adjusting the file location.

          Reply

  3. Hi Stefan,
    Thanks for the information. I am scheduled to do a new installation of SPWFM next week, so this saved a lot of trouble that I would have had next week. Is there any information from MS specifically about this? The customer needs to see it directly from them.
    Danke Schon

    Reply

    1. Hi Walter, not yet. A potential KB article is currently under discussion.
      Cheers,
      Stefan

      Reply

  4. Hi Stefan,

    I’m preparing SP WFM patching and I’m a bit confused.
    We have SP Subscription Edition and separate SP WFM farm so I’m wondering if mentioned issue will affect us or not?

    I am referring to:
    “Microsoft.Data.SqlClient has different dependencies which are not automatically fulfilled on machines which do not have SharePoint Server Subscription Edition installed.”

    I’m also checking September CU description for SP and there’s something like:

    “In order to use workflows in SharePoint Server, you must now have the latest update for SharePoint Workflow Manager installed.”

    Do you have more details about it?

    Kind Regards,
    Kamil

    Reply

    1. Hi Kamil,
      yes the issue with the missing dlls will affect you if SPWFM is not installed on a SharePoint Server Subscription Edition Server.
      The script on github from my blog will help you to fix it.
      To enhance security SharePoint server inspects the traffic sent from SPWFE to guarantee the required SPWFM patch level.
      Cheers,
      Stefan

      Reply

  5. Stefan,

    Thank you for prompt reply.
    How about consequences of having not updated SP WFM with new security rules? Workflows will start failing?

    Reply

    1. Yes. In this case the requests coming from SPWFM will be rejected and not processed by SharePoint.

      Reply

  6. Hi Stefan! Thanks so much for this article and the script. Can I run the script prior to applying the SPWFM August update? Although it looks OK, I want to confirm the internet isn’t blocked.

    Reply

    1. Hi Marlene,
      yes – absolutely! Execute the script before applying the fix is perfectly fine and will guarantee that all required assemblies are available when needed.
      Cheers,
      Stefan

      Reply

  7. Thank you Greatly for this! My services were bouncing up and down after the patch, could not figure out what was going on. I’ve put sharepoint through the wringer with troubleshooting this, but I think getting close. Right now Workflow in Sharepoint Central admin “says” connected, but workflows still seem dead, and sharepoint itself is throwing a correlation ID when connecting.
    I keep coming back to this issue with trying to re-register from the sharepoint server to my freshly built SPWFM (now working again):
    PS C:\Users\administrator.[company]> Register-SPWorkflowService

    cmdlet Register-SPWorkflowService at command pipeline position 1
    Supply values for the following parameters:
    SPSite: http://sharepoint.[company].com
    WorkflowHostUri: http://sharepointwf22.[company].com:12291
    Register-SPWorkflowService : Workflow XAML failed validation due to the following errors:
    Invalid type(s) ‘Microsoft.Activities.Messaging.SecurityTokenScope’.
    Invalid type(s) ‘Microsoft.Activities.Messaging.SecurityToken’.
    Invalid type(s) ‘Microsoft.Activities.Messaging.GetS2SSecurityToken’.
    HTTP headers received from the server – ActivityId: 7747f219-abbf-4cf4-a9fb-4e0dbad5d7ef. NodeId: SHAREPOINTWF22.
    Scope: /SharePoint. Client ActivityId : 788bc6a1-7fdb-d0b7-a196-479729eae531.
    At line:1 char:1
    + Register-SPWorkflowService
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~
    I’ve tried many iterations of this command, this one shows the error most obviously. Doesn’t matter http/https.

    Just a random guess if this may be related?? Maybe I need t install the NUGET package on the sharepoint server as well?

    Either way, I appreciate you getting me another step further!

    Reply

    1. Hi SRH,
      this seems to be a different issue. The invalid types are not related to the assemblies from the Nuget package.
      Did you install the matching SPWFM Client components for the SPWFE patch level on the SharePoint server?
      Cheers,
      Stefan

      Reply

      1. Hello Stefan. Thank you again so much for your reply. All guidance is appreciated.
        I ununstalled the older Microsoft Workflow Manager Client on the server, then installed the sharepointworkflowmanagerclient_x64 package which brought the version in programs and features to:
        Sharepoint Workflow Manager Client 16.0.18526.20518, which appears to make the SPWFM server in being the latest?
        I must admit the MSI package runs so fast it doesnt really appear to be doing much, I’m going to look for log files, or look into manually clearing any current registrations and re-setup cleanly. I’ll let you know if I make any progress. Thank you again.

        Reply

        1. Hi SRH,
          yes that is the correct SPWFM Client matching August 2025 CU for SPWFM.
          Cheers,
          Stefan

          Reply

  8. Good morning! After installing this, I noticed it created a lot of files on the server. These 5 assemblies have a lot of dependencies. Can any of these be safely deleted? This installed items in C:\Users(admin_acct).nuget (154 MB, 714 folders, 1,003 files) & c:\temp\nuget (162 MB, 676 folders, 890 files). Should I have run the script from a different path?

    Thanks for the script and in advance for your answer! God bless.

    Reply

    1. Hi Marlene,
      yes – you can delete these files.
      Cheers,
      Stefan

      Reply

  9. Stefan,

    I was able to get the update installed. How do I register these assemblies on SharePoint 2016 on premise farm with no internet access?

    Reply

    1. Hi Shawn,
      in this situation follow these steps:
      1) download the script SPWFM-Install-Missing-Assemblies.ps1 script from here on a machine with internet access (e.g. your desktop or notebook)
      https://github.com/stefangossner/Install-Missing-Assemblies-For-SPWFM/blob/main/SPWFM-Install-Missing-Assemblies.ps1
      2) duplicate the script so that you have two ps1 files. One will be executed on the machine where you have internet access, the other on the SPWFM server
      3) in the script that will be executed on the machine with internet access comment out or remove lines 86-109
      4) execute this script
      5) copy the content of the c:\temp\nuget directory to the SPWFM server. Ensure that the absolute path will be the same (again place them in c;\temp\nuget)
      5) in the script that will be executed on the no-internet-access SPWFM machine comment out or remove lines 73-84
      6) copy the script to the SPWFM server
      7) execute the script on the SPWFM server

      That should do the job.

      Cheers,
      Stefan

      Reply

      1. Stefan,

        You are so very helpful! Thank you so much.

        V/R
        Shawn

        Reply

      2. Thank you for the step-by-step instructions. I followed the instructions as written during a new installation of SP WFM last week and everything went smoothly. There were only one small modification needed. On the company laptop I was unable to run the script as an administrator, as expected, so I just commented out the ‘RunasAdministrator’ line (#34) in the script. On the target SPWFM server the script worked great and the installation, configuration and running of SPWFM was solid. There were some additional bugs from Microsoft, but they were typical and were overcome quickly. Vielen Dank für die Hilfe!

        Reply

  10. Stefan,

    I ran the modified scripts this morning with no luck. It seems to be looking for a nuget.exe file in C:/temp/nuget

    & : The term ‘c:\temp\nuget\nuget.exe’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
    again.
    At line:82 char:3
    + & c:\temp\nuget\nuget.exe install Microsoft.Data.SqlClient -version 5 …
    + ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (c:\temp\nuget\nuget.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
    & : The term ‘c:\temp\nuget\nuget.exe’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
    again.
    At line:83 char:3
    + & c:\temp\nuget\nuget.exe install System.Runtime.CompilerServices.Uns …
    + ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (c:\temp\nuget\nuget.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
    Error: failed to install required assemblies!

    Reply

  11. Disregard my last. I found it

    Reply

  12. Stefan,

    Forgive me please, it looks like the servers that are not connected to the internet are still unable to load the assemblies. It’s reaching out to the internet.

    Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send.
    At line:76 char:1
    + Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/lat
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

    Feeds used:
    https://api.nuget.org/v3/index.json

    Package “Microsoft.Data.SqlClient.5.1.5” is already installed.
    Feeds used:
    https://api.nuget.org/v3/index.json

    Attempting to gather dependency information for package ‘System.Runtime.CompilerServices.Unsafe.4.5.3’ with respect to project ‘c:\temp\nuget’, targeting ‘.NETFramework,Version=v4.6.1’
    nuget.exe : Unable to load the service index for source https://api.nuget.org/v3/index.json.
    At line:83 char:1
    + & c:\temp\nuget\nuget.exe install System.Runtime.CompilerServices.Uns …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (Unable to load …/v3/index.json.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

    An error occurred while sending the request.
    The underlying connection was closed: An unexpected error occurred on a send.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
    An existing connection was forcibly closed by the remote host
    Error: failed to install required assemblies!

    Reply

    1. Hi Shawn,
      it seems you did not remove/comment out the lines I advised.
      These are my instructions:

      “… on the no-internet-access SPWFM machine comment out or remove lines 73-84”

      Cheers,
      Stefan

      Reply

  13. Stefan,

    Unfortunately the Sept. 2025 updates were applied to two of my servers before I could install the missing assemblies. I have now installed the assemblies and updated the products but the SharePoint workflow manager will not configure. The Service Bus Service is stuck on starting. Can you point me in the right direction?

    Reply

    1. Hi Shawn,
      sorry – but this can have a large number of reasons and requires deeper investigation.
      Please open a ticket with Microsoft Support to get assistance here.
      Cheers,
      Stefan

      Reply

  14. hello Stefan,

    Could you please share the backup plan for the steps mentioned above, in case we need to re-register the assemblies and remove the DLL files to restore the farm to its previous state

    Reply

    1. Hi Nixon,
      you can remove them or keep them if you revert.
      August 2025 CU for SPWFM is the first patch level using these assemblies.
      If you revert to an older patch level they would remain unused on your system if you keep them.
      Cheers,
      Stefan

      Reply

  15. Customer has installed the SPWFM august CU and trying to create a new farm
    but the configuration is failing with service bus services failing

    so is this related to this issue ? will this work if add the assemblies ?

    just curious

    Reply

    1. Hi Anuradha,
      I cannot tell you if it will work afterwards. But these dlls are required.
      If the missing dlls are the only problem, then it should work. If there are additional issues, then it might still fail.
      Cheers,
      Stefan

      Reply

  16. We got the following error with our escpand solution:

    Stack Trace:

    [FileNotFoundException: Could not load file or assembly ‘ECSpand.SharePoint.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=78774a21f8e407f1’ or one of its dependencies. The system cannot find the file specified.]
    System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
    System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +95
    System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +64
    System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +59
    System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +49

    [ConfigurationErrorsException: Could not load file or assembly ‘ECSpand.SharePoint.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=78774a21f8e407f1’ or one of its dependencies. The system cannot find the file specified.]
    System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +515
    System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, Boolean checkAptcaBit) +29
    System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement) +60
    System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +68
    System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +212
    System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1119
    System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +139
    System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +168
    System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +259
    System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +311

    [HttpException (0x80004005): Could not load file or assembly ‘ECSpand.SharePoint.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=78774a21f8e407f1’ or one of its dependencies. The system cannot find the file specified.]
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +518
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +719

    Even if I retrack solutions and remove entries from web config it would not work…

    Reply

    1. Hi Martin,
      I don’t think this is related to SPWFM.
      As this is a 3rd party component, please involve the developer or the vendor to investigate this.
      Cheers,
      Stefan

      Reply

  17. When I run your fix script I keep getting

    Feeds used:

    Argument cannot be null or empty
    Parameter name: primarySources
    Feeds used:

    Argument cannot be null or empty
    Parameter name: primarySources
    Error: failed to install required assemblies!

    Reply

    1. Hi San,
      I assume on this machine was NuGet already before (e.g. if this is a dev machine with Visual Studio installed).
      In this case the sources might have been reconfigured.

      Try after executing the following nuget command from within the temp directory:
      nuget add source https://api.nuget.org/v3/index.json -n nuget.org

      This should add the default nuget source back to the list.

      Cheers,
      Stefan

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.