Title: MetadataError: ProgressAction was defined multiple times for the command · Issue #18976 · PowerShell/PowerShell · GitHub
Open Graph Title: MetadataError: ProgressAction was defined multiple times for the command · Issue #18976 · PowerShell/PowerShell
X Title: MetadataError: ProgressAction was defined multiple times for the command · Issue #18976 · PowerShell/PowerShell
Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...
Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/18976
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"MetadataError: ProgressAction was defined multiple times for the command","articleBody":"### Prerequisites\r\n\r\n- [X] Write a descriptive title.\r\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- [X] Search the existing issues.\r\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\r\n\r\n### Steps to reproduce\r\n\r\n`Invoke-Build` scripts throws `MetadataError: A parameter with the name 'ProgressAction' was defined multiple times for the command.` on latest daily builds of PowerShell Core.\r\n\r\n@SteveL-MSFT I believe that it's related to [newly implemented](https://github.com/PowerShell/PowerShell/pull/18887) `ProgressAction` common parameter.\r\n\r\nThe issue **IS NOT** occurring on *PS 7.3.1 GA* or *PS 5.1*\r\n\r\n```powershell\r\nPS D:\\\u003e $PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nPSVersion 7.4.0-nightly\r\nPSEdition Core\r\nGitCommitId 7.4.0-nightly-35-g94610307572edc7656e22bc3f5d45d57751e9f13\r\nOS Microsoft Windows 10.0.19045\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n\r\nPS D:\\\u003e git clone https://github.com/PowerShell/PSReadLine.git PSReadLine\r\nCloning into 'PSReadLine'...\r\nremote: Enumerating objects: 6143, done.\r\nremote: Counting objects: 100% (72/72), done.\r\nremote: Compressing objects: 100% (45/45), done.\r\nremote: Total 6143 (delta 33), reused 58 (delta 26), pack-reused 6071\r\nReceiving objects: 100% (6143/6143), 3.04 MiB | 25.29 MiB/s, done.\r\nResolving deltas: 100% (4633/4633), done.\r\n\r\nPS D:\\\u003e cd .\\PSReadLine\\\r\nPS D:\\PSReadLine\u003e Invoke-Build\r\nMetadataError: A parameter with the name 'ProgressAction' was defined multiple times for the command.\r\nPS D:\\PSReadLine\u003e $error[0]|fl * -force\r\n\r\nPSMessageDetails :\r\nException : System.Management.Automation.MetadataException: A parameter with the name 'ProgressAction' was defined multiple times for the command.\r\n at System.Management.Automation.MergedCommandParameterMetadata.AddMetadataForBinder(InternalParameterMetadata parameterMetadata, ParameterBinderAssociation binderAssociation) in\r\n D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\MergedCommandParameterMetadata.cs:line 102\r\n at System.Management.Automation.CmdletParameterBinderController.HandleCommandLineDynamicParameters(ParameterBindingException\u0026 outgoingBindingException) in\r\n D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\CmdletParameterBinderController.cs:line 1683\r\n at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments) in\r\n D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\CmdletParameterBinderController.cs:line 262\r\n at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments) in\r\n D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\CmdletParameterBinderController.cs:line 108\r\n at System.Management.Automation.CommandProcessor.BindCommandLineParameters() in D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\CommandProcessor.cs:line 177\r\n at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues) in\r\n D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\CommandProcessor.cs:line 237\r\n at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues) in\r\n D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\CommandProcessorBase.cs:line 470\r\n at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream) in D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\pipeline.cs:line 996\r\n at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) in\r\n D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\pipeline.cs:line 556\r\n --- End of stack trace from previous location ---\r\n at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) in\r\n D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\pipeline.cs:line 556\r\n at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts,\r\n CommandRedirection[][] commandRedirections, FunctionContext funcContext) in D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\runtime\\Operations\\MiscOps.cs:line 496\r\n at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame) in\r\n D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\interpreter\\CallInstruction.Generated.cs:line 608\r\n at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) in\r\n D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\interpreter\\ControlFlowInstructions.cs:line 338\r\nTargetObject :\r\nCategoryInfo : MetadataError: (:) [], MetadataException\r\nFullyQualifiedErrorId : ParameterNameAlreadyExistsForCommand\r\nErrorDetails :\r\nInvocationInfo : System.Management.Automation.InvocationInfo\r\nScriptStackTrace : at \u003cScriptBlock\u003e, \u003cNo file\u003e: line 1\r\nPipelineIterationInfo : {}\r\n```\r\n\r\n\r\n### Expected behavior\r\n\r\n```console\r\nPS D:\\\u003e $PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nPSVersion 7.3.1\r\nPSEdition Core\r\nGitCommitId 7.3.1\r\nOS Microsoft Windows 10.0.19045\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n\r\nPS D:\\\u003e cd D:\\PSReadLine\\\r\nPS D:\\PSReadLine\u003e Invoke-Build\r\nVERBOSE: Building for 'net6.0'\r\nBuild . D:\\PSReadLine\\PSReadLine.build.ps1\r\nTask /./LayoutModule/BuildPolyfiller skipped.\r\nTask /./LayoutModule/BuildMainModule\r\nMissing output 'PSReadLine/bin/Release/net6.0/Microsoft.PowerShell.PSReadLine2.dll'.\r\nMSBuild version 17.4.1+9a89d02ff for .NET\r\n Determining projects to restore...\r\n Restored D:\\PSReadLine\\Polyfill\\Polyfill.csproj (in 7.06 sec).\r\n Restored D:\\PSReadLine\\PSReadLine\\PSReadLine.csproj (in 7.06 sec).\r\n Restored D:\\PSReadLine\\test\\PSReadLine.Tests.csproj (in 7.24 sec).\r\n Restored D:\\PSReadLine\\MockPSConsole\\MockPSConsole.csproj (in 7.74 sec).\r\n PSReadLine -\u003e D:\\PSReadLine\\PSReadLine\\bin\\Release\\net6.0\\Microsoft.PowerShell.PSReadLine2.dll\r\n PSReadLine -\u003e D:\\PSReadLine\\PSReadLine\\bin\\Release\\net6.0\\publish\\\r\n MockPSConsole -\u003e D:\\PSReadLine\\MockPSConsole\\bin\\Release\\net6.0\\MockPSConsole.dll\r\n MockPSConsole -\u003e D:\\PSReadLine\\MockPSConsole\\bin\\Release\\net6.0\\publish\\\r\n PSReadLine.Tests -\u003e D:\\PSReadLine\\test\\bin\\Release\\net6.0\\PSReadLine.Tests.dll\r\n PSReadLine.Tests -\u003e D:\\PSReadLine\\test\\bin\\Release\\net6.0\\publish\\\r\nDone /./LayoutModule/BuildMainModule 00:00:17.7238730\r\nTask /./LayoutModule\r\nWARNING: Build using net6.0 is not sufficient to be downlevel compatible\r\nTask /./LayoutModule/CheckHelpContent skipped.\r\nDone /./LayoutModule 00:00:18.3104774\r\nDone /./RunTests/BuildMainModule\r\nTask /./RunTests/BuildXUnitTests\r\nSkipping up-to-date output.\r\nDone /./RunTests/BuildXUnitTests 00:00:00.0080610\r\nTask /./RunTests\r\nAvailable layouts: en-US en-US\r\nTesting en-US ...\r\nTest run for D:\\PSReadLine\\test\\bin\\Release\\net6.0\\PSReadLine.Tests.dll (.NETCoreApp,Version=v6.0)\r\nMicrosoft (R) Test Execution Command Line Tool Version 17.4.0 (x64)\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\n\r\nStarting test execution, please wait...\r\nA total of 1 test files matched the specified pattern.\r\n[xUnit.net 00:00:16.79] Test.en_US_Windows.DeadKeyShouldBeIgnored [SKIP]\r\n Skipped Test.en_US_Windows.DeadKeyShouldBeIgnored [1 ms]\r\nResults File: D:\\PSReadLine\\test\\TestResults\\xUnitTestResults.en-US.xml\r\n\r\nPassed! - Failed: 0, Passed: 270, Skipped: 1, Total: 271, Duration: 6 s - PSReadLine.Tests.dll (net6.0)\r\nTesting en-US ...\r\nTest run for D:\\PSReadLine\\test\\bin\\Release\\net6.0\\PSReadLine.Tests.dll (.NETCoreApp,Version=v6.0)\r\nMicrosoft (R) Test Execution Command Line Tool Version 17.4.0 (x64)\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\n\r\nStarting test execution, please wait...\r\nA total of 1 test files matched the specified pattern.\r\n[xUnit.net 00:00:06.38] Test.en_US_Windows.DeadKeyShouldBeIgnored [SKIP]\r\n Skipped Test.en_US_Windows.DeadKeyShouldBeIgnored [1 ms]\r\nResults File: D:\\PSReadLine\\test\\TestResults\\xUnitTestResults.en-US.xml\r\n\r\nPassed! - Failed: 0, Passed: 270, Skipped: 1, Total: 271, Duration: 5 s - PSReadLine.Tests.dll (net6.0)\r\nDone /./RunTests 00:00:34.0325029\r\nDone /. 00:00:52.3480345\r\nWARNING: /LayoutModule D:\\PSReadLine\\PSReadLine.build.ps1:154\r\nBuild using net6.0 is not sufficient to be downlevel compatible\r\nBuild succeeded with warnings. 5 tasks, 0 errors, 1 warnings 00:00:52.5029264\r\n```\r\n\r\n\r\n### Actual behavior\r\n\r\n```console\r\nPS D:\\\u003e git clone https://github.com/PowerShell/PSReadLine.git PSReadLine\r\nCloning into 'PSReadLine'...\r\nremote: Enumerating objects: 6143, done.\r\nremote: Counting objects: 100% (72/72), done.\r\nremote: Compressing objects: 100% (45/45), done.\r\nremote: Total 6143 (delta 33), reused 58 (delta 26), pack-reused 6071\r\nReceiving objects: 100% (6143/6143), 3.04 MiB | 25.29 MiB/s, done.\r\nResolving deltas: 100% (4633/4633), done.\r\n\r\nPS D:\\\u003e cd .\\PSReadLine\\\r\nPS D:\\PSReadLine\u003e Invoke-Build\r\nMetadataError: A parameter with the name 'ProgressAction' was defined multiple times for the command.\r\n```\r\n\r\n\r\n### Error details\r\n\r\n```console\r\nException :\r\n Type : System.Management.Automation.MetadataException\r\n ErrorRecord :\r\n Exception :\r\n Type : System.Management.Automation.ParentContainsErrorRecordException\r\n Message : A parameter with the name 'ProgressAction' was defined multiple times for the command.\r\n HResult : -2146233087\r\n CategoryInfo : MetadataError: (:) [], ParentContainsErrorRecordException\r\n FullyQualifiedErrorId : ParameterNameAlreadyExistsForCommand\r\n InvocationInfo :\r\n ScriptLineNumber : 1\r\n OffsetInLine : 1\r\n HistoryId : -1\r\n Line : invoke-Build\r\n PositionMessage : At line:1 char:1\r\n + invoke-Build\r\n + ~~~~~~~~~~~~\r\n CommandOrigin : Internal\r\n ScriptStackTrace : at \u003cScriptBlock\u003e, \u003cNo file\u003e: line 1\r\n TargetSite :\r\n Name : AddMetadataForBinder\r\n DeclaringType : System.Management.Automation.MergedCommandParameterMetadata, System.Management.Automation, Version=7.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\r\n MemberType : Method\r\n Module : System.Management.Automation.dll\r\n Message : A parameter with the name 'ProgressAction' was defined multiple times for the command.\r\n Data : System.Collections.ListDictionaryInternal\r\n Source : System.Management.Automation\r\n HResult : -2146233087\r\n StackTrace :\r\n at System.Management.Automation.MergedCommandParameterMetadata.AddMetadataForBinder(InternalParameterMetadata parameterMetadata, ParameterBinderAssociation binderAssociation) in\r\nD:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\MergedCommandParameterMetadata.cs:line 102\r\n at System.Management.Automation.CmdletParameterBinderController.HandleCommandLineDynamicParameters(ParameterBindingException\u0026 outgoingBindingException) in\r\nD:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\CmdletParameterBinderController.cs:line 1683\r\n at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments) in\r\nD:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\CmdletParameterBinderController.cs:line 262\r\n at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments) in\r\nD:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\CmdletParameterBinderController.cs:line 108\r\n at System.Management.Automation.CommandProcessor.BindCommandLineParameters() in D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\CommandProcessor.cs:line 177\r\n at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues) in D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\CommandProcessor.cs:line 237\r\n at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues) in D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\CommandProcessorBase.cs:line 447\r\n at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream) in D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\pipeline.cs:line 1089\r\n at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) in D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\pipeline.cs:line 478\r\n--- End of stack trace from previous location ---\r\n at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input) in D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\pipeline.cs:line 552\r\n at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][]\r\ncommandRedirections, FunctionContext funcContext) in D:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\runtime\\Operations\\MiscOps.cs:line 496\r\n at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame) in\r\nD:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\interpreter\\CallInstruction.Generated.cs:line 608\r\n at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) in\r\nD:\\DEVELOPMENT\\PowerShellCore\\src\\System.Management.Automation\\engine\\interpreter\\ControlFlowInstructions.cs:line 338\r\nCategoryInfo : MetadataError: (:) [], MetadataException\r\nFullyQualifiedErrorId : ParameterNameAlreadyExistsForCommand\r\nInvocationInfo :\r\n ScriptLineNumber : 1\r\n OffsetInLine : 1\r\n HistoryId : -1\r\n Line : invoke-Build\r\n PositionMessage : At line:1 char:1\r\n + invoke-Build\r\n + ~~~~~~~~~~~~\r\n CommandOrigin : Internal\r\nScriptStackTrace : at \u003cScriptBlock\u003e, \u003cNo file\u003e: line 1\r\n```\r\n\r\n\r\n### Environment data\r\n\r\n```powershell\r\nName Value\r\n---- -----\r\nPSVersion 7.4.0-nightly\r\nPSEdition Core\r\nGitCommitId 7.4.0-nightly-35-g94610307572edc7656e22bc3f5d45d57751e9f13\r\nOS Microsoft Windows 10.0.19045\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n\r\n\r\n### Visuals\r\n\r\n\r\n","author":{"url":"https://github.com/kborowinski","@type":"Person","name":"kborowinski"},"datePublished":"2023-01-19T12:13:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":14},"url":"https://github.com/18976/PowerShell/issues/18976"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cf614a2d-972c-66f6-cef5-fd689a0aafbd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A306:390DDA:359E57:4B11C2:6A5519D8 |
| html-safe-nonce | 253e4a67d08b559b628998cb4dd284a9760326954f249d6633c0cfc1a9eff7f6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzA2OjM5MEREQTozNTlFNTc6NEIxMUMyOjZBNTUxOUQ4IiwidmlzaXRvcl9pZCI6IjI0MTY4NzcxNzEyNTM3Nzg5MDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 250934d24965e6146e097c3cd92e090f089aaf4f2f1953b476394c84991f20e3 |
| hovercard-subject-tag | issue:1549039490 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/18976/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e21817aba2d616c4d8ed59fc349d175f64fb544b11a20214b25032554376e802/PowerShell/PowerShell/issues/18976 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e21817aba2d616c4d8ed59fc349d175f64fb544b11a20214b25032554376e802/PowerShell/PowerShell/issues/18976 |
| og:image:alt | Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kborowinski |
| hostname | github.com |
| expected-hostname | github.com |
| None | 682d273eacb2ac51680c6eb9c0b270f029f7ce74c32090f319083c34497e28a5 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b6d37c6470adadff4194742daaab9a817cc4980 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width