Tuesday, April 27, 2010

Installing Visual Studio 2010 Documentation

I chose not to install the documentation immediately after following the installation of Visual Studio 2010. I wasn't sure if I wanted to use up local disk space or rely on the online content. After a few days, I made my decision to install the help files locally.

There is a new help system with Visual Studio 2010 and a new way to install it. The Help Library Manager can be launched from Manage Help Setting under the Help menu within Visual Studio 2010.


Under settings, I found the Library location was already set to the default path of "C:\ProgramData\Microsoft\HelpLibrary" and the field was disabled.


With no way to change the path through the UI, I set out to search the web for answers. I found someone had commented on having a similar problem here:
http://blogs.msdn.com/heaths/archive/2010/02/10/how-to-install-local-help-content-after-installing-visual-studio-2010-rc.aspx

I researched more and found the unattended installation instructions here:
http://msdn.microsoft.com/en-us/library/ee225237.aspx

I posted a comment to Heath Stewart's blog before I had a chance to test the unattended commands. Now that I've had a chance to try a few things, I can say with some certainty that command line won't solve the problem. If the Library location is already set, then the /content parameter is ignored. The help files will be installed to the existing path.

Since the command line option did not work as I had hoped, I resorted to registry hacking. CTRL+F isn't much of a "hack", but it worked. I found a registry key for the Library location:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Help\v1.0]

"LocalStore"="C:\\ProgramData\\Microsoft\\HelpLibrary\\"

I tried several things, but the one most likely to succeed was:
  1. Delete the key
  2. Run the Help Library Manager
  3. Set a new path for the Library location (which recreates the key)
  4. Install help files
After deleting the registry key, Help Library Manager prompted me to set a new path for the Library location.


I set the path and selected some topics to install. I saw the source files copy to the path I specified. I watched as the files were extracted and processed. Everything was looking good until an error occurred when merging the indexes:

An error occurred while updating local content: System.ArgumentException: Supplied content path is invalid at Microsoft.Help.Index.Catalog.GetValidContentVendorPath(String contentPath, String vendorPath) at Microsoft.Help.Index.Catalog.Modify(String contentPath, String contentWorkPath, String vendorPath, CatalogModificationEntry[] modificationList) at Microsoft.Help.Index.Indexer.ModifyCatalogs(CatalogUpdateRequest[] catalogUpdateRequestList, String queryManifestFilePath) at Microsoft.Help.CacheLib.DocumentationCache.MergeCatalogs(ChangeDescription change, StatusCallback`1 statusCallback) at Microsoft.Help.CacheLib.DocumentationCache.IntegrateChange(VendorName vendorName, ChangeDescription change, StatusCallback`1 statusCallback, CertificateCheckCallback certCheckCallback) at Microsoft.Help.CacheLib.DocumentationCache.Update(VendorName vendorName, Boolean checkForOnlineUpdates, StatusCallback`1 statusCallback, CertificateCheckCallback certCheckCallback) at Microsoft.Help.CacheLib.CacheManager.<>c__DisplayClass24.b__23() at Microsoft.Help.CacheLib.AsyncOperationRunner.Run(Object state)

And that's as far as I could get after several attempts. I reset the installation path to the default location and the help files installed without error!

I'm not sure what to try next, so I may have to settle for the default path. I'd rather not waste space on my C: drive, but I'd also rather not invest more time in a what is a personal preference.

2 comments:

RokuellKent said...

I found the solution to this problem.
You must reinstall Microsoft Help Viewer.
I did this:
1. Remove folder
"C:\Program Files\Microsoft Help Viewer"
2. Remove registry key
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Help\v1.0]
3. Install Help Viewer from disk with MS Visual Studio
(from folder "WCU\Help\" run HelpSetup_x86.exe)

And after:
-Run the Help Library Manager
-Set a new path for the Library location
-Install help files

Michael B. Farias said...

Thanks RokuellKent for your solution. A link to another solution (see "Reset Local Library") was posted in a comment by Mikhail on Heath Stewart's blog in April 2010. The information in the linked article enabled me to reinstall the help files to a location of my choosing, but I neglected to post about that solution here. In any case, I hope people are finding the answers they need.