title: Exception while initializing EnsureCoreWebView2Async(null) in WebView2
body: <p>I am integrating Browser into my software. It is working when I keep on opening new browser tabs but as soon as I close one tab and try to open new one it produces an exception in following code.</p>
  <pre><code>public async Task InitCore()
  {
      try
      {
          // Initialization.
          await webView.EnsureCoreWebView2Async(null);
          // This line gives exception if I close a tab and reopen as it gives exception in Initialization.
      }
      catch (Exception ex)
      {
           Enumerations.WriteToLog(Enumerations.LogType.Misc, &quot;Browser.InitCore &quot; + ex.ToString());
      }
  }
  
  // Subscribing events.
  private void AfterCoreReady(object sender,EventArgs e)
  {
      label1.Visible = false;
      this.webView.CoreWebView2.ContentLoading += webView_ContentLoading;
      this.webView.CoreWebView2.NewWindowRequested += webView_NewWindowRequested;
  }
  
  </code></pre>
  <p>Following exception occurs while re-initialization after closing a tab:</p>
  <pre><code>CustomWebView2.OnEnter System.Runtime.InteropServices.COMException (0x8007139F): 
  The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F)
     at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
     at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
     at Microsoft.Web.WebView2.Core.CoreWebView2Environment.&lt;CreateCoreWebView2ControllerAsync&gt;d__17.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.Web.WebView2.WinForms.WebView2.&lt;InitCoreWebView2Async&gt;d__4.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
     at ProChart.Controls.Browser.&lt;InitCore&gt;d__16.MoveNext() in
     Browser.cs:line 98
  </code></pre>