Edit

Upgrade Dev Proxy

At a glance
Goal: Upgrade Dev Proxy to a newer version
Time: 5 minutes
Plugins: None
Prerequisites: Dev Proxy installed

This article explains how to upgrade Dev Proxy between stable and beta versions.

Check your current version

Before upgrading, check which version of Dev Proxy you currently have installed:

devproxy --version

If you have the beta version installed, run:

devproxy-beta --version

Before you upgrade

Before upgrading Dev Proxy, consider the following:

  • Back up configuration files in the installation folder. Upgrading overwrites all files in the installation folder, including the default devproxyrc.json and the preset configurations in the config folder. If you modified any of these files, back them up before upgrading. Configs downloaded with devproxy config get are stored in ~dataFolder/configs/ and aren't affected by upgrades. To avoid this risk, store your configuration and mock files in your project folder and pass them using --config-file. Files stored outside the installation folder aren't affected by upgrades.
  • Review the release notes. Check the release notes for any breaking changes or new features that might affect your workflow.
  • Configuration compatibility. Dev Proxy configuration files include a schema reference. After upgrading, update the schema version in your configuration files to match the new version. For example, update "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.1.0/rc.schema.json" to reference the new version.

Upgrade stable to stable

To upgrade from one stable version to another stable version of Dev Proxy:

Run the following command in any command prompt:

winget upgrade DevProxy.DevProxy --silent

Note

The winget upgrade command works regardless of which folder you run it from. The installer updates Dev Proxy in its installed location.

Run the following commands:

brew update
brew upgrade dev-proxy

Run the setup script again to install the latest version:

bash -c "$(curl -sL https://aka.ms/devproxy/setup.sh)"

If you use PowerShell:

(Invoke-WebRequest https://aka.ms/devproxy/setup.ps1).Content | Invoke-Expression

Upgrade stable to beta

To try the latest preview features, you can install the beta version alongside your stable installation. The beta version uses a separate command (devproxy-beta) and doesn't affect your stable installation.

Run the following command:

winget install DevProxy.DevProxy.Beta --silent

Run the following commands:

brew tap dotnet/dev-proxy
brew install dev-proxy-beta

Run the following command:

bash -c "$(curl -sL https://aka.ms/devproxy/setup-beta.sh)"

If you use PowerShell:

(Invoke-WebRequest https://aka.ms/devproxy/setup-beta.ps1).Content | Invoke-Expression

To run the beta version, use devproxy-beta instead of devproxy.

Upgrade beta to stable

If you're running the beta version and want to switch to the stable version:

First, uninstall the beta version:

winget uninstall DevProxy.DevProxy.Beta

Then, install or upgrade the stable version:

winget install DevProxy.DevProxy --silent

First, uninstall the beta version:

brew uninstall dev-proxy-beta

Then, install or upgrade the stable version:

brew tap dotnet/dev-proxy
brew install dev-proxy

If you already have the stable version installed, upgrade it:

brew upgrade dev-proxy
  1. Delete your beta installation folder.

  2. Remove the beta folder from your PATH.

  3. Install the stable version using the setup script:

    bash -c "$(curl -sL https://aka.ms/devproxy/setup.sh)"
    

    If you use PowerShell:

    (Invoke-WebRequest https://aka.ms/devproxy/setup.ps1).Content | Invoke-Expression
    

Upgrade beta to beta

To upgrade from one beta version to another:

winget upgrade DevProxy.DevProxy.Beta --silent
brew update
brew upgrade dev-proxy-beta

Run the setup script again:

bash -c "$(curl -sL https://aka.ms/devproxy/setup-beta.sh)"

If you use PowerShell:

(Invoke-WebRequest https://aka.ms/devproxy/setup-beta.ps1).Content | Invoke-Expression

See also