- This document is for Track 2 .NET SDK (Azure.ResourceManager.XXX). Not for track 1 .NET SDK (Microsoft.Azure.Management.XXX)
dotnet new install `Path to SDK repo`\eng\templates\Azure.ResourceManager.Template
dotnet new azuremgmt --help
Following parameter is available
Parameter | Required | Description |
---|---|---|
-p, --provider | Yes | The Azure provider name. For example, Microsoft.Network or Microsoft.Compute . Note this parameter is also used for diagnostic attribute in AssemblyInfo.cs. The second part of the provider name Compute is also used in src\autorest.md to point to REST Api spec specifications\Compute\resource-manager\readme.md . If they mismatch, manual adjustment is needed in autorest.md . |
-t, --tagVersion | No | Specifies the package tag in the README.MD. If empty, CodeGen will rely on the default tag in the README.MD is used. If default tag isn't present, CodeGen may fail. |
-in, --includeCI | No | Specifies whether ci.mgmt.yml will be created in the parent folder. Token replacements have been performed on ci.mgmt.yml based on current project name. Note, for now, you still need to change sdk/template/ to sdk/RP and serviceDirectory: to RP folder name. This issue would be fixed in the future. |
- Create folder
Azure.ResourceManager.Rp
under corresponding service folder that is under network\Azure.ResourceManager.Network - Change to the
Azure.ResourceManager.Rp
folder - dotnet new azuremgmt --provider
ResourceProviderName
OR - dotnet new azuremgmt --provider
ResourceProviderName
--tagVersionOptional tag in README.MD
OR - dotnet new azuremgmt --provider
ResourceProviderName
--includeCI true - ....\eng\scripts Update-Mgmt-CI.ps1
Note: The last step updates the ci paths in Azure.ResourceManager ci.mgmt.yml file so that it will run anytime this new package changes Note: Please use proper casing for the directory name as well as resource provider name.
Azure.ResourceManager.Rp
,Microsoft.Compute
orMicrosoft.KeyVault
. The resource provider name withoutMicrosoft.
will be used in autorest.md file pointing to thehttps://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/<resource name>/resource-manager/readme.md
- Inspect
tsp-location.yaml
to ensure the REST Api path is valid - Run
dotnet build
to ensure empty project builds successfully. - Run
dotnet build /t:GenerateCode
to generate C# code and ensure no fatal errors. - Run
dotnet build
to ensure now generated project builds successfully. - Viola!