Here was a strange one that took me a while to nail down. First, the error messages:
The keyword new is required on ‘Microsoft.Samples.BizTalk.SendMail.ReceivePortType.ReceiveMessage’ because it hides inherited member ‘Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.ReceiveMessage(int, Microsoft.XLANGs.Core.Envelope, Microsoft.XLANGs.BaseTypes.XLANGMessage, Microsoft.XLANGs.Core.Correlation, Microsoft.XLANGs.Core.Context, Microsoft.XLANGs.Core.Segment)’
‘Microsoft.Samples.BizTalk.SendMail.ReceiveSend.ReceivePort’ denotes a ‘field’ where a ‘class’ was expectedStatic member ‘Microsoft.Samples.BizTalk.SendMail.ReceivePortType.ReceiveMessage’ cannot be accessed with an instance reference; qualify it with a type name instead‘Microsoft.Samples.BizTalk.SendMail.ReceivePortType.ReceiveMessage’ denotes a ‘field’ where a ‘method’ was expected
After searching for a few hours on the Internet for that one and playing around with recent changes I had made I finally had realized what I did: I was getting a little too creative for my own good (or not creative enough, perhaps).
I decided that Operation_1 and Operation_2 were not good names for my receive and send ports so I decided to name them something else. Of course, in a burst of creativness I used ‘ReceiveMessage’ and ‘SendMessage’ for the names. I had done that a while back but apparently never did a build as I made several other changes since. Then I compiled and got the errors above on the receive port.
Figuring it had something to do with the ports I decided to just nuke them and recreate them. I used my usual internal justification that Microsoft’s software had somehow screwed up my code (uh … it never turns out that way). After doing this everything compiled just fine once again. Ah Ha! It was Microsoft screwing up my code! Then I immediately went and renamed the ports once again to my ever-so-creative names and boom.
Moral: Either get very creative with your naming or have a complete lack of creativness altogether. Don’t sit in the middle.