A namespace does not directly contain members such as fields or methods


  • I get the error...

    "A namespace does not directly contain members such as fields or methods"

    frequently when I work on .xoml files.  I've had to recreate a workflow about 10 times in the last 2 weeks because they keep getting corrupted somehow.  Sometimes I can fix the problem by examining the .xoml file but sometimes I can't figure out what's wrong.

    Anyone out there have similar issues?  Do you know of a way to prevent having to recreate a workflow from scratch?

    Friday, July 14, 2006 1:56 PM


All replies

  • Which build are you using?
    Thursday, July 27, 2006 11:57 PM
  • Dear TOM LAKE,

    I am also facing this problem. I am using Beta v1.2 .

    Please HELP


    Rangarajan K

    Thursday, October 05, 2006 11:41 AM
  • You really should be working with the latest build of Windows Workflow Foundation (WF) which is RC5.  Go to this post for links to everything you need to download.
    Thursday, October 05, 2006 3:19 PM

    I was getting this error when building a project that contained a workflow. When I created the project it was just a c# assembly, not a workflow project. I edited the csproj file and added the following to the first PropertyGroup section:




    now everything builds.

    Wednesday, November 05, 2008 3:35 PM