You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure you are able to repro it on the latest version
Search the existing issues.
Steps to reproduce
Trying to publish module with dependency on other module via Publish-Module -Path xxx -NuGetApiGey yyy
Getting error:
ValidateAndGet-RequiredModuleDetails: The property 'Name' cannot be found on this object. Verify that the property exists.
Publish-Module is able to publish module with dependencies.
Actual behavior
Publish-Module returns error "ValidateAndGet-RequiredModuleDetails: The property 'Name' cannot be found on this object. Verify that the property exists." when publishing module with dependencies
Error details
get-errorException : Type : System.Management.Automation.PropertyNotFoundException ErrorRecord : Exception : Type : System.Management.Automation.ParentContainsErrorRecordException Message : The property 'Name' cannot be found on this object. Verify that the property exists. HResult : -2146233087 CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException FullyQualifiedErrorId : PropertyNotFoundStrict InvocationInfo : ScriptLineNumber : 8112 OffsetInLine : 13 HistoryId : 2 ScriptName : C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1 Line : $RequiredModuleDetails += @{ Statement : $RequiredModuleDetails += @{ Name=$_.Name MinimumVersion=$_.Version } PositionMessage : At C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:8112 char:13 + $RequiredModuleDetails += @{ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PSScriptRoot : C:\program files\powershell\7\Modules\PowerShellGet PSCommandPath : C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1 CommandOrigin : Internal ScriptStackTrace : at ValidateAndGet-RequiredModuleDetails, C:\programfiles\powershell\7\Modules\PowerShellGet\PSModule.psm1: line 8112 at Get-ModuleDependencies, C:\programfiles\powershell\7\Modules\PowerShellGet\PSModule.psm1: line 1935 at Publish-PSArtifactUtility, C:\programfiles\powershell\7\Modules\PowerShellGet\PSModule.psm1: line 5923 at Publish-Module<Process>, C:\programfiles\powershell\7\Modules\PowerShellGet\PSModule.psm1: line 10990 at <ScriptBlock>, <No file>: line 1 TargetSite : Name : CheckActionPreference DeclaringType : [System.Management.Automation.ExceptionHandlingOps] MemberType : Method Module : System.Management.Automation.dll Message : The property 'Name' cannot be found on this object. Verify that the property exists. Data : System.Collections.ListDictionaryInternal Source : System.Management.Automation HResult : -2146233087 StackTrace : at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exceptionexception) at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, ObjectinputToProcess) at System.Management.Automation.CommandProcessorBase.Complete()CategoryInfo : NotSpecified: (:) [], PropertyNotFoundExceptionFullyQualifiedErrorId : PropertyNotFoundStrictInvocationInfo : ScriptLineNumber : 8112 OffsetInLine : 13 HistoryId : 2 ScriptName : C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1 Line : $RequiredModuleDetails += @{ Statement : $RequiredModuleDetails += @{ Name=$_.Name MinimumVersion=$_.Version } PositionMessage : At C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:8112 char:13 + $RequiredModuleDetails += @{ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PSScriptRoot : C:\program files\powershell\7\Modules\PowerShellGet PSCommandPath : C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1 CommandOrigin : InternalScriptStackTrace : at ValidateAndGet-RequiredModuleDetails, C:\programfiles\powershell\7\Modules\PowerShellGet\PSModule.psm1: line 8112 at Get-ModuleDependencies, C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:line 1935 at Publish-PSArtifactUtility, C:\programfiles\powershell\7\Modules\PowerShellGet\PSModule.psm1: line 5923 at Publish-Module<Process>, C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:line 10990 at <ScriptBlock>, <No file>: line 1
Environment data
$PSVersionTable
Name Value
---------
PSVersion 7.4.5
PSEdition Core
GitCommitId 7.4.5
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
PS Core 7.4.5
Visuals
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
Steps to reproduce
Trying to publish module with dependency on other module via Publish-Module -Path xxx -NuGetApiGey yyy
Getting error:
ValidateAndGet-RequiredModuleDetails: The property 'Name' cannot be found on this object. Verify that the property exists.
Seems that problem is in PSModule.psm1:8112:
variable $_ seems not to have value. Instead, there should be something like:
Expected behavior
Publish-Module is able to publish module with dependencies.
Actual behavior
Publish-Module returns error "ValidateAndGet-RequiredModuleDetails: The property 'Name' cannot be found on this object. Verify that the property exists." when publishing module with dependencies
Error details
Environment data
Version
PS Core 7.4.5
Visuals
No response
The text was updated successfully, but these errors were encountered: