Search

Incorrect XML in MFC header files causes compiler warnings by VoiceOfExperience

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 731201
Opened: 3/14/2012 10:12:26 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
Several of the MFC header files, included when building a native C++ MFC static project, have XML errors. These lead to warning messages when compiling.

The errors are I found are

Line 220 of afxtoolbarimages.h
Lines 141,148,155 of afxribbonbar.h
Line 236 of afxribboncategory.h

From the forums, there are several more. MS needs to run all the headers through the compiler or other XML checker.

Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling version

Visual Studio 2010 SP1

Steps to reproduce

Build a native C++ MFC static project which includes #stdafx.h

Product Language

English

Operating System

Windows XP

Operating System Language

English

Actual results

1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxtoolbarimages.h(217): warning C4635: XML document comment applied to 'CMFCToolBarImages.SmoothResize(System.Double)': badly-formed XML: Only one top level element is allowed in an XML document.
1>
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxribbonbar.h(139): warning C4635: XML document comment applied to 'CMFCRibbonBar.LoadFromResource(System.UInt32,System.SByte!System.Runtime.CompilerServices.IsSignUnspecifiedByte!System.Runtime.CompilerServices.IsConst*,HINSTANCE__*)': badly-formed XML: Only one top level element is allowed in an XML document.
1>
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxribbonbar.h(146): warning C4635: XML document comment applied to 'CMFCRibbonBar.LoadFromResource(System.SByte!System.Runtime.CompilerServices.IsSignUnspecifiedByte!System.Runtime.CompilerServices.IsConst*,System.SByte!System.Runtime.CompilerServices.IsSignUnspecifiedByte!System.Runtime.CompilerServices.IsConst*,HINSTANCE__*)': badly-formed XML: Only one top level element is allowed in an XML document.
1>
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxribbonbar.h(153): warning C4635: XML document comment applied to 'CMFCRibbonBar.LoadFromBuffer(System.SByte!System.Runtime.CompilerServices.IsSignUnspecifiedByte!System.Runtime.CompilerServices.IsConst*)': badly-formed XML: Only one top level element is allowed in an XML document.
1>
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxribboncategory.h(235): warning C4635: XML document comment applied to 'CMFCRibbonCategory.OnKey(System.UInt32)': badly-formed XML: The following tags were not closed: summary.

Expected results

None of these warnings.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 5/11/2012 at 11:10 AM
Hello Voice,

Thanks for the report. While a number of XML warnings had been fixed since Visual Studio 2010 was released, I did find a couple more warnings, which I have fixed for Visual Studio 11 RTM.

Pat Brenner
Visual C++ Libraries Development
Posted by Microsoft on 5/9/2012 at 11:47 PM
Thank you for submitting feedback on Visual Studio 11 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 3/14/2012 at 10:53 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.