2
votes

I have installed the CRM 2011 SDK addin for visual studio 2012 (ultimate) and am trying to create a XAML Workflow Activity

I have added the CRM Workflow items to the toolbox using these instructions Add Microsoft Dynamics CRM Workflow Activities to the Toolbox

When I try and drop a Workflow on the design surface it say in red text "Could not generate view for Workflow"

Hovering over the text reveals a System.IOException that says "Cannot locate resource workflowdesigner.xaml"

How do I fix this?

6
Perhaps a stupid question early in the morning. Did you specify the references to the correct DLLs from the project manager?Konrad Viltersten
I probably could have referenced every assembly in the sdk one by one to work out exactly what was missing.Peter
You should do that. And in VS you can mark a whole bunch in one sweep. It's not recommended to move assemblies to the target spot. the preferred approach is actually to refer to where they reside.Konrad Viltersten

6 Answers

1
votes

You probably need to refer to the assemblies from VS. It's a bit of pain but a healthy conduct. In VS12 it's made a bit easier (finally, after a decade) to copy references from another project and (really, really finally) to refer to several DLLs at the same time.

It's the best practice and prefer conduct. :)

1
votes

I fixed this by dumping the contents of my CRM SDK bin directory (about 24 assemblies) into C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies

Not elegant but obviously there was a dependency in there somewhere.

1
votes

Ondra is correct, this is a problem with the latest version of the SDK. Version 5.0.9690.3448 of the microsoft.xrm.sdk.workflow.dll does not work, whereas version 5.0.9688.1533 does not present the issue.

I had this issue occur on a XAML workflow that I previously had no problems with, and the issue turned out to be the upgrade of the SDK file.

Visual Studio 2012 Update 2 does not have any effect on this issue.

0
votes

This example (and whole CRM workflow) under VS works properly only with CRM SDK version 1.0 - latest version 1.1 and version for VS 2012 causes described problem.

0
votes

OK, I also hit this problem and made it work with your hints, I reached this result:

  1. Changing VisualStudio version had no effect.
  2. Changing the SDK version actually worked!

I am using SDK for CRM 2015 with version of 7.0.0.43 with visual studio 2015 and 2017. You can download it directly or use Nuget For "Microsoft.CrmSdk.Workflow" and "Microsoft.CrmSdk.CoreAssemblies"

SDK for 2018 (8.0.0) and Dynamics 365 (8.2.0.49) did not work.

-1
votes

Also Visual Studio 2012 Update 2 fix this problem