RSS Amplifier

ASP.NET Zero Blog · Jun 30, 2026

Introducing Power Tools as a Global .NET Tool

0
Sign in to vote or save

Volosoft · Volosoft

ASP.NET Zero Power Tools is getting a upgrade. The RAD experience is no longer limited to a desktop extension or a headless command-line flow. The new Power Tools can be installed as a global .NET tool, launches its own Web UI, and provides a more visible, configurable, and automation-friendly code generation workflow.

This post walks through the new experience end to end: installation, project setup, the Web UI, batch entity generation, Card View, Offcanvas create/edit, cascade lookup selection, the entity relationship visualizer, template customization, database import, and the new workflow system for running commands before or after code generation.

New Global .NET Tool with Web UI

The new Power Tools is packaged as a .NET global tool. The NuGet package name is AspNetZero.PowerTools, and the command name is aspnetzero-powertools.

This brings several advantages:

  • It can run without depending on the Visual Studio extension.
  • It works from Visual Studio, Rider, VS Code, terminal-based workflows, and similar environments.
  • It opens a browser-based UI for entity design, template editing, generation logs, project settings, and workflow configuration.
  • Existing command-line workflows are still supported for automation scenarios.
  • The tool can auto-detect the active ASP.NET Zero project, remember the last used project, or attach to a specific solution with --project.

Installation

Install the tool globally:

dotnet tool install --global AspNetZero.PowerTools

Update an existing installation:

dotnet tool update --global AspNetZero.PowerTools

Running the Tool

Run Power Tools from your ASP.NET Zero project root:

cd C:\Projects\Acme.BookStore
aspnetzero-powertools

By default, the tool runs at http://localhost:5678 and opens the browser automatically.

Run it for a specific solution:

aspnetzero-powertools --project C:\Projects\Acme.BookStore\Acme.BookStore.sln

Use a different port:

aspnetzero-powertools --port 5679

Start without opening the browser:

aspnetzero-powertools --no-launch

Project Detection and Setup

When Power Tools starts, it tries to locate the active ASP.NET Zero project. It can detect an initialized Power Tools setup automatically or attach to a project through a .sln or .slnx file.

If the project configuration is found, the existing settings are loaded. If Power Tools cannot find the configuration, the setup screen is displayed.

The setup flow supports:

  • Selecting a .sln or .slnx file with the native operating system file picker.
  • Loading existing Power Tools settings automatically.
  • Creating the required Power Tools working files for a new setup.
  • Choosing the project type: Angular, AngularMerged, Mvc, or React.
  • Setting project version, application area, source paths, and license code.

Power Tools Setup Form

Project Settings and Generation Workflow

The Project Settings page makes project configuration editable from the Web UI. You can manage project name, company name, project type, project version, source paths, DbContext path, AppPermissions path, EntityFramework project folder, and license code.

The most important new section is Generation Workflow.

Generation workflow editor

The workflow shows the full generation pipeline and lets you customize it when needed. Default steps such as creating bundles, starting the host project, and refreshing service proxies can run automatically, while teams can still add their own commands before or after code generation.

Workflow steps have two types:

  • generate: Runs the ASP.NET Zero code generation step.
  • command: Runs a shell command.

Command steps support these fields:

  • Label: The display name shown in the UI.
  • Command: The command to run.
  • WorkingDirectory: A project-root-relative working directory.
  • SuccessPattern: A text or regex pattern that marks a long-running command as ready.
  • Timeout: Maximum wait time for the success pattern.

For example, an Angular workflow can run code generation, start the host, and refresh Angular service proxies with the default steps. If a team also wants to run project-specific commands, such as a build, lint, or custom script, those steps can be added visually from the workflow editor.

The generate step can be moved within the workflow. This means commands can run before generation, after generation, or on both sides.

Default workflows are generated by project type:

  • MVC projects can run npm run create-bundles.
  • Angular projects can run npm run create-dynamic-bundles, start the host, and run refresh.bat for Angular service proxies.
  • Angular merged projects can start the host and run the nswag/refresh.bat under the host project.
  • React projects can run npm install --legacy-peer-deps, start the host, and run npm run nswag.

Entities Page and Batch Entity Generation

The Entities page lists the entities configured for the project. From this page, entities can be edited, generated one by one, or selected for batch generation.

Entities list and batch selection

Batch generation is not just a simple loop over selected entities. Power Tools reads relationship metadata and calculates a safer generation order.

The order calculation considers:

  • Entities referenced through navigation properties should be generated before dependent entities.
  • Master-detail child entities should be generated before their parent entity.
  • If a selected entity references an unselected entity, the UI warns the user.
  • If circular relationships are detected, batch generation is blocked.
  • If dependencies enforce an order, manual reordering is locked to avoid invalid generation sequences.

Generation order dialog

