2

Whenever I open the package manager console in new VS 2017 session, it shows the below two error messages, and the for all intents and purposes operates normally. At least for vanilla commands like Install-Package.

Join-Path : Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'ChildPath'. Specified method is not supported.
At C:\Dev\.NET\Projects\AcmeSoft\Code\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\tools\init.ps1:13 char:57
+ ... rPackageDirectory = Join-Path $packageDirectory $compilerPackage.Name
+                                                     ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Join-Path], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.PowerShell.Commands.JoinPathCommand

and

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Dev\.NET\Projects\AcmeSoft\Code\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\tools\init.ps1:14 char:44
+ ... erPackageToolsDirectory = Join-Path $compilerPackageDirectory 'tools'
+                                         ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand

The offending line for the first is:

$compilerPackageDirectory = Join-Path $packageDirectory $compilerPackage.Name

with the error at $compilerPackage.Name (i.e. "char:57")

The offending line for the second is:

$compilerPackageToolsDirectory = Join-Path $compilerPackageDirectory 'tools'

with the error at $compilerPackageDirectory 'tools'.

Can anyone with more Nuget and or PowerShell skills than me explain why this is happening, and how I can fix it, please?

ProfK
  • 49,207
  • 121
  • 399
  • 775

0 Answers0