This article refers to legacy products, components or features. Therefore, the content in this article is offered "as is" and will no longer be updated. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.


When K2.net 2003 artifacts are used in a K2 Designer for Visual Studio project and later the user attempts to deploy the process, K2 Designer for Visual Studio is unable to compile the K2.net 2003 Artifacts

Error Scenario

When K2.net 2003 artifacts are used in a K2 Process, the user will receive the following error when attempting to compile and deploy the process. This applies to new items and existing K2.net 2003 Artifacts imported into K2 Designer for Visual Studio that have been upgraded.
Expected class, delegate, enum, interface, or struct C:\Documents and Settings\k2student\Local Settings\Temp\ExtenderProjects\CSWinWF-f3967973aafd4628aecca3469dbb4015\EventItem_e961c0616b7f46698827937752b6a0fb.cs 5 8 VSCSWinWF-f3967973aafd4628aecca3469dbb4015

The steps outlined below illustrate how to reproduce the error:
Note: The steps below describe one scenario under which this error may occur. They are simplified and not all steps are shown or described
  1. Open K2 Designer for Visual Studio
  2. Create a new K2 project that has one process
  3. Drag and add a new K2.net 2003 Activity onto the design canvas
  4. Connect a line from the Start activity to the new K2.net 2003 Activity
  5. Select the K2.net 2003 Default Server event and add it to the activity
  6. Build the process, the error described above will be returned

If the user then views the code for this K2.net 2003 Server Event as shown above, the following will be seen:
public void Main(ServerEventContext K2)
  K2.Synchronous = true;

The issue is caused by the code view that does not display any class references or namespaces.

Known Issue Resolution