Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial CodeTours for contributing to VS Code and Visual Studio extensions #131

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
63 changes: 63 additions & 0 deletions .tours/powershell-pro-tools-for-visual-studio.tour
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"$schema": "https://aka.ms/codetour-schema",
"title": "PowerShell Pro Tools for Visual Studio",
"steps": [
{
"title": "Overview",
"description": "PowerShell Pro Tools is a collection of extensions for Visual Studio and Visual Studio Code to enhance the PowerShell editing experience.\r\n\r\nIt includes tools that do the following:\r\n\r\n- Windows Form Designer for PowerShell\r\n- PowerShell Script Executable Packaging\r\n- Refactoring\r\n- Variable Window\r\n- Module Window"
},
{
"title": "Requirements",
"description": "### Requirements\r\n- [.NET](https://dotnet.microsoft.com/en-us/download)\r\n- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/community/)\r\n - .NET Desktop Development Workload\r\n - Visual Studio Extensibility Workload\r\n- [InvokeBuild](https://github.com/nightroman/Invoke-Build)"
},
{
"title": "Build Process",
"description": "Start Visual Studio as Administrator. Administrator access is required because the PowerShell Pro Tools build copies files into the Visual Studio directory for debugging purposes.\r\n\r\nBuild the `PowerShellTools` project to build the *Visual Studio 2019* extension and the `PowerShellTools.2022` to build the *Visual Studio 2022* and later extension."
},
{
"title": "Debugging",
"description": "Debugging can be accomplished through Visual Studio. Set the startup project to `PowerShellTools.2022` and press `F5` to launch the experimental instance and debug the extension.\r\n\r\nIf you launch Visual Studio and the extension fails to load, you may need to remove the `VS 2019` extension. If you\r\nbuilt the entire solution of the `PowerShellTools` project in *Visual Studio 2022*, then the older version of the\r\nextension was also installed in the experimental instance. This results in the extension failing to load and duplicate\r\nproject and item templates.\r\n1. Remove the 2019 extension by clicking `Extensions > Manage Extensions`.\r\n2. Uninstall `PowerShell Tools for Visual Studio`. You will need to restart the experimental instance.\r\n3. You do not need to remove `PowerShell Tools for Visual Studio 2022`."
},
{
"directory": "Build",
"description": "Contains MSBuild settings and targets files that are used in the PoshTools projects."
},
{
"directory": "Common",
"description": "Common models, interfaces and helpers for PoshTools."
},
{
"directory": "HostInjection",
"description": "Refactoring used in both the VS and VS Code extensions."
},
{
"directory": "PowerShellTools.Shared",
"description": "Contains the bulk of the Visual Studio extension. Includes the Project system, IntelliSense, debugging system and more. Shared between the VS2019 and VS2022+ extensions."
},
{
"directory": "PowerShellTools",
"description": "The base project for the VS2019 extension. Mainly references the Shared project."
},
{
"directory": "PowerShellTools.2022",
"description": "The base project for the VS2022+ extension. Mainly references the Shared project."
},
{
"directory": "PowerShellTools.MSBuild",
"description": "MSBuild targets for packaging."
},
{
"directory": "PowerShellTools.Templates.Data",
"description": "Project and file templates like modules, scripts and form projects.\r\n- PowerShellTools.Templates.Data\r\n- PowerShellTools.Templates.FormProject\r\n- PowerShellTools.Templates.Module\r\n- PowerShellTools.Templates.ModuleProject\r\n- PowerShellTools.Templates.Script\r\n- PowerShellTools.Templates.ScriptProject\r\n- PowerShellTools.Templates.Test"
},
{
"directory": "PowerShellToolsPro.Packager",
"description": "Packager library used to turn PowerShell scripts into executables."
},
{
"directory": "FormDesigner",
"description": "Form designer parsing and generation logic."
}
],
"ref": "main"
}
44 changes: 44 additions & 0 deletions .tours/powershell-pro-tools-for-vs-code.tour
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"$schema": "https://aka.ms/codetour-schema",
"title": "PowerShell Pro Tools for VS Code",
"steps": [
{
"title": "Overview",
"description": "PowerShell Pro Tools is a collection of extensions for Visual Studio and Visual Studio Code to enhance the PowerShell editing experience.\r\n\r\nIt includes tools that do the following:\r\n\r\n- Windows Form Designer for PowerShell\r\n- PowerShell Script Executable Packaging\r\n- Refactoring\r\n- Variable Window\r\n- Module Window"
},
{
"title": "Requirements",
"description": "You'll need the following installed:\r\n- [VS Code](https://code.visualstudio.com/)\r\n- [NodeJS](https://nodejs.org/en)\r\n- [.NET](https://dotnet.microsoft.com/en-us/download)\r\n- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/community/)\r\n- [InvokeBuild](https://github.com/nightroman/Invoke-Build)"
},
{
"title": "Build Process",
"description": "You can use the `./vscode/vscode.build.ps1` build script to build the extension. It will install the necessary NPM\r\npackages, build the .NET libraries and package the VSIX.\r\n```ps1\r\nSet-Location ./vscode\r\nInvoke-Build\r\n```",
"file": "vscode/vscode.build.ps1"
},
{
"title": "Debugging",
"description": "You will need to run the `./vscode/vscode.build.ps1` script once to ensure all the proper binaries are generated. Once this is done, you can open VS Code in the `./vscode/powershellprotools` directory.\r\n```ps1\r\ncode ./vscode/powershellprotools\r\n```\r\nOnce open, you can begin debugging by pressing `F5`. You can set breakpoints and step through the extension.",
"file": "vscode/vscode.build.ps1"
},
{
"directory": "vscode/powershellprotools",
"description": "### VS Code Extension\r\nThe Typescript project that integrates with Visual Studio Code. "
},
{
"directory": "HostInjection",
"description": "### VS Code Module\r\nThe .NET DLL that is loaded into the PowerShell Extension terminal. This includes the bulk of the functionality and the Named Pipe Server that accepts commands from the VS Code extension. This includes the implementation for features such as:\r\n\r\n- Refactoring\r\n- Profiling\r\n- Code Decompilation\r\n- VS Code Automation Cmdlets"
},
{
"directory": "PowerShellToolsPro.Cmdlets",
"description": "### PowerShell Pro Tools Module\r\nThis module is included with the extension and used for packaging PowerShell scripts into executables."
},
{
"directory": "WinFormDesigner",
"description": "### Windows Form Designer\r\nThe Windows Form Designer executable."
},
{
"directory": "FormDesigner",
"description": "### Windows Form Designer Library\r\nThe bulk of the form designer parsing and generation logic."
}
]
}
31 changes: 31 additions & 0 deletions PowerShellProTools.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"folders": [
{
"name": "PS Pro Tools",
"path": "..\\powershell-pro-tools"
},
],
"settings": {
"files.exclude": {
".vs/": true,
"bin/": true,
"obj/": true,
"node_modules/": false,
},
"powershell.cwd": "PS Pro Tools",
"powershell.developer.editorServicesLogLevel": "Information",
"powershell.trace.server": "messages",
"dotnet.defaultSolution": "Source/powershell-pro-tools",
"dotnet.preferCSharpExtension": false,
"xml.fileAssociations": [
{
"pattern": "**/*.csproj",
"systemId": "C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\Microsoft.Build.xsd",
// "systemId": "https://github.com/dotnet/msbuild/raw/refs/heads/main/src/MSBuild/Microsoft.Build.xsd"
}
],
"xml.codeLens.enabled": true,
"xml.format.joinContentLines": true,
"xml.trace.server": "messages",
}
}