Nuget软件包管理器更新3.1.1.0已损坏 [英] Nuget package manager update 3.1.1.0 broken

查看:81
本文介绍了Nuget软件包管理器更新3.1.1.0已损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Nuget软件包管理器更新为版本3.1.1.0.更新打开后,任何项目都会给我错误消息: 复制项目:找不到路径'c:\ users {用户名} \ documents \ visual studio 2015 \ projects {项目名称} \ packages \ Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0 \ tools \ lib \ net45'不存在 ..... 在文件init.ps1

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}\documents\visual studio 2015\projects{project name}\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\tools\lib\net45' because it does not exist ..... in file init.ps1

我发现赋予init.ps1的$ installpath变量在附加的\ tools子目录名称中与旧的nuget有所不同,这显然是错误的,并给出了错误.

I found $installpath variable given to init.ps1 differs from old nuget to actual in additionally appended \tools subdirectory name, which is obviously wrong and gives the error.

我如何影响此$ installpath参数或将nuget降级到3.1.0?

How can I influence this $installpath parameter or downgrade nuget to 3.1.0?

我也在全新安装的虚拟机中再次检查了此行为,结果相同,安装了VS->确定,更新到nuget 3.1.1->损坏.

I double-checked this behaviour also in a fresh installed vm with the same result, VS installed -> ok, update to nuget 3.1.1 -> broken.

环境:Windows 10德语版,Visual Studio 2015社区版英语版

Environment: Windows 10 German, Visual Studio 2015 Community Edition English

推荐答案

不知道这是否对其他人有帮助,但是我在VS2015上遇到了与Microsoft.CodeDom.Providers.DotNetCompilerPlatform完全相同的错误,而对我而言修复的问题是在Package Manager控制台中执行以下操作:

Not sure if this will help others, but I got the exact same error on VS2015 with Microsoft.CodeDom.Providers.DotNetCompilerPlatform and what fixed it for me was to do the following in the Package Manager Console:

Update-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform

然后,保存,关闭并重新打开VS后,不再出现错误.无需为我编辑任何ps1文件.

Then after saving, closing and reopening VS, no more errors. No need to edit any ps1 files for me.

FWIW.

这篇关于Nuget软件包管理器更新3.1.1.0已损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