title: EntryPointNotFoundException in advapi32.dll while starting application
body: <p>I developing WPF application in Visual Studio 2013 Update 5 on windows 7 x64 SP1. After starting program download xml-file over http and parse it. All worked fine until today, and problem is that exception begin occurring suddenly, no significant changes were made in project, no new references were added.  </p>
  
  <p>Now while starting program throws <code>System.Windows.Markup.XamlParseException</code> with message <em>"The method or operation is not implemented"</em> and it occurs even before <code>InitializeComponent()</code> so no one line of <em>my</em> code executed. Then I looked into <em>IntelliTrace</em> window in Visual Studio and found a chain of exceptions, top of them is <code>System.EntryPointNotFoundException</code> with message <em>"Unable to find an entry point named 'EventSetInformation' in DLL 'advapi32.dll'"</em>.  </p>
  
  <p>Searching give me <a href="https://stackoverflow.com/questions/29908048/excel-interop-creating-instance-with-task-run-results-in-exception-system-entry">this</a> and <a href="https://github.com/dotnet/coreclr/issues/974" rel="nofollow noreferrer">this</a> talking that <code>EventSetInformation</code> is windows 8+ only. So windows 7 missing this method and here is exception, but how could my program reference this method while it (program) is not related to windows 8, <strong>not a bit</strong>?
  I can also assume that there is some Update-5-related components inside Visual Studio that can trigger this advapi32 method, but if so - how can I disable this feature?  </p>
  
  <p><strong>Edit</strong><br>
  Program using .NET 4.5</p>
  
  <p>Exception info:</p>
  
  <pre><code>System.Windows.Markup.XamlParseException occurred
  Message=The method or operation is not implemented.
  Source=PresentationFramework
  StackTrace:
     in System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
  </code></pre>
  
  <p><strong>Edit2</strong><br>
  As Steve and Hans noticed in comments, actual problem finally wasn't related to <em>advapi32</em> library. I had a <code>WindowEx</code> class derived from <code>Window</code> with some custom stuff, and my visual window was derived from this <code>WindowEx</code>. Maybe my custom class missed some method (if to believe exception message), but after switching base class back to <code>Window</code> and putting custom logic from <code>WindowEx</code> directly to visual window, error was gone.</p>