Strange Visual Studio behaviour
I hate it when a tool I use behaves in ways I don't understand, and even more so when it is so inconsistent, but I have had a strange error with VS.net 2005 recently which has all the indication of being a bug.
Then again - it might just be me doing something wrong...
I have an orchestration with a multi-part message.
One of the parts of that message is of type System.String. (The other is a schema)
Sometimes, when I try to build my project I get the following compile time error -
"'System.String' must be Xml serializable to be a message part type -- check event log for more information"
Despite what the error says - there's no further information in the event log as it suggests
Now - what stuck me as very strange is that last time I checked System.String was serialisable, and besides - I've definitely used System.String parts before and it worked just fine.
More then that - I also consume a third party's web service who's taking in a string as a parameter. adding a web reference to that Web Service generates the web messages for me with a System.String part that works just fine, so it's quite clear the problem is not with having a System.String part.
Anyway - After a couple of hours of chasing my tale around this I did the only sensible thing to do - I restarted visual studio.
The problem was gone. at least for a while, I've been able to compile it and run for a while before it came back again.
Restarting VS.net solved it everytime. Great!
BTW - This had happened for us on several machines, all of them built by hand, using RTM version of VS.net and BizTalk 2006.
Then again - it might just be me doing something wrong...
I have an orchestration with a multi-part message.
One of the parts of that message is of type System.String. (The other is a schema)
Sometimes, when I try to build my project I get the following compile time error -
"'System.String' must be Xml serializable to be a message part type -- check event log for more information"
Despite what the error says - there's no further information in the event log as it suggests
Now - what stuck me as very strange is that last time I checked System.String was serialisable, and besides - I've definitely used System.String parts before and it worked just fine.
More then that - I also consume a third party's web service who's taking in a string as a parameter. adding a web reference to that Web Service generates the web messages for me with a System.String part that works just fine, so it's quite clear the problem is not with having a System.String part.
Anyway - After a couple of hours of chasing my tale around this I did the only sensible thing to do - I restarted visual studio.
The problem was gone. at least for a while, I've been able to compile it and run for a while before it came back again.
Restarting VS.net solved it everytime. Great!
BTW - This had happened for us on several machines, all of them built by hand, using RTM version of VS.net and BizTalk 2006.

13 Comments:
Thanks for putting this up on your blog... i to spent over 30 mins until i found this post. It seemed to fix thie issue... for now!
If anyone knows why this happens let us know.
thanks
By
Anonymous, at 15/03/07 20:27
Amazing! Your solution worked like a charm. Thanks!
By
Eugene Rosenfeld, at 19/03/07 15:13
I want very much to thank you for putting this out there. This made for what is probably the shortest period of time spent troubleshooting some BizTalk/Visual Studio weirdness I've had -- and that was about a half hour!
By
Joe, at 20/04/07 14:45
Cool! thank you very much
By
yairz, at 26/06/07 12:42
Thanks for this...saved me loads of time!
By
Anonymous, at 04/09/07 14:54
Thanks a lot. It worked for us also. You saved our time.
By
Naveen Garla, at 01/12/07 12:19
Yossi,
thanks for this. Could quite easily have spent hours trying to figure this out! :)
Tarun
By
Anonymous, at 10/03/08 18:51
I found the behaviour very strange when I add a extenal dll with schemas without targetnamespace. Once I remove that DLL I am able to compile.
By
Anonymous, at 26/03/08 19:17
Hi Yossi,
I found the same issue (and closing VSS worked). But then I later experienced the error EVERY time that I opened the solution. This happened when I was refactoring project names and namespaces. The error said "'System.String' must be Xml serializable to be a message part type -- check event log for more information"
So I looked into the event log details and at the bottom it said "Strong name validation failed." So I double checked my orchestration's Biztalk project settings, and found that I must have accidentally set "Assembly Delay Sign" property set to TRUE! I changed it to false and the problem was solved. I hope that this post may help other people (and save countless of hours of frustration).
By
Anonymous, at 19/05/08 02:13
Thank!
I'm sure tihs will be very useful to many...
By
Yossi Dahan, at 19/05/08 06:51
This post has been removed by a blog administrator.
By
srini, at 27/05/08 20:59
I love you.
By
Anonymous, at 30/07/08 17:20
now..now..we don't want to get my wife jelous!
I'm assuming you are saying you found this very useful, in which case - thanks for leaving a comment!
:-)
By
Yossi Dahan, at 30/07/08 19:46
Post a Comment
<< Home