std::string::npos LNK2001 in VS2010 when inheriting a dll class from std::string

Posted on Jan 11, 2011

The following two posts are discussing how to deal with a link error you see when you try to export a string class inherited from std::string. In the second post, some workarounds are also suggested.

  1. http://social.msdn.microsoft.com/Forums/en/vcpluslanguage/thread/4238e162-21d2-46f6-a8f1-e1191cf1b200 → This page suddenly disappeared. I attached here its cache from Google.
  2. https://connect.microsoft.com/VisualStudio/feedback/details/562448/std-string-npos-lnk2001-when-inheriting-a-dll-class-from-std-string?wa=wsignin1.0

If those workarounds do not work for you, you can try to link your binary to old libraries. Open the General Property Page of the project and set Platform Toolset to v90, instead of v100. → This works only if you installed Visual Studio 2008 as well.

I did some more experiments and found that the order of header files in the include statements do something with this. Sometimes the error disappears by just rearranging the order of headers. If it doesn’t work, try turning off the precompiled header option in the library exporting the string class.

Back up Encrypting File System (EFS) certificate

Posted on Jan 11, 2011

To back up your EFS certificate

  1. Open Certificate Manager by clicking the Start button Picture of the Start button Picture of the Start button, typing certmgr.msc into the Search box, and then pressing ENTER.‌
  2. Click the arrow next to the Personal folder to expand it.
  3. Click Certificates.
  4. Click the certificate that lists Encrypting File System under Intended Purposes. (You might need to scroll to the right to see this.)
    If there is more than one EFS certificate, you should back up all of them.
  5. Click the Action menu, point to All Tasks, and then click Export.
  6. In the Export wizard, click Next, click Yes, export the private key, and then click Next.
  7. Click Personal Information Exchange, and then click Next.
  8. Type the password you want to use, confirm it, and then click Next.
  9. The export process will create a file to store the certificate.
    Enter a name for the file and the location (include the whole path) or click Browse and navigate to the location, and then enter the file name.
  10. Click Finish.

Continue…

Uninstalling Visual Studio 2010

Posted on Jan 11, 2011

From MSDN: http://msdn.microsoft.com/en-us/library/e2h7fzkw%28VS.100%29.aspx#uninstalling

To uninstall Visual Studio 2010

To uninstall Visual Studio, download and run the Microsoft Visual Studio 2010 Uninstall Utility (or download from this page). By default, this removes Visual Studio and supporting components, but does not remove components that are shared with other applications on the computer. To also remove shared components, run the uninstall utility with the /full switch. To also remove the .NET Framework 4, use the netfx switch. Uninstalling shared components or .NET Framework 4 may break earlier versions of Visual Studio or other applications that depend on.

If you cannot uninstall Visual Studio by using the uninstall utility, you can perform a manual uninstall by removing Visual Studio and then removing related components.

Continue…