title: Visual Studio 2012 RC Throwing Exception When trying to use IntelliTrace with Call Information in a Migrated Project
body: <p>I installed Visual Studio 2012 Ultimate RC this morning after learning about IntelliTrace at TechEd last week.  We currently use VS 2010 Professional, so using the 2012 RC was my only easy option for testing out IntelliTrace.</p>
  
  <p>I opened up VS 2012 Ultimate RC and opened a MVC 3 project that was written in VS 2010.  IntelliTrace runs fine if I have it set to "IntelliTrace events only".  If I set it to "IntelliTrace events and call information" however, I get an exception when starting the debugger: </p>
  
  <pre><code>System.Reflection.TargetInvocationException was unhandled
  HResult=-2146232828
  Message=Exception has been thrown by the target of an invocation.
  Source=mscorlib
  StackTrace:
     at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
     at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
     at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
     at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
     at System.Web.HttpApplication.InvokeMethodWithAssert(MethodInfo method, Int32 paramCount, Object eventSource, EventArgs eventArgs)
     at System.Web.HttpApplication.ProcessSpecialRequest(HttpContext context, MethodInfo method, Int32 paramCount, Object eventSource, EventArgs eventArgs, HttpSessionState session)
     at System.Web.HttpApplicationFactory.FireApplicationOnStart(HttpContext context)
     at System.Web.HttpApplicationFactory.EnsureAppStartCalled(HttpContext context)
     at System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)
     at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
     at System.Web.HttpRuntime.ProcessRequestNow(HttpWorkerRequest wr)
     at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
     at System.Web.HttpRuntime.ProcessRequest(HttpWorkerRequest wr)
     at Microsoft.VisualStudio.WebHost.Request.Process()
     at Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Connection conn)
     at Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Connection conn)
     at Microsoft.VisualStudio.WebHost.Server.OnSocketAccept(Object acceptedSocket)
     at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
     at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
     at System.Threading.ThreadPoolWorkQueue.Dispatch()
     at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
  InnerException: System.AccessViolationException
     HResult=-2147467261
     Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
     StackTrace:
     InnerException: 
  </code></pre>
  
  <p>The problem seems to be somewhere in the function entry to Microsoft.VisualStudio.WebHost.Server.OnSocketAccept.  I have no idea what this is though.</p>
  
  <p>I played around some and found that:</p>
  
  <ul>
  <li>The problem doesn't occur if I open a web forms project that was created in VS 2010.</li>
  <li>The problem doesn't occur if I create a new MVC 3 project in VS 2012 RC.</li>
  <li>The problem only occurs if I open a MVC 3 project that was created in VS 2010.</li>
  </ul>
  
  <p>I'm stumped as to how to try and fix this other than creating a new project in VS 2012 RC and copying all of the code over, which I'd rather not do for every project we have.  It could be a bug in VS 2012 RC, I don't know.  I'll also note that I'm also getting an error saying "Cannot find or open the PDB file" that appears with the last event in the IntelliTrace output, but not sure if it's connected.  Any help would be awesome.</p>