We’re attempting to utilize Service Workers in our MVC project to send push notifications to the browser. At this point in development, we need to install the web-push package to generate a public key that will allow us to authenticate the API calls.
When attempting to install the Web Push package in the console, it returns two separate error messages that state the ‘Project’ parameter is null and appears to be sourced under the Entity Framework section of the project.
The error:
install web-push -g
Initialize-EFConfiguration : Cannot bind argument to parameter ‘Project’ because it is null.
At C:UsersUserDesktopProjectsProjectpackagesEntityFramework.6.2.0toolsinstall.ps1:3 char:28
- Initialize-EFConfiguration $project
-
~~~~~~~~
- CategoryInfo : InvalidData: (:) [Initialize-EFConfiguration], ParameterBindingValidationException
- FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Initialize-EFConfiguration
Add-EFProvider : Cannot bind argument to parameter ‘Project’ because it is null.
At C:UsersUserDesktopProjectsProjectpackagesEntityFramework.6.2.0toolsinstall.ps1:4 char:16
- Add-EFProvider $project ‘System.Data.SqlClient’ ‘System.Data.Entity.S …
-
~~~~~~~~
- CategoryInfo : InvalidData: (:) [Add-EFProvider], ParameterBindingValidationException
- FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Add-EFProvider
Now my question is how do I ‘Add-EFProvider’ and ‘Initialize-EFConfiguration’ and if it is indeed missing, regenerate the ‘Project’ param?
I’ve read other discussions where null parameters such as ‘Path’ were missing but none of which had ‘Initialize-EFConfiguration’ or ‘Add-EFProvider’ as the fully qualified error.
Based on discussions where others have had some success I’ve done the following:
- Updated and/or downgraded Entity Framework to version 6.2
- Built/Rebuilt project and solution
- Restarted Visual Studio
Having had similar issues like this in the past, it’s usually come down to installing the package at the wrong project level inside the solution, which at times can make it unreachable thus surfacing errors like this. I, however, am not the original developer of this project, so before I make any unnecessary changes that could jeopardize it, hopefully someone could shed some light on the matter first.
Dillon F is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.