title: Coded UI Test Builder fails to generate code for recorded action
body: <p>I try to record the simplest Coded UI action in IE running on Windows 10 from my Visual Studio 2015 Enterprise. The problem is that recently I started to get <code>Value cannot be null. Parameter name: key</code> error each time I click <code>Add and Generate</code> button.</p>
  
  <p><a href="https://i.stack.imgur.com/TCSGf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TCSGf.png" alt="enter image description here"></a></p>
  
  <p>Also each time I hover the link on IE web page I get Access is denied error. I believe these problems could be related.</p>
  
  <p><a href="https://i.stack.imgur.com/EieTW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EieTW.png" alt="enter image description here"></a></p>
  
  <p>One more issue is that I can not generate any assertions since am unable to select any web control on web page. After I placed Coded UI Test Builder's crosshair in the middle of text input the whole document was highlighted.
  <a href="https://i.stack.imgur.com/tSihg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tSihg.png" alt="enter image description here"></a></p>
  
  <p>To fix the issue I was advised to check project references. So I included any possibly related to Coded UI reference I could find. This is the full list of references included in the project:</p>
  
  <p><a href="https://i.stack.imgur.com/T0UHD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T0UHD.png" alt="enter image description here"></a></p>
  
  <p>Except that I've already tried to:<br>
  1. Restart VS<br>
  2. Restart PC<br>
  3. Run VS and IE as administrator (related to Access is Denied issue)<br>
  4. Added new UIMap file to the project. I tried to record actions there.<br>
  5. As it was suggested in one of the comments <a href="https://social.msdn.microsoft.com/Forums/vstudio/en-US/efa0bb2e-8d1a-4213-95a7-fb521cfad97e/get-access-is-denied-while-recording-on-code-ui-test-builder?forum=vstest" rel="nofollow noreferrer">here</a> I checked browser zoom level and set it to 100%.<br>
  6. Started new solution with new CodedUI test project.<br>
  7. Started Coded UI Test Builder from Visual Studio developer command prompt as a standalone application by executing <code>codedUITestBuilder.exe /standalone</code> in command line.<br>
  8. Tried to record Coded UI test against Windows Explorer. In result I've got a lot of <code>// Access is denied.</code> comment lines.<br>
  9. Started VS in a safe mode. Test builder does not fail but in result I get <code>// The last action was not recorded because access to the application was denied.</code> and no actual steps were recorded.<br>
  10. Ran Visual Studio <strong>as administrator in a safe mode</strong> so no external plugins are influencing VS.<br>
  11. I've reinstalled Visual Studio. It didn't help.<br>
  12. <a href="https://blogs.msdn.microsoft.com/gautamg/2009/11/29/how-to-enable-tracing-for-ui-test-components/" rel="nofollow noreferrer">Enabled tracing for ui components</a> but no actual output is generated during recording. The output window of Visual Studio under <em>Testing</em> tab remains empty.<br>
  13. Checked the <code>CodedUITestBuilder.exe.config</code>. The following configuration was commented so I uncommented it: </p>
  
  <pre><code> &lt;startup useLegacyV2RuntimeActivationPolicy="true"&gt;
      &lt;supportedRuntime version="v4.0"/&gt;
    &lt;/startup&gt;
  </code></pre>
  
  <p>14. As it is suggested in one the comments <a href="https://social.msdn.microsoft.com/Forums/en-US/0d403356-623a-4f80-91ae-0c3ce0a86739/coded-ui-access-is-denied-and-uispy-cant-identify-the-buttons-control?forum=vsautotest" rel="nofollow noreferrer">here</a> I added <code>%ProgramFiles%\Internet Explorer\iexplore.exe</code> as one of the values of <code>ExcludeProcess</code> and then <code>IncludeProcess</code> sections in <code>CodedUITestBuilder.exe.config</code>. The thing is that now I actually <strong>do not see <code>Access is Denied</code> error, but still I'm not able to record any steps or move crosshair on html control</strong>.<br></p>
  
  <p>Most of the solutions in the web are to reinstall Visual Studio and if it doesn't help - reinstall Windows. This is unacceptable solution for me. <strong>How can I solve the issue without reinstalling my Visual Studio and/or Windows?</strong></p>