Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Learn about some steps you can take to troubleshoot problems if the Power Platform CLI isn't working properly. This article contains information about:
- When and how to use the
--log-to-consoleparameter - How to resolve an error that says that the
DotnetToolSettings.xmlfile is missing
Use the global --log-to-console parameter
The global --log-to-console parameter sends PAC CLI diagnostic logs to console output so pipeline logs capture them immediately.
pac --log-to-console <noun> <verb> [parameters]
When to use this parameter
Use --log-to-console when:
- You're running PAC CLI on ephemeral runners (for example GitHub-hosted runners) where local files are discarded when the job ends.
- A pipeline fails before a separate log upload step can publish local PAC CLI logs.
- You need immediate diagnostics in Azure DevOps or GitHub Actions job logs to triage failed deployments.
--log-to-console is a global PAC CLI parameter. This means you can use it with any PAC CLI command.
Examples
- name: Import solution with PAC CLI diagnostics
run: pac --log-to-console solution import --path ContosoSolution.zip --environment ${{ secrets.ENVIRONMENT_URL }}
Note
The pac package deploy command also has command-specific logging parameters (--logConsole and --logFile) for package deployment output.
Resolve DotnetToolSettings.xml missing
If a PAC CLI command fails with a DotnetToolSettings.xml missing message, the installed .NET version usually doesn't match the PAC CLI major version.
This known .NET tool behavior is tracked in dotnet/sdk issue #38172.
Cause
- PAC CLI 2.x and later versions are built with .NET 10 and require .NET 10 to be installed as a prerequisite.
- PAC CLI 1.x versions are built with .NET 9 and require .NET 9 to be installed as a prerequisite.
- If the required .NET version isn't installed, the error can appear as
DotnetToolSettings.xmlmissing instead of a clearer runtime message. - Even when multiple SDKs are installed, a local
global.jsoncan forcedotnetto use an older SDK that can't run the tool. - Some users reported this problem with older SDK patch trains. Updating to newer SDK patches can resolve the problem.
How to fix it
Use the following steps to fix this error.
Check the PAC CLI version:
pacInstall the required .NET SDK or runtime for that PAC CLI major version:
- PAC CLI 2.x or later -> install .NET 10
- PAC CLI 1.x -> install .NET 9
Verify the required SDK is available on the machine or build agent:
dotnet --list-sdksCheck whether
dotnetis pinned byglobal.jsonin the current directory tree:dotnet --infoIf
global.jsonpoints to an older SDK, update it or run from a directory that doesn't pin an incompatible SDK.Run the PAC CLI command again.
In CI systems (GitHub Actions and Azure DevOps), explicitly install the required .NET version in the pipeline before PAC CLI runs.
If you see this error while installing a different package (not PAC CLI), verify the package is a .NET tool package. Non-tool NuGet packages can produce similar messages with dotnet tool install.
See also
Microsoft Power Platform CLI overview
Power Platform CLI command reference
pac package command reference