title: VISUAL STUDIO 2010 DataSet Visualizer issue Cannot evaluate expression
body: <p>I am using VS-10. I was debugging my code the DataSet Visualizer in Debug mode stopped working and I am getting the below error.</p>
  
  <p><em>IMPORTANT</em> : If I remove <strong>Test</strong> function call it work correctly.</p>
  
  <ul>
  <li>Asp.Net c# web site project in debug mode.</li>
  <li>%temp% deleted</li>
  <li>clean solution &amp; rebuild</li>
  </ul>
  
  <p>CODE</p>
  
  <hr>
  
  <pre><code>protected void Button1_Click(object sender, EventArgs e)
  {
      DataSet ds = new DataSet();
      DataTable dt = new DataTable("TEST");
      DataColumn dc = new DataColumn("Name", Type.GetType("System.String"));
      dt.Columns.Add(dc);
  
      DataRow dr = dt.NewRow();
      dr["Name"] = "MH";
      dt.Rows.Add(dr);
  
      ds.Tables.Add(dt);
  
  
  
  
      int x = 0;
      Test(null,
                      Guid.Empty,
                      Guid.Empty,
                      Guid.Empty,
                      Guid.Empty,
                      null,
                      0,
                      0,
                      Guid.Empty,
                      null,
                      null,
                      0,
                      0,
                      Guid.Empty);
  
  }
  
  public static Guid? Test(Guid? OID, Guid a, Guid b, Guid c, Guid? d, Guid? e, decimal f, decimal g, Guid h, decimal? j, Guid? k, decimal? l, decimal? s, Guid? kk)
  {
      return Guid.Empty;
  
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/86Aba.png" alt="enter image description here"></p>
  
  <p>Error Output</p>
  
  <hr>
  
  <pre><code>See the end of this message for details on invoking 
  just-in-time (JIT) debugging instead of this dialog box.
  
  ************** Exception Text **************
  System.Exception: Cannot evaluate expression because a thread is stopped at a point where garbage collection is impossible, possibly because the code is optimized.
   at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.PrivateCallback.MaybeDeserializeAndThrowException(Byte[] data)
  at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.ManagedShim.DelegatedHost.CreateViewer(IntPtr hwnd, HostServicesHelper hsh, SafeProxyWrapper proxy)
  
  
  ************** Loaded Assemblies **************
  mscorlib
  Assembly Version: 4.0.0.0
  Win32 Version: 4.0.30319.34014 built by: FX45W81RTMGDR
  CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
  ----------------------------------------
  Microsoft.VisualStudio.Platform.AppDomainManager
  Assembly Version: 10.0.0.0
  Win32 Version: 10.0.30319.1
  CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Platform.AppDomainManager/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Platform.AppDomainManager.dll
  ----------------------------------------
  System
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.34239 built by: FX452RTMGDR
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
  ----------------------------------------
  System.Configuration
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
  ----------------------------------------
  System.Xml
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.34230 built by: FX452RTMGDR
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
  ----------------------------------------
  System.Windows.Forms
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
  ----------------------------------------
  System.Drawing
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
  ----------------------------------------
  Microsoft.VisualStudio.DebuggerVisualizers
      Assembly Version: 10.0.0.0
      Win32 Version: 10.0.30319.1
      CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.DebuggerVisualizers/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.DebuggerVisualizers.dll
  ----------------------------------------
  
  ************** JIT Debugging **************
  To enable just-in-time (JIT) debugging, the .config file for this
  application or computer (machine.config) must have the
  jitDebugging value set in the system.windows.forms section.
  The application must also be compiled with debugging
  enabled.
  
  For example:
  
  &lt;configuration&gt;
      &lt;system.windows.forms jitDebugging="true" /&gt;
  &lt;/configuration&gt;
  
  When JIT debugging is enabled, any unhandled exception
  will be sent to the JIT debugger registered on the computer
  rather than be handled by this dialog box.
  </code></pre>
  
  <p>WEBCONFIG</p>
  
  <hr>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!-- 
  Note: As an alternative to hand editing this file you can use the 
  web admin tool to configure settings for your application. Use
  the Website-&gt;Asp.Net Configuration option in Visual Studio.
  A full list of settings and comments can be found in 
  machine.config.comments usually located in 
  \Windows\Microsoft.Net\Framework\v2.x\Config 
  --&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"&gt;
        &lt;sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"&gt;
          &lt;section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/&gt;
          &lt;sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"&gt;
            &lt;section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/&gt;
            &lt;section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/&gt;
            &lt;section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/&gt;
            &lt;section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/&gt;
          &lt;/sectionGroup&gt;
        &lt;/sectionGroup&gt;
      &lt;/sectionGroup&gt;
    &lt;/configSections&gt;
    &lt;appSettings&gt;
      &lt;add key="Telerik.ScriptManager.TelerikCdn" value="Disabled"/&gt;
      &lt;add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled"/&gt;
    &lt;/appSettings&gt;
    &lt;connectionStrings/&gt;
    &lt;system.web&gt;
      &lt;!-- 
        Set compilation debug="true" to insert debugging 
        symbols into the compiled page. Because this 
        affects performance, set this value to true only 
        during development.
      --&gt;
      &lt;compilation debug="true"&gt;
        &lt;assemblies&gt;
          &lt;add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
          &lt;add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
          &lt;add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
          &lt;add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
        &lt;/assemblies&gt;
      &lt;/compilation&gt;
      &lt;pages&gt;
        &lt;controls&gt;
          &lt;add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
          &lt;add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
          &lt;add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/&gt;
        &lt;/controls&gt;
      &lt;/pages&gt;
      &lt;!--
        The &lt;authentication&gt; section enables configuration 
        of the security authentication mode used by 
        ASP.NET to identify an incoming user. 
      --&gt;
      &lt;authentication mode="Windows"/&gt;
      &lt;!--
        The &lt;customErrors&gt; section enables configuration 
        of what to do if/when an unhandled error occurs 
        during the execution of a request. Specifically, 
        it enables developers to configure html error pages 
        to be displayed in place of a error stack trace.
  
      &lt;customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"&gt;
        &lt;error statusCode="403" redirect="NoAccess.htm" /&gt;
        &lt;error statusCode="404" redirect="FileNotFound.htm" /&gt;
      &lt;/customErrors&gt;
      --&gt;
      &lt;httpHandlers&gt;
        &lt;remove verb="*" path="*.asmx"/&gt;
        &lt;add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
        &lt;add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
        &lt;add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/&gt;
        &lt;add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false"/&gt;
        &lt;add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/&gt;
        &lt;add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/&gt;
        &lt;add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/&gt;
        &lt;add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/&gt;
      &lt;/httpHandlers&gt;
      &lt;httpModules&gt;
        &lt;add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
        &lt;add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule"/&gt;
        &lt;add name="RadCompression" type="Telerik.Web.UI.RadCompression"/&gt;
      &lt;/httpModules&gt;
    &lt;/system.web&gt;
    &lt;system.codedom&gt;
      &lt;compilers&gt;
        &lt;compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"&gt;
          &lt;providerOption name="CompilerVersion" value="v3.5"/&gt;
          &lt;providerOption name="WarnAsError" value="false"/&gt;
        &lt;/compiler&gt;
        &lt;compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"&gt;
          &lt;providerOption name="CompilerVersion" value="v3.5"/&gt;
          &lt;providerOption name="OptionInfer" value="true"/&gt;
          &lt;providerOption name="WarnAsError" value="false"/&gt;
        &lt;/compiler&gt;
      &lt;/compilers&gt;
    &lt;/system.codedom&gt;
    &lt;!-- 
          The system.webServer section is required for running ASP.NET AJAX under Internet
          Information Services 7.0.  It is not necessary for previous version of IIS.
      --&gt;
    &lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="false"/&gt;
      &lt;modules&gt;
        &lt;remove name="ScriptModule"/&gt;
        &lt;add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
        &lt;remove name="RadUploadModule"/&gt;
        &lt;add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode,runtimeVersionv2.0"/&gt;
        &lt;remove name="RadCompression"/&gt;
        &lt;add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode,runtimeVersionv2.0"/&gt;
      &lt;/modules&gt;
      &lt;handlers&gt;
        &lt;remove name="WebServiceHandlerFactory-Integrated"/&gt;
        &lt;remove name="ScriptHandlerFactory"/&gt;
        &lt;remove name="ScriptHandlerFactoryAppServices"/&gt;
        &lt;remove name="ScriptResource"/&gt;
        &lt;add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
        &lt;add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
        &lt;add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
        &lt;remove name="ChartImage_axd"/&gt;
        &lt;add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/&gt;
        &lt;remove name="Telerik_Web_UI_SpellCheckHandler_axd"/&gt;
        &lt;add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/&gt;
        &lt;remove name="Telerik_Web_UI_DialogHandler_aspx"/&gt;
        &lt;add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/&gt;
        &lt;remove name="Telerik_RadUploadProgressHandler_ashx"/&gt;
        &lt;add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/&gt;
        &lt;remove name="Telerik_Web_UI_WebResource_axd"/&gt;
        &lt;add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/&gt;
      &lt;/handlers&gt;
    &lt;/system.webServer&gt;
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
  &lt;/configuration&gt;
  </code></pre>