When I update my System.Activities package version to a later version the Invoke Code breaks. Why is that?
When running on version 23.10.2 it works fine without any error…
I was also trying to update the package version because I notice a huge delay with this… sometimes it takes up to 2 minutes to send SMTP mail… also I cannot use the stock SMTP mail activities as this does not allow for embedding images into the email body which I was able to solve with code here.
The issue with Invoke Code breaking after updating **System.Activities is likely due to changes in dependencies, compatibility issues, or stricter type checking in the newer versions.
Check Namespace Imports
In newer versions, some namespaces might need to be explicitly imported in the Invoke Code activity.
Ensure required namespaces like System.Net.Mail (for SMTP) and others are properly imported.
Debug SMTP Delay Separately
Since the SMTP delay issue might not be related to System.Activities, try:
Using different SMTP servers (e.g., Office365, Gmail, custom SMTP).
Checking firewall & network latency affecting SMTP response.
Implementing asynchronous email sending in your code.