Hi Chris,
Additionally, it seems that your old-syntax CLR marks PreserveSig on
properties.
I have also discussed this issue with one COM interop expert internally.
Based on the MSDN document below, PreserveSigAttribute is valid on methods
only(AttributeTargets.Method):
"PreserveSigAttribute Class"
http://msdn2.microsoft.com/en-us/lib...pservices.pres
ervesigattribute.aspx
So it is not supported for properties. In C# if you try and apply it to a
property declaration you will get a compiler error that is worded much
better(in both VS.net2003 and VS2005):
"Attribute 'PreserveSig' is not valid on this declaration type. It is valid
on 'method' declarations only."
Since the PreserveSigAttribute is not supported for properties, we are not
sure why the VC compiler allowed yoru code to compile in VS.NET 2003.
I would recommend you to provide a little sample project to give us a local
reproduce, thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.