|
2 | 2 |
|
3 | 3 | The Azure PowerShell Developer Guide was created to help with the development and testing of Azure PowerShell cmdlets. This guide contains information on how to set up your environment, create a new project, implement cmdlets, record and run tests, and more.
|
4 | 4 |
|
5 |
| -**Note: Except for the way described in this page, There is a new way to generate PowerShell modules through AutoRest PowerShell generator. And related links are attached in the end.** |
| 5 | +**Note: Except for the way described in this page, There is a new way to generate PowerShell modules through AutoRest PowerShell generator. Refer to [Autorest PowerShell Generator](#autorest-powershell-generator).** |
6 | 6 |
|
7 | 7 | # Table of Contents
|
8 | 8 |
|
| 9 | +- [Azure PowerShell Developer Guide](#azure-powershell-developer-guide) |
| 10 | +- [Table of Contents](#table-of-contents) |
9 | 11 | - [Prerequisites](#prerequisites)
|
10 | 12 | - [Environment Setup](#environment-setup)
|
11 |
| - - [GitHub Basics](#github-basics) |
12 |
| - - [Building the Environment](#building-the-environment) |
13 |
| - - [Generating Help](#generating-help) |
14 |
| - - [Running Static Analysis](#running-static-analysis) |
15 |
| - - [Running Tests](#running-tests) |
| 13 | + - [GitHub Basics](#github-basics) |
| 14 | + - [Building the Environment](#building-the-environment) |
| 15 | + - [Generating Help](#generating-help) |
| 16 | + - [Running Static Analysis](#running-static-analysis) |
| 17 | + - [Running Tests](#running-tests) |
16 | 18 | - [Before Adding a New Project](#before-adding-a-new-project)
|
17 |
| - - [.NET SDK](#net-sdk) |
18 |
| - - [Design Review](#design-review) |
19 |
| - - [Contact](#point-of-contact) |
| 19 | + - [.NET SDK](#net-sdk) |
| 20 | + - [Design Review](#design-review) |
| 21 | + - [Point of Contact](#point-of-contact) |
20 | 22 | - [Setting Up a New Project](#setting-up-a-new-project)
|
21 |
| - - [Getting Started](#getting-started) |
22 |
| - - [Creating the Project](#creating-the-project) |
23 |
| - - [Adding Project References](#adding-project-references) |
| 23 | + - [Getting Started](#getting-started) |
| 24 | + - [Creating the Project](#creating-the-project) |
| 25 | + - [Adding Project References](#adding-project-references) |
24 | 26 | - [Creating Cmdlets](#creating-cmdlets)
|
25 |
| - - [PowerShell Cmdlet Design Guidelines](#powershell-cmdlet-design-guidelines) |
26 |
| - - [Enable Running PowerShell when Debugging](#enable-running-powershell-when-debugging) |
27 |
| - - [Importing Modules](#importing-modules) |
28 |
| - - [Adding Help Content](#adding-help-content) |
| 27 | + - [PowerShell Cmdlet Design Guidelines](#powershell-cmdlet-design-guidelines) |
| 28 | + - [Exceptions Guidelines](#exceptions-guidelines) |
| 29 | + - [Enable Running PowerShell when Debugging](#enable-running-powershell-when-debugging) |
| 30 | + - [Set a StartUp Project](#set-a-startup-project) |
| 31 | + - [Setup a Debug Profile](#setup-a-debug-profile) |
| 32 | + - [Adding Help Content](#adding-help-content) |
29 | 33 | - [Adding Tests](#adding-tests)
|
30 |
| - - [Using Azure TestFramework](#using-azure-testframework) |
31 |
| - - [Scenario Tests](#scenario-tests) |
32 |
| - - [Adding Scenario Tests](#adding-scenario-tests) |
33 |
| - - [Using Common Code](#using-common-code) |
34 |
| - - [Using Active Directory](#using-active-directory) |
35 |
| - - [Using Certificate](#using-certificate) |
36 |
| - - [AD Scenario Tests](#ad-scenario-tests) |
37 |
| - - [Recording/Running Tests](#recordingrunning-tests) |
| 34 | + - [Using Azure TestFramework](#using-azure-testframework) |
| 35 | + - [Scenario Tests](#scenario-tests) |
| 36 | + - [Adding Test Project](#adding-test-project) |
| 37 | + - [Adding Scenario Tests](#adding-scenario-tests) |
| 38 | + - [Use local files in test](#use-local-files-in-test) |
| 39 | + - [Using Active Directory](#using-active-directory) |
| 40 | + - [AD Scenario Tests](#ad-scenario-tests) |
| 41 | + - [Recording/Running Tests](#recordingrunning-tests) |
38 | 42 | - [After Development](#after-development)
|
| 43 | + - [Change Log](#change-log) |
39 | 44 | - [Misc](#misc)
|
40 |
| - - [Publish to PowerShell Gallery](#publish-to-powershell-gallery) |
41 |
| -- [Autorest PowerShell Generator](#autorest-powershell-generator) |
| 45 | + - [Publish to PowerShell Gallery](#publish-to-powershell-gallery) |
| 46 | +- [AutoRest PowerShell Generator](#autorest-powershell-generator) |
42 | 47 |
|
43 | 48 | # Prerequisites
|
44 | 49 |
|
@@ -213,6 +218,11 @@ There are a few existing projects that need to be added before developing any cm
|
213 | 218 |
|
214 | 219 | Please check out the [_Cmdlet Best Practices_](./design-guidelines/cmdlet-best-practices.md) document for more information on how to create cmdlets that follow the PowerShell guidelines.
|
215 | 220 |
|
| 221 | +## Exceptions Guidelines |
| 222 | + |
| 223 | +Azure PowerShell defines most commonly used exceptions. Developers working on Azure PowerShell should use these exceptions during development, rather than other more generic exceptions. |
| 224 | +Refer to [_Azure PowerShell Exceptions_](./design-guidelines/azure-powershell-exceptions.md) for more information on Azure PowerShell Exceptions. |
| 225 | + |
216 | 226 | ## Enable Running PowerShell when Debugging
|
217 | 227 | To import modules automatically when debug has started, follow the below steps:
|
218 | 228 | ### Set a StartUp Project
|
|
0 commit comments