Search code examples
visual-studiolinqpad

How can I make Visual Studio open .linq files in LinqPad.exe rather than it's own editor


I have a VS 2017 solution that contains some .LINQ scripts. When I double click those files in the solution explorer in VS I'd love to have them open in LinqPad (the default system editor) rather than a VS text editor.

Is there a way to configure VS to do this? I tried Tools->Options->Text Editor->File Extensions but none of the options there seemed like it would open something outside VS.


Solution

  • I realise this is an old question and I don't have VS2017 but just in case it is applicable, VS2019 provides this functionality. If you right-click on the .linq file in Solution Explorer and choose "Open With..." you will be presented with a dialog similar to below:

    enter image description here

    LinqPad may not be in the list. If it's not then click "Add..." and navigate to where it is installed and choose the LINQPad.exe executable. Make sure to click "Set as Default" and then click OK.

    Opening the file from Solution Explorer should now open it in LinqPad rather than Visual Studio.