This one had me going round in circles for a good few minutes...
While developing a custom activity today, I found myself reorganising some of my service contracts.
My custom activity is very simple, having a single incoming DependencyProperty containing a Sales Order and returning an Id via another DependencyProperty. The incoming sales order property needed to be re-bound in my workflow as I'd ended up changing the namespace.
On attempting to bind the property, Visual Studio very kindly gave me the following error:
Path resolved to Referenced activity Property 'SalesOrder' whose PropertyType 'TheNamespace.SalesOrder' does not match with the Target Type 'TheNamespace.SalesOrder'
A somewhat confusing message, it appears to be whinging that the two properties I'm trying to bind together are of the same type and it doesn't like it.
I checked and double-checked everything I could think of. The error smacks of the kind of error you get when two copies of the same assembly are loaded into an app domain but there was no reason for anything like that.
So, I shut down Visual Studio, grabbed a coffee and Googled for others with the same issue. I didn't find many references to the same problem, but the answer was there all along.
Marcel de Vries came to the rescue with his post WF Dependency property binding throws error on custom activities when changing types.
It turns out, I'd already fixed the problem, by shutting down Visual Studio before that well earned coffee. On restarting VS and reloading the solution, I was able to bind the property without any problem.
I'd call that a bug.
Posted
Aug 11 2008, 06:11 PM
by
Steve Morgan
Now, I realise that those of you who use blog comments such as these to
spread your worthless spam are not the cleverest people on the face of the planet.
So, I thought I'd make it clear that you're wasting your time posting your pointless
garbage here. Quite simply, it will never be published. Thankfully, unlike yourselves,
I'm blessed with an inherent ability to identify irrelevant content and it's every bit
as easy for me to toss your contribution into the virtual waste bin as it is to publish it.
So, guess what? Unless your comments are relevant (and I mean, really relevant, not
some thinly veiled attempt to get me to link to your site) they're never going to appear
on here. So, they're never go to appear in a search engine, never going to boost your
customer's Google page rank and never going to achieve anything in terms of Search
Engine Optimisation. Please, practice being a parasite elsewhere. Oh, and I'm confident
that my genuine readers are perfectly well endowed and enjoy a full and healthy lifestyle
without help from you. Thanks for reading.