locked
Change F1 Help Online URL RRS feed

  • Question

  • It is possible to add own content to HelpViewer of Visual Studio. If F1 Help launches HelpViewer our Help pages will be displayed correctly if F1 is presssed within our custom Editor. If F1 Help settings is changed to "Launch in Browser" F1 will open "http://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&l=en-US&k=k%28MYCUSTOMKEYWORD%29&rd=true" with my Keyword.

    Can I change the URL to open a different Help page?

    Greetings

    Monday, January 12, 2015 8:56 AM

Answers

  • Hi Thomas,

    There was a change made a release or two back that allow for registering custom namespaces/classes under the Microsoft\Help registry hive, to F1 context help for managed libraries/SDKs, but I don't think it was ever documented :-(

    After debugging through the whole F1 process, I was able to ascertain the following:

    A VendorContent value needs to be set as follows:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Help\v2.1\Catalogs\VisualStudio12
       VendorContent = 0x00000001

    and your nsamespaces/classes need to added as a key under the Partner key, with a location value set to the base URL for your help site. For example:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Help\v2.1\Partner\VSXArcanaLib
       location = "www.myhelpserver.com"

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Help\v2.1\Partner\VSXArcanaLib.Utilities
       location = "www.myhelpserver.com"

    Then, when you select something like VSXArcanaLib.Utilities.LogSomeMessage, in the code editor and hit F1, you'll send up seeing your webbrowser invoked with the following URL:

       http://www.myhelpserver.com/help?F1=VSXArcanaLib.Utilities.OutputString&locale=en-US&codeLang=csharp

    The locale and codeLang is automatically appended, and it's hard coded, so we can't change that. The code that parses the currently selected word in the code editor is pretty rudimentary, and you will need to register both "VSXArcanaLib" and "VSXArcanaLib.Utilities" here, because if your cursor is sitting on the Utilities portion of the functionname in the code editor, it'll calculate the namespace as VSXArcanaLib. Whereas, if the cursor is on the OutputString, it thinks the namespace is VSXArcanaLib.Utilities.

    Sincerely,


    Ed Dore

    • Marked as answer by Thomas Ziegler Thursday, January 22, 2015 6:59 AM
    Wednesday, January 21, 2015 9:43 PM

All replies

  • Hi Thomas,

    Please try the steps in this article:

    Create a basic help file for the Microsoft Help Viewer

    And this should be helpful too:

    The Story of Help in Visual Studio 2010


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, January 13, 2015 6:46 AM
  • Hi Thomas,

    You have a couple options here.

    If you have the help content installed and don't want to set up a site for help, just use the F1 fallback scenario described in the "F1 Support" section of the following topic:

       http://msdn.microsoft.com/en-us/library/dd627473.aspx

    Otherwise, I think you can redirect to your own site by leveraging a custom prefix also mentioned in the above topic.

    Sincerely,


    Ed Dore

    Tuesday, January 13, 2015 9:42 PM
  • The point is one customer does not want to install our custom local help. He uses Online Help for default Visual Studio Projects. If he creates our custom project he wants to open our online help after pressing F1.
    Wednesday, January 14, 2015 6:39 AM
  • Hi Thomas,

    There was a change made a release or two back that allow for registering custom namespaces/classes under the Microsoft\Help registry hive, to F1 context help for managed libraries/SDKs, but I don't think it was ever documented :-(

    After debugging through the whole F1 process, I was able to ascertain the following:

    A VendorContent value needs to be set as follows:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Help\v2.1\Catalogs\VisualStudio12
       VendorContent = 0x00000001

    and your nsamespaces/classes need to added as a key under the Partner key, with a location value set to the base URL for your help site. For example:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Help\v2.1\Partner\VSXArcanaLib
       location = "www.myhelpserver.com"

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Help\v2.1\Partner\VSXArcanaLib.Utilities
       location = "www.myhelpserver.com"

    Then, when you select something like VSXArcanaLib.Utilities.LogSomeMessage, in the code editor and hit F1, you'll send up seeing your webbrowser invoked with the following URL:

       http://www.myhelpserver.com/help?F1=VSXArcanaLib.Utilities.OutputString&locale=en-US&codeLang=csharp

    The locale and codeLang is automatically appended, and it's hard coded, so we can't change that. The code that parses the currently selected word in the code editor is pretty rudimentary, and you will need to register both "VSXArcanaLib" and "VSXArcanaLib.Utilities" here, because if your cursor is sitting on the Utilities portion of the functionname in the code editor, it'll calculate the namespace as VSXArcanaLib. Whereas, if the cursor is on the OutputString, it thinks the namespace is VSXArcanaLib.Utilities.

    Sincerely,


    Ed Dore

    • Marked as answer by Thomas Ziegler Thursday, January 22, 2015 6:59 AM
    Wednesday, January 21, 2015 9:43 PM
  • Thanks a lot. This works very well. Just what I was looking for. :)
    Thursday, January 22, 2015 7:00 AM
  • Ed,

    great answer. What is  the Partner Key? is it linked to our partner licence or is it connected to our package or to the help contents?


    http://learnerps-dotnet.blogspot.com

    Friday, March 20, 2015 12:19 PM
  • its ok I got it, its the namescpace used in the help files

    e.g.

    in the following the

    <meta name="Microsoft.Help.F1" content="MyCompany.MyAppsNameSpace.MyTopicID" />
    

    it would be

     

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Help\v2.1\Partner\MyCompany.MyAppsNameSpace



    http://learnerps-dotnet.blogspot.com

    Friday, March 20, 2015 12:23 PM
  • Hi Ed Dore,

    Is there any other way to change F1 URL, I mean other than adding Registry keys?

    I need to support F1 online help for my product in Visual studio 2015/2017. I have lots of methods and classes exist in significant number of different namespaces. With this registry entry approach I would need to create thousands of entries for each different namespace in registry , which is not a good approach/solution.

    Thanks in Advance.

    Regards,

    Ajay G

    Thursday, May 17, 2018 2:41 PM