You are viewing limited content. For full access, please sign in.

Question

Question

WF Custom Activity Compile Error - Type Expected

asked on September 26, 2014 Show version history

Hi guys,

 

Looking for Custom WF Activity experts out there. I have created some activities before and never ran into this problem.

After compiling the Proxy file, I try to Build my project one final time with the proxy included. However, I get an error on the Proxy file "Type expected."

So, it's expecting a class name or something that it thinks does not exist or is not valid. I am totally lost and would really appreciate some guidance on how to troubleshoot.

I have zipped and attached my project file. Below is a screenshot of the error when trying to compile:

When clicking on the error, I get suggestions, none of which work.

 

If I try one of the suggestions, it compiles successfully, but then I cannot publish my workflow with this activity.

 

 

0 0

Answer

SELECTED ANSWER
replied on September 26, 2014

I've encountered that issue before. It's usually in relation to the Namespace. Try changing your Namespace to

Namespace MyPastelSDKActivity

And see if that fixes it.

0 0

Replies

replied on September 26, 2014

I have two hunches. 

  1. Make sure your activity class 'MyPastelSDKActivity' is Public. 
  2. Make sure you aren't publishing the activity in a workflow named MyPastelSDKActivity or as an activity named MyPastelSDKActivity (variations of whitespace count for being named the same thing, like "My PastelSDK Activity". 

 

One final thing, in your designer, you can select the Workflow menu and 'Export as Windows Workflow'. That will show you the exact code that is failing to publish and may help you debug the issue.

 

0 0
replied on September 29, 2014

Hi guys,

 

Thanks for your assistance.

 

I started a new VS project from scratch, didn't rename anything and left it all on defaults and didn't even write any code. Generated a proxy file based on the raw template only, and the problem still occured. So, I edited the Class name (not the namespace) to make it unique, then used that in the proxy file where it was complaining before and it worked.

 

So it seems that out of the box, the proxy file doesn't quite work 100% with VB. I normally create activities in C#, which never game me this type of problem before.

 

Thanks for the help!

Sheldon

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.