Batch generation is optimized for real projects. It generates each selected entity, tracks the generated files during the batch, formats files once at the end, and runs bundle or proxy workflow commands once after the whole batch.

This is especially useful for Angular and React projects. Instead of running NSwag or service proxy refresh after every entity, Power Tools can generate all selected entities first and refresh proxies once.

Batch generation log

Entity Wizard

The new Web UI includes an entity wizard, so users can design entities without editing internal configuration files.

The wizard is organized into these steps:

  • UI Layout: Choose page and template variants.
  • Entity Information: Configure entity name, namespace, table name, primary key, base class, and generation options.
  • Properties: Manage properties, validation, list/create/edit/filter visibility, and enum definitions.
  • Navigation Properties: Configure foreign key relationships, lookup/dropdown view type, and cascade parent selection.
  • Nav. Properties (1-Many): Configure master-detail child tables.

UI Layout Options

The new template variant system allows each entity to use different generated UI patterns. Selections are saved with the entity definition and reused whenever the entity is generated again.

Page template options:

  • None: Does not generate UI.
  • DataTable: Generates the classic table-based CRUD list.
  • Card View: Generates a responsive card grid list.
  • Master Detail: Generates a parent-child relationship view.

Create/Edit template options:

  • Modal: Generates the classic modal create/edit experience.
  • Offcanvas: Generates a slide-in side panel create/edit experience.
  • Full Page: Generates a dedicated create/edit page.

Detail template options:

  • None: Does not generate a detail view.
  • Modal: Generates the classic detail modal.
  • Full Page: Generates a dedicated detail page.

UI layout selector

Card View and Offcanvas are version-aware. In the current implementation, these new variants are enabled for v15.3.0 and later projects. Older projects continue to use the legacy template structure.

Card View in Entity Lists

Card View generates a card-based list page instead of the classic table. It is useful for data sets where a visual, object-focused layout is easier to scan.

Generated Card View pages preserve the existing CRUD features:

  • Search input.
  • Advanced filters.
  • Listed property fields inside each card.
  • Navigation property display fields inside each card.
  • Permission-based action menus.
  • Edit, delete, view, and entity history actions where applicable.
  • Excel export/import support where enabled.
  • Pagination.

Generated Card View

Offcanvas Create/Edit

The Offcanvas create/edit option keeps users on the list page and opens the form in a right-side panel. This is ideal for fast data entry and quick edits.

React uses Ant Design Drawer for the generated Offcanvas template. The drawer opens from the right, switches title between create and edit mode, includes save/cancel footer actions, and works with generated lookup modal components.

Angular uses the Metronic drawer infrastructure. The generated drawer opens from the right, supports overlay behavior, and uses responsive width settings.

MVC includes Bootstrap offcanvas-based template variants.

Generated Offcanvas Create/Edit

Cascade Dropdown and Lookup Selection

The updated navigation property model supports dependent lookup and dropdown scenarios. A common example is Country -> City.

When configuring a CityId navigation property, CountryId can be selected as its parent navigation property. The generated city dropdown or lookup is then filtered by the selected country.

The wizard exposes this through the Parent Navigation Property field in the foreign key dialog. Select None for an independent lookup, or select another navigation property to enable cascade behavior. The user only needs to pick the parent field in the Web UI; Power Tools handles the generated backend and frontend code.

Cascade lookup configuration

Power Tools reflects this configuration in both backend and frontend templates:

  • Backend lookup endpoints accept a ParentId filter.
  • Dropdown endpoints filter by parent id.
  • Lookup table search endpoints can also filter by parent id.
  • The UI clears the child value when the parent value changes.
  • Dropdown child options are reloaded based on the selected parent.
  • Lookup modals receive the parent id before opening.
  • Circular parent dependencies are blocked in the wizard.

The result is a natural workflow: users select Country, then the City field only shows cities that belong to that country.

Generated cascade country city

Entity Relationships Visualizer

The new Relationships page reads the configured entity definitions and renders the model as a graph. This makes the domain model easier to understand and helps explain why batch generation chooses a specific order.

The visualizer shows:

  • Each entity as a separate node.
  • Namespace, primary key type, property count, and relationship counts on each node.
  • A Master-Detail badge for master-detail entities.
  • Many-to-one foreign key relationships with blue lines.
  • One-to-many master-detail relationships with dashed amber lines.
  • MiniMap, zoom, pan, and graph controls.
  • Automatic top-to-bottom layout.

Entity Relationships Visualizer

Import from Database

The Import from DB page brings database-based entity bootstrapping into the Web UI.

Supported providers:

  • SQL Server
  • PostgreSQL
  • MySQL
  • Oracle

The screen first tries to read the project's default connection string. Users can change the connection string, test the connection, load tables, filter table names, and import a selected table into the entity wizard.

Import from database

Imported entities include:

  • Table name.
  • PascalCase entity names derived from table names.
  • Singular entity name derivation.
  • C# property type mapping from database column types.
  • Nullable and required information.
  • MaxLength when the provider exposes string length metadata.
  • IsLoadedFromDatabase, which is shown with a database icon in the Entities page.

This is useful when generating CRUD screens from an existing database schema.

Template Editor

The new Templates page lets users inspect and customize server, client, test, and MAUI templates from the browser.

Template editor

Template editor features:

  • The template tree is filtered by project type.
  • MainTemplate, PartialTemplates, and TemplateInfo are opened in separate tabs.
  • Monaco editor provides syntax highlighting.
  • Default templates open in read-only mode.
  • Customize this template copies default content into a custom file.
  • Save creates MainTemplate.custom.txt, PartialTemplates.custom.txt, or TemplateInfo.custom.txt.
  • Diff compares the default template with the customized version.
  • Revert deletes the custom file and returns to the default template.
  • HTML templates support preview and split view.
  • The placeholder panel lists entity, property, navigation property, conditional flag, and looped placeholders.

Template sync keeps default templates current. When Power Tools opens a project, bundled templates are synchronized into the project's FileTemplates folder. Stale default template files are removed, current defaults are copied, and *.custom.txt files are preserved.

This solves two problems at once:

  • Product updates can refresh default templates.
  • Project-specific template customizations are not overwritten.

Single Generation and Regenerate Flow

When Generate is clicked for a single entity, Power Tools opens the Generation Log page. The page streams backend logs with Server-Sent Events and displays them in a terminal-like output.

The page supports:

  • Start Generation to run the workflow.
  • Regenerate after the first run.
  • Format generated files option.
  • Workflow step headers.
  • Visual distinction between success, error, and log lines.
  • Navigation guard while generation is running.
  • Optional notification sounds when generation completes or fails.

Because service proxy refresh and bundle generation can be workflow steps, a single entity regenerate can also update client proxies automatically.

Automating Service Proxy and Bundle Generation

ASP.NET Zero projects often require extra manual steps after CRUD generation: Angular service proxy refresh, React NSwag generation, MVC bundle generation, or Angular dynamic bundle generation.

The workflow system attaches these steps directly to code generation.

For Angular separated projects, the workflow editor can be configured to run code generation, create dynamic bundles, start the host project, and refresh Angular proxies. For React projects, it can install dependencies, start the host project, and run NSwag proxy generation.

For batch generation, these command steps can run once after all selected entities are generated. This can significantly reduce total generation time.

Master Detail and One-to-Many Support

When Master Detail is selected in the UI Layout step, the wizard requires at least one child table in the final step. The user configures child tables visually from the Web UI.

During master-detail generation, Power Tools:

  • Resolves child entity definitions relative to the parent entity.
  • Rebuilds child entity configuration using parent metadata.
  • Normalizes parent-child foreign key property names.
  • Runs child app service and input DTO modifiers.
  • Applies React child page modifiers where needed.
  • Creates master-detail migrations when database generation is enabled.

Batch generation also understands master-detail relationships. Child entities are generated before the parent so parent placeholders and child integration points are filled correctly.

Master detail layout

Logs and Preferences

Power Tools writes its own logs and exposes them through the Web UI. The Logs page lists log files, refreshes recent content automatically, and supports downloading log files.

The Preferences page lets users choose a notification sound for generation success or failure. Users can preview success and error sounds or turn notifications off.

Logs page

Supported Project Types

The new Power Tools targets these ASP.NET Zero project types:

  • Angular
  • AngularMerged
  • Mvc
  • React

Frontend templates are selected by project type. Angular projects use the newer Angular template tree for v15.3.0 and later. Older Angular projects continue to use the legacy template tree. React and MVC also use variant folders for Card View, Offcanvas, Full Page, and related UI options.

Summary

The new ASP.NET Zero Power Tools modernizes the RAD workflow with a global .NET tool, a browser-based UI, and a configurable generation pipeline.

Highlights include:

  • Global .NET tool installation.
  • React-based Web UI.
  • Project setup and project switching.
  • Entity wizard for visual entity design.
  • Card View, Offcanvas, Full Page, and Master Detail template variants.
  • Cascade lookup/dropdown support.
  • Entity Relationships Visualizer.
  • Database import.
  • Batch entity generation with relationship-aware ordering.
  • Workflow editor for formatting, bundle generation, host startup, and service proxy refresh.
  • Web-based template editor with diff, preview, and placeholder panel.
  • Live logs for single and batch generation.
  • Logs and notification preferences pages.

With this version, ASP.NET Zero code generation requires fewer manual steps and less context switching. Teams can generate one entity, regenerate an existing entity, or batch-generate a set of related entities while keeping formatting, bundle creation, and service proxy refresh inside the same workflow.

Read the original on aspnetzero.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.