Condition Error: Property is not declared. It may be inaccessible due to its protection level.

Posted by Stoive on Stack Overflow See other posts from Stack Overflow or by Stoive
Published on 2010-05-26T09:44:02Z Indexed on 2010/05/26 9:51 UTC
Read the original article Hit count: 1208

Filed under:

I've have a workflow whose root activity is a custom NativeActivity with a public InArgument called XmlData. When I try and use this argument in a child If activity I get the following error using XmlData within the condition:

'XmlData' is not declared. It may be inaccessible due to its protection level

I'm adding the argument inside CacheMetadata using the metadata.AddArgument method, and I've tried adding the child property it has using both AddChild and AddImplementationChild.

If I replace my custom activity with an ActivityBuilder and use code to create a DynamicActivityProperty then the condition can be compiled successfully, so I don't see what I'm missing when I use my own code.

© Stack Overflow or respective owner

Related posts about workflow-foundation-4