Skip to content

RequiredModules manifest property stopped working recently (noticed in daily build) #8204

@bergmeister

Description

@bergmeister

This issue started only in the last few days using the daily build and does not happen with 6.1 or 6.1-preview.
Calling Import-Module on a module that declares RequiredModules = @('C:\full\path\to\manifest.psd1'), causes loading of it to fail. A specific example of such a manifest is here but even if I change it to just one dependent module with a full path, it still happens, therefore I think the issue is generic to any manifest. with RequiredModules

Steps to reproduce

Import-Module $PathToManifestThatDeclaresRequiredModules

Expected behavior

Imports dependent modules

Actual behavior

Throws because it fails to import dependent modules.

Import-Module : The required module 'C:\Users\cberg\git\posh-profile\source\dotnetCli\dotnetCli.psd1' is not loaded. Load the module or remove the module from 'RequiredModules' in the file 'C:\Users\cberg\git\posh-profile\source\posh-profile.psd1'.

Loading the dependent module works fine but an Import-Module of the main module fails again with the same error

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.2.0-preview.864
PSEdition                      Core
GitCommitId                    6.2.0-preview.864
OS                             Microsoft Windows 10.0.17134
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

Labels

Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-Cmdlets-Corecmdlets in the Microsoft.PowerShell.Core module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions