For Visual Studio 2015 and 2017, the Power Query SDK can be used to create Data Connector and M query projects, as shown in the following screenshot:
With a new PQ file solution and project in Visual Studio, the M queries of a Power BI dataset can be added as separate (.pq) files, as shown in the following screenshot:
Unlike the extension for Visual Studio Code, the file extension types for Power Query projects are exclusive to (.pq). Most importantly, full M language Intellisense is supported, making it dramatically easier to find M functions relevant to specific data transformation operations. Moreover, unlike the extension for Visual Studio Code, M queries can be executed from within Visual Studio via the Power Query SDK for Visual Studio. To execute an M query in Visual Studio, such as in the preceding example, click the Start button on the toolbar (green play icon) or hit F5. You can also right-click the Power Query project (for example, AdWorks Enteprise Import) to configure properties of the M query project, such as the maximum output rows to return and whether native queries can be executed.
To install the Power Query SDK for Visual Studio, access the Visual Studio Marketplace (Tools | Extensions and Updates) and search for the name of the extension (Power Query SDK).