Skip to content

PAC MCP Server fails to start - Missing Microsoft.Extensions.Configuration.EnvironmentVariables assembly #1260

@troystaylor

Description

@troystaylor

Describe the bug
The pac copilot mcp command fails to start the MCP server with a FileNotFoundException for the Microsoft.Extensions.Configuration.EnvironmentVariables assembly.

To Reproduce
Steps to reproduce the behavior:

  1. Install PAC CLI 1.50.1: dotnet tool install --global Microsoft.PowerApps.CLI.Tool --version 1.50.1
  2. Configure MCP server in VS Code or run: pac copilot mcp
  3. Attempt to start the MCP server

Was trying to follow: https://microsoft.github.io/pp-mcp/labs/power-platform-cli-mcp/

Expected behavior
The pac-mcp.exe server should start successfully and be ready to accept MCP client connections.

Additional context
Environment:
PAC CLI Version: 1.50.1+gabb74d2
.NET SDK: 9.0.204, 9.0.205
.NET Runtime: Microsoft.NETCore.App 9.0.5, 9.0.6
OS: Windows
Server location: C:\Users{username}.dotnet\tools.store\microsoft.powerapps.cli.tool\1.50.1\microsoft.powerapps.cli.tool\1.50.1\tools\net9.0\any\pac-mcp.exe

Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Configuration.EnvironmentVariables, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
File name: 'Microsoft.Extensions.Configuration.EnvironmentVariables, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
at Microsoft.Extensions.Hosting.HostApplicationBuilder..ctor(HostApplicationBuilderSettings settings)
at Microsoft.Extensions.Hosting.HostApplicationBuilder..ctor(String[] args)
at Microsoft.Extensions.Hosting.Host.CreateApplicationBuilder(String[] args)
at Program.

$(String[] args) in C:__w\1\s\src\cli\pac-mcp\Program.cs:line 9
at Program.(String[] args)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions