Skip to content

[Provisioning Generator] dotnet build /t:GenerateCode fails due to missing transitive dependency #57165

@ArcturusZhang

Description

@ArcturusZhang

Description

dotnet build /t:GenerateCode fails for provisioning SDK packages (e.g., Azure.Provisioning.KeyVault) because the published provisioning emitter package is missing @azure-tools/typespec-azure-resource-manager as a dependency.

Error

Cannot find package '@azure-tools/typespec-azure-resource-manager' imported from
.../node_modules/@azure-typespec/http-client-csharp-mgmt/dist/emitter/resolve-arm-resources-converter.js

Followed by TypeSpec compilation errors (Unknown identifier ResourceNameParameter, Unknown decorator @armResourceOperations, etc.)

Root Cause

The provisioning emitter package.json (eng/azure-typespec-http-client-csharp-provisioning-emitter-package.json) only declares:

{
  "dependencies": {
    "@azure-typespec/http-client-csharp-provisioning": "1.0.0-alpha.20260316.3"
  }
}

The provisioning emitter transitively depends on @azure-typespec/http-client-csharp-mgmt, which imports @azure-tools/typespec-azure-resource-manager in resolve-arm-resources-converter.js. However, this transitive dependency is not resolved when tsp-client update runs npm ci in the TempTypeSpecFiles directory.

Workaround

Use RegenSdkLocal.ps1 instead of dotnet build /t:GenerateCode:

pwsh eng/packages/http-client-csharp-provisioning/eng/scripts/RegenSdkLocal.ps1 -Services "KeyVault"

This works because it builds the emitter locally with all dependencies available.

Expected Behavior

dotnet build /t:GenerateCode should work for provisioning SDK packages, just as it works for management SDK packages.

Found In

Provisioning Migration - KeyVault (#56820)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions