title: How to register "custom tool" with Visual Studio 2017 or Visual Studio 2019 to make it work?
body: <p><strong>Background:</strong> We have a <a href="https://msdn.microsoft.com/en-us/library/bb166817.aspx" rel="noreferrer">custom tool</a> which takes the xml input and generates the cs output. A custom tool <a href="https://docs.microsoft.com/en-us/visualstudio/extensibility/internals/registering-single-file-generators" rel="noreferrer">needs to register</a> with the Visual studio in order to make it work with that version of visual studio. </p>
  
  <p><strong>What we have done:</strong> We have done the <a href="https://docs.microsoft.com/en-us/visualstudio/extensibility/internals/registering-single-file-generators" rel="noreferrer">custom tool registration</a> with the Visual Studio 2015 which is working fine. But now the problem is with Visual Studio 2017.</p>
  
  <p><strong>Problem:</strong> So far in my research, I found until Visual Studio 2015, VS had the direct registry entries which were allowing to register the tool but from VS 2017, Microsoft has made changes in the way how registry entries are stored (<a href="http://www.visualstudioextensibility.com/2017/07/15/about-the-new-privateregistry-bin-file-of-visual-studio-2017/" rel="noreferrer">a good read to understand changes in VS2017</a>). </p>
  
  <p>If I open up the VS 2017 and try to run the custom tool then I get the error </p>
  
  <blockquote>
    <p>Cannot find custom tool <strong>"Tool Name"</strong> on this system. </p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/fNXEQ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fNXEQ.png" alt="enter image description here"></a></p>
  
  <p>This is obvious because custom tool is not yet registered with VS 2017 to work. </p>
  
  <p>I tried to follow <a href="https://github.com/Microsoft/VSProjectSystem/blob/master/doc/overview/examine_registry.md" rel="noreferrer">this guy</a> which says to load <code>.bin</code> file in to the registries but he also says that it disables to launch the VS 2017. In order to launch VS, we have to unload hive. Research says, .bin file can be on different location based on type of VS installed (enterprise, pro etc.).</p>
  
  <p>Has anyone done this before? </p>
  
  <p>TIA</p>