Nuget package manager update 3.1.1.0 broken

前端 未结 5 1517
北海茫月
北海茫月 2020-12-30 01:05

I updated Nuget package manager to version 3.1.1.0. After the update opening any project gives me the error message: copy-item: cannot find path \'c:\\users{username}\\docum

5条回答
  •  清歌不尽
    2020-12-30 01:21

    I got the same error as well (as follows):

    Copy-Item : Cannot find path 'C:\Development\GitHub\pd-tech-demo\backend\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\tools\lib\net45' because it does not exist.
    At C:\Development\GitHub\pd-tech-demo\backend\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\tools\init.ps1:23 char:1
    + Copy-Item $libDirectory\* $binDirectory | Out-Null
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Development\...tools\lib\net45:String) [Copy-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand
    

    I changed line 10 of init.ps1 from:

    $libDirectory = Join-Path $installPath 'lib\net45'
    

    to:

    $libDirectory = Join-Path $installPath '..\lib\net45'
    

    which fixes the problem (only until you restore the package again and you get the broken version).

    The real fix is for the package maintainers to update their copy of init.ps1. I'll follow up and see if we can get that done. :)

提交回复
热议问题