Pergunta

I am writing a natvis file for visual studio 2012 to help customize what is displayed while debugging. I'm trying to cast a void* to a template class & I'm seeing the following error:

Fatal error: Element CDIB' is unexpected according to content model of parent element

Here is my code:

<?xml version="1.0" encoding="utf-8"?> 
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> 
<Type Name="CDIBPtr"> 
  <DisplayString>(CRefCountRep<CDIB>*)m_rep</DisplayString> 
</Type>
</AutoVisualizer>

Any ideas?

Foi útil?

Solução

Angle brackets must be escaped according to XML rules. It should be.

<?xml version="1.0" encoding="utf-8"?> 
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> 
  <Type Name="CDIBPtr"> 
    <DisplayString>(CRefCountRep&lt;CDIB&gt;*)m_rep</DisplayString> 
  </Type>
</AutoVisualizer>
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top