The namespace '<global namespace>' already contains a definition for 'Workflow'

hello B picture hello B · Mar 7, 2013 · Viewed 23.7k times · Source

I'm working on a Custom workflow activity. I've created my own helper.cs (Early Bound Entity Classes) with the Code Generation Tool (CrmSvcUtil.exe)

When I try to compile the code, it returns the following error:

The namespace '' already contains a definition for 'Workflow'

From the Helper.cs file.

Does anyone know what this means?

Answer

Dragos Bobolea picture Dragos Bobolea · Mar 7, 2013

I suggest you put all the early bound classes in a namespace, so it won't mess up with your other classes. You can specify the namespace with the "/namespace:" parameter for CrmSvcUtil. I usually put the early bound classes in my DataAccess namespace, together with the crm connection classes (Service/ServiceContext wrappers).

That being said, naming your custom workflow step "Workflow" is not really the best thing to do(if that's what you did, at least so I understood). Try capturing the essence of what the step does into the name - like a title.