Skip to content

Combining Microsoft Azure PowerShell Projects Design Document

Abdelrahman Elogeel edited this page May 29, 2014 · 1 revision

This wiki will go through the details of combining all Windows Azure PowerShell projects into one project.

Motivation (Why)

  • Prevent from projects explosion
  • Ease the process of adding new set of cmdlets for a new service
  • Reduce the chance to have project configuration conflicts and referencing issues
  • Reduce build time and signing efforts
  • Centralize code and prevent from code duplication
  • Align with Windows PowerShell cmdlets design (they ship all management cmdlets in one assembly Microsoft.PowerShell.Commands.Management.dll)

Goals (What)

Deliver Windows Azure PowerShell cmdlets in one assembly.

Design Elements (How)

Assembly name

Inspired by the Windows PowerShell assembly name and Windows Azure namespace convention we suggest

Microsoft.WindowsAzure.Commands.Management

Alternative names could be

  • Microsoft.WindowsAzure.Management
  • Microsoft.WindowsAzure
  • Microsoft.WindowsAzure.PowerShell.Management
  • Microsoft.WindowsAzure.PowerShell

Project Structure

Assuming we picked a name from the above list let's shorten it with WAPS

Common code placement

The common code and general utilities can be centralized at this namespace

WAPS.Common

Alternative names could be

  • WAPS.Core
  • WAPS.Model
  • WAPS.Utilities

Services Production Project

Let's take as an example the existing project Management.ServiceBus.csproj, in the new design it should be divided as follows

Service Name

Each service must have unique name, for example this project can has ServiceBus as it's unique name.

Cmdlets namespace

WAPS.ServiceBus.Commands

Channel code/service specified utilities

WAPS.ServiceBus.X

Where X equals to the common code namespace postfix

Unit Test Project

There will be one central project for all unit tests with the namespace

WAPS.Test

Note that the test class namespace must match the production code namespace and folder structure

Scenario Test Project

The existing scenario test project is already in a good shape we'll need to rename it's namespace based on the namespace we chosen above. The final namespace would look like this:

WAPS.ScenarioTest