I'm encountering an error when opening my solution in Visual Studio. The Package Manager Console displays an error related to initializing the EntityFramework package.
Here are the details:
NuGet Package Manager settings:
Package Manager Console:
Each package is licensed to you by its owner. NuGet is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.
Package Manager Console Host Version 6.9.2.1
Type 'get-help NuGet' to see all available NuGet commands.
Test-ModuleManifest : The specified module 'E:\AIUB\ADVANCED PROGRAMMING WITH .NET
[A]\LAB\Asp.NET-Builds\Sp24_A\WebAPIAppLayer\packages\EntityFramework.6.4.4\tools\EntityFramework6.psd1' was not loaded because no valid module file was found in any module
directory.
At E:\AIUB\ADVANCED PROGRAMMING WITH .NET [A]\LAB\Asp.NET-Builds\Sp24_A\WebAPIAppLayer\packages\EntityFramework.6.4.4\tools\init.ps1:17 char:19
+ ... eToImport = Test-ModuleManifest (Join-Path $PSScriptRoot 'EntityFrame ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (E:\AIUB\ADVANCE...Framework6.psd1:String) [Test-ModuleManifest], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.TestModuleManifestCommand
Import-Module : Cannot bind argument to parameter 'Name' because it is null.
At E:\AIUB\ADVANCED PROGRAMMING WITH .NET [A]\LAB\Asp.NET-Builds\Sp24_A\WebAPIAppLayer\packages\EntityFramework.6.4.4\tools\init.ps1:33 char:19
+ Import-Module $moduleToImport
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Import-Module], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ImportModuleCommand
PM>
I have tried restarting VS multiple times and made sure of the existence of that package. global dotnet commands works in PMC, but I want the EF package related commands to work here
The solution I found to this was by manually importing the module using the following command:
Import-Module 'E:\AIUB\ADVANCED PROGRAMMING WITH .NET [A]\LAB\Asp.NET-Builds\Sp24_A\WebAPIAppLayer\packages\EntityFramework.6.4.4\tools\EntityFramework6.psd1'