Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Opening XAML Workflow in Visual Studio 2015, CRM 2016

Posted on by 80

I exported CRM created workflows, created project in Visual Studio from "Activity Library" template, added references to 

Microsoft.Xrm.Sdk.dll

Microsoft.Xrm.Sdk.Workflow.dll

I can see CRM activities in VS toolbox, 

BUT

Adding "Workflow" activity from toolbox on to a new workflow activity or opening existing CRM workflow in visual studio produces "Could not generate view for Workflow"

In VS Error tab 1 error comes out:

Error System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Xrm.Sdk.Workflow.Activities.ActivityReference.CacheMetadata(NativeActivityMetadata metadata)
at System.Activities.NativeActivity.OnInternalCacheMetadata(Boolean createEmptyBindings)
at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList`1& validationErrors)
at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack`1& activitiesRemaining, ActivityCallStack parentChain, IList`1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)
at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
at System.Activities.Validation.ActivityValidationServices.InternalActivityValidationServices.InternalValidate()
at System.Activities.Validation.ActivityValidationServices.Validate(Activity toValidate, ValidationSettings settings)
at System.Activities.Presentation.Validation.ValidationService.CoreValidationWork(ValidationReason reason, CancellationToken cancellationToken) c:\work\TestActivity\ActivityLibrary1\ActivityLibrary1\CancelInvoice-5ACBFE4F-E9E1-4853-A676-25948AF7502A.xaml 0

*This post is locked for comments

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans