title: A Workflow Foundation 4 argument of a nested type
body: <p>One of the arguments to my workflow (xaml) is a nested type declared in a static class. Unfortunately, the "Browse for .NET type" dialog box does not show me this type irrespective of what I search for</p>
  
  <p><code>full.namespace.containingstaticlass.typeIneed</code></p>
  
  <p>or </p>
  
  <p><code>full.namespace.containingstaticlass+typeIneed</code></p>
  
  <p>Since the dialog didn't work, I tried editing the xaml itself but couldn't figure out how to define the </p>
  
  <p><code>Type="InArgument(xmlnamespacetomyassembly:???)"</code></p>
  
  <p>Help!?</p>
  
  <p><em>Edit:</em> It seems the Workflow Designer does not work with nested types at all, because an expression to cast an object to a nested type gave me this error.</p>
  
  <p><img src="https://i.stack.imgur.com/yezY9.png" alt="enter image description here"></p>
  
  <p>At this point, any workarounds will be most welcome!</p>
  
  <p>Added a <a href="https://dl.dropboxusercontent.com/u/18222766/WorkflowNestedTypesFail.zip" rel="nofollow noreferrer">simple sample</a> that shows the problem.</p>
  
  <ol>
  <li>There is no way to add a parameter (in the designer) of type NestedType.EssentialStruct</li>
  <li>Even if you add an expression to cast Object to NestedType.EssentialStruct in the properties window against any InArgument, the designer will complain.</li>
  </ol>
  
  <p>Posting the relevant sections also:</p>
  
  <p>The nested type that needs to be used in the CodeActivity</p>
  
  <pre><code>public static class NestedTypes
  {
      public struct EssentialStruct
      {
      }
  }
  </code></pre>
  
  <p>A simple activity that uses the nested type as an InArgument and result</p>
  
  <pre><code>public sealed class TestActivity : CodeActivity&lt;NestedTypes.EssentialStruct&gt;
  {
      public InArgument&lt;NestedTypes.EssentialStruct&gt; Handle
      {
          get;
          set;
      }
  
      protected override NestedTypes.EssentialStruct Execute(CodeActivityContext context)
      {
          return context.GetValue(this.Handle);
      }
  }
  </code></pre>
  
  <p>I can't post the XAML that produces the error because the designer doesn't save it, errors out just before saving it.</p>