Yossi Dahan [BizTalk]


Wednesday, June 07, 2006

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.


  • 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.


    By Anonymous Anonymous, at 15/03/2007, 20:27  

  • Amazing! Your solution worked like a charm. Thanks!

    By Blogger Unknown, at 19/03/2007, 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 Blogger Unknown, at 20/04/2007, 14:45  

  • Cool! thank you very much

    By Blogger shit and stuff, at 26/06/2007, 12:42  

  • Thanks for this...saved me loads of time!

    By Anonymous Anonymous, at 04/09/2007, 14:54  

  • Thanks a lot. It worked for us also. You saved our time.

    By Blogger Naveen Garla, at 01/12/2007, 12:19  

  • Yossi,

    thanks for this. Could quite easily have spent hours trying to figure this out! :)


    By Anonymous Anonymous, at 10/03/2008, 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 Anonymous, at 26/03/2008, 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 Anonymous, at 19/05/2008, 02:13  

  • Thank!

    I'm sure tihs will be very useful to many...

    By Blogger Yossi Dahan, at 19/05/2008, 06:51  

  • This comment has been removed by a blog administrator.

    By Blogger Unknown, at 27/05/2008, 20:59  

  • I love you.

    By Anonymous Anonymous, at 30/07/2008, 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 Blogger Yossi Dahan, at 30/07/2008, 19:46  

  • I sure hope they fixed this and a few other bogus error messages biztalk 2009. Restarting visual studio is annoying.

    By Anonymous Anonymous, at 04/12/2009, 09:44  

  • Excellent!
    Thanks a bunch.

    By Anonymous Ben, at 20/05/2010, 15:51  

  • Wonderful, This is a real time saver for a mysterious error. Thank you..

    By Blogger angsram, at 28/05/2010, 15:10  

  • Hi,

    I had the same problem, and unfortunately none of the solution given here worked for me (actually closing and reopening VS worked once).
    But deleting the content of the bin directory of the project forced VS to rebuild the entire binaries and it finally worked !

    I hope it would help other people who lost valuable time like me...

    By Anonymous Anonymous, at 28/09/2010, 08:57  

  • That worked for me... starnge but did for now!

    By Anonymous Nik, at 26/05/2011, 21:32  

Post a comment

<< Home