title: NuGet: Error HRESULT E_FAIL has been returned from a call to a COM component
body: <p>When I try to add a new package with NuGet I get the error </p>
  
  <blockquote>
    <p>Error HRESULT E_FAIL has been returned from a call to a COM component. </p>
  </blockquote>
  
  <p>I've checked several posts about this and tried alot of solutions but can't seem to find the issue. It might be worthing noting that I moved and renamed my project at some point and the copy I left behind still functions with NuGet packages.</p>
  
  <p>After looking into it some more I found this error:</p>
  
  <blockquote>
    <p>System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
       at EnvDTE.SourceControl.CheckOutItem(String ItemName)</p>
  </blockquote>
  
  <p>What I've tried already:</p>
  
  <ul>
  <li><p>Deleting the <strong>user.csproj</strong> and/or <strong>.suo</strong></p></li>
  <li><p>Checking all project references and if they are located correctly</p></li>
  <li><p>Deleting Temp files</p></li>
  <li><p>Deleting bin &amp; obj folders</p></li>
  <li><p>Deleting the ProjectTemplatesCache</p></li>
  <li><p>Checking the project web properties</p></li>
  <li><p>Restarting VS, cleaning and rebuilding the project (always run in
  admin).</p></li>
  <li><p>Deleting the ComponentModelCache</p></li>
  <li><p>Deleting packages folder content and restoring NuGet packages in
  solution.</p></li>
  <li><p>Check-in all pending changes to version control before attempting to
  add a new NuGet package.</p></li>
  </ul>