I have the following error when I try accessing the Shape of a Feature in a console application when using a QueryFilter with SubFields. I am using ArcObjects SDK v10.3 and Visual Studio Express 2012.
The element '{http://schemas.microsoft.com/windows/2005/02/color/WcsCommonProfileTypes}Text' is used but not declared in DTD/schema.
The thread '<No Name>' (0x12f8) has exited with code 0 (0x0).
The Exception is thrown when I do IGeometry geometry = feature.Shape; in the following code.
However if I comment the line where I declare queryFilter.SubFields = "CD_CS_FRA, NOM_OFFCL_CS_FRA"; there is no error.
Edit: Using the debugger I can see this:

<SPAN class="keyword token">using</SPAN> System<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">using</SPAN> System<SPAN class="punctuation token">.</SPAN>Collections<SPAN class="punctuation token">.</SPAN>Generic<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">using</SPAN> System<SPAN class="punctuation token">.</SPAN>Text<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">using</SPAN> ESRI<SPAN class="punctuation token">.</SPAN>ArcGIS<SPAN class="punctuation token">.</SPAN>ADF<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">using</SPAN> ESRI<SPAN class="punctuation token">.</SPAN>ArcGIS<SPAN class="punctuation token">.</SPAN>Geodatabase<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">using</SPAN> ESRI<SPAN class="punctuation token">.</SPAN>ArcGIS<SPAN class="punctuation token">.</SPAN>Geometry<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">using</SPAN> ESRI<SPAN class="punctuation token">.</SPAN>ArcGIS<SPAN class="punctuation token">.</SPAN>esriSystem<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">namespace</SPAN> DesktopConsoleApplication1
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">class</SPAN> <SPAN class="token class-name">Program</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">private</SPAN> <SPAN class="keyword token">static</SPAN> LicenseInitializer m_AOLicenseInitializer <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">DesktopConsoleApplication1<SPAN class="punctuation token">.</SPAN>LicenseInitializer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">[</SPAN><SPAN class="token function">STAThread</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">]</SPAN>
<SPAN class="keyword token">static</SPAN> <SPAN class="keyword token">void</SPAN> <SPAN class="token function">Main</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">string</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN> args<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">//ESRI License Initializer generated code.</SPAN>
m_AOLicenseInitializer<SPAN class="punctuation token">.</SPAN><SPAN class="token function">InitializeApplication</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">esriLicenseProductCode</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="punctuation token">{</SPAN> esriLicenseProductCode<SPAN class="punctuation token">.</SPAN>esriLicenseProductCodeStandard <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">esriLicenseExtensionCode</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//ESRI License Initializer generated code.</SPAN>
<SPAN class="comment token">//Do not make any call to ArcObjects after ShutDownApplication()</SPAN>
IWorkspace gdbWorkspace <SPAN class="operator token">=</SPAN> <SPAN class="token function">FileGdbWorkspaceFromPath</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">@"\\vnageop1\geod\Maxime\test.gdb"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
IFeatureWorkspace featureWorkspace <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN>IFeatureWorkspace<SPAN class="punctuation token">)</SPAN>gdbWorkspace<SPAN class="punctuation token">;</SPAN>
IFeatureClass featureClass <SPAN class="operator token">=</SPAN> featureWorkspace<SPAN class="punctuation token">.</SPAN><SPAN class="token function">OpenFeatureClass</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"GEO09E01_CS_FRA_GEN"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
IQueryFilter queryFilter <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">QueryFilterClass</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
queryFilter<SPAN class="punctuation token">.</SPAN>SubFields <SPAN class="operator token">=</SPAN> <SPAN class="string token">"CD_CS_FRA, NOM_OFFCL_CS_FRA"</SPAN><SPAN class="punctuation token">;</SPAN>
queryFilter<SPAN class="punctuation token">.</SPAN>WhereClause <SPAN class="operator token">=</SPAN> <SPAN class="string token">"CD_CS_FRA = '711000'"</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">using</SPAN> <SPAN class="punctuation token">(</SPAN>ComReleaser comReleaser <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">ComReleaser</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
IFeatureCursor cursor <SPAN class="operator token">=</SPAN> featureClass<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Search</SPAN><SPAN class="punctuation token">(</SPAN>queryFilter<SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">false</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
comReleaser<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ManageLifetime</SPAN><SPAN class="punctuation token">(</SPAN>cursor<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
IFeature feature <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">while</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN>feature <SPAN class="operator token">=</SPAN> cursor<SPAN class="punctuation token">.</SPAN><SPAN class="token function">NextFeature</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">!=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">//this line below throw the Exception</SPAN>
IGeometry geometry <SPAN class="operator token">=</SPAN> feature<SPAN class="punctuation token">.</SPAN>Shape<SPAN class="punctuation token">;</SPAN>
String cdCs <SPAN class="operator token">=</SPAN> Convert<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ToString</SPAN><SPAN class="punctuation token">(</SPAN>feature<SPAN class="punctuation token">.</SPAN>Value<SPAN class="punctuation token">[</SPAN>cdCsIdx<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
String nom <SPAN class="operator token">=</SPAN> Convert<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ToString</SPAN><SPAN class="punctuation token">(</SPAN>feature<SPAN class="punctuation token">.</SPAN>Value<SPAN class="punctuation token">[</SPAN>nomIdx<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Console<SPAN class="punctuation token">.</SPAN><SPAN class="token function">WriteLine</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"{0} - {1}"</SPAN><SPAN class="punctuation token">,</SPAN> cdCs<SPAN class="punctuation token">,</SPAN> nom<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
Console<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ReadLine</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
m_AOLicenseInitializer<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ShutdownApplication</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">public</SPAN> <SPAN class="keyword token">static</SPAN> IWorkspace <SPAN class="token function">FileGdbWorkspaceFromPath</SPAN><SPAN class="punctuation token">(</SPAN>String path<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
Type factoryType <SPAN class="operator token">=</SPAN> Type<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetTypeFromProgID</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"esriDataSourcesGDB.FileGDBWorkspaceFactory"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
IWorkspaceFactory workspaceFactory <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN>IWorkspaceFactory<SPAN class="punctuation token">)</SPAN>Activator<SPAN class="punctuation token">.</SPAN><SPAN class="token function">CreateInstance</SPAN><SPAN class="punctuation token">(</SPAN>factoryType<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">return</SPAN> workspaceFactory<SPAN class="punctuation token">.</SPAN><SPAN class="token function">OpenFromFile</SPAN><SPAN class="punctuation token">(</SPAN>path<SPAN class="punctuation token">,</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>