Skip to main content

Notifications

Microsoft Dynamics CRM forum
Unanswered

Cannot get workflowcontext if using merged dll

Posted on by
I have a workflow that just has simple logic so I can debug the problem. 
 public sealed class Testing : CodeActivity
    {
        
        protected override void Execute(CodeActivityContext context)
        {
            IWorkflowContext workflowContext = context.GetExtension<IWorkflowContext>();
            if (workflowContext == null)
            {
                throw new Exception(/workflowContext null/);
            }else
            {
                throw new Exception(/workflowContext not null/);
            }
        }
    }
If I install only this workflow, the result is /workflowContext not null/. But if I  use ILrepack.lib.MSbuild.Task package and package other dlls into one dll, then register the workflow use xrmltoolbox, I got //workflowContext  null/. I can open the merged dll and see all the dlls I want are in there. Any idea? thanks
Holly

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,469 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans