Lars Nielsen's Discoveries

June 24, 2011

Workflow fails to compile: Resource identifier has already been used in this assembly

Filed under: Development,SharePoint,Troubleshooting — Lars Nielsen @ 9:23 pm
Tags: ,

Creating a workflow using WSPBuilder I suddenly hit a problem that my solution threw an error when I tried to build it.  The error was in the CSC file (the C Sharp compiler) of the form:

Resource identifier <type name> has already been used in this assembly

The problem became more apparent looking at the line that Visual Studio used to invoke the CSC (C# compiler).  The command line (shown in the output window in Visual Studio) contained two /resource switches which had duplicate entries that referenced the class in my assembly.  The error showed up as CS1508 and this MSDN article has the details.  The problem happens when you use declarative conditions in the if/else condition in a workflow.

I finally found this great post from Chris Mann explains how to fix this.  A simple change the to .csproj file is all you need.

Advertisements

2 Comments »

  1. The fix mentioned in the article didn’t work

    Comment by auyt rrtiyo — December 22, 2011 @ 10:15 am

  2. Did you get all the same symptoms in your case? Perhaps it was a different similar problem

    Comment by Lars Nielsen — December 22, 2011 @ 11:26 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: