刚刚打开了VS 2015 Enterprise RTM,打开了一个现有的工作项目,得到以下错误:
Microsoft Visual Studio
'NuGetPackage‘程序包未正确加载。
该问题可能是由于配置更改或安装了另一个扩展而导致的。您可以通过检查文件C:\Users\REDACTED\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml
来获取更多信息。
重新启动Visual Studio可能有助于解决此问题。
是否继续显示此错误消息?
是
重新启动没有任何帮助。我检查了日志文件,发现了以下与nuget相关的部分:
<entry>
<record>555</record>
<time>2015/07/20 16:06:34.364</time>
<type>Error</type>
<source>Extension Manager</source>
<description>Extension will not be loaded because an extension with the same ID
'Microsoft.Dev14.VsixTemplatesPackage.443cca91-ec20-41e5-a165-f28e56b89650'
is already loaded at C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\
EXTENSIONS\G2URSPAC.VAZ\...</description>
<path>C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\
NUGETIFIEDEXTENSIBILITYTEMPLATES\</path>
</entry>
<entry>
<record>556</record>
<time>2015/07/20 16:06:34.364</time>
<type>Error</type>
<source>Extension Manager</source>
<description>Extension will not be loaded because an extension with the same ID
'Microsoft.VisualStudio.TeamFoundation.TeamExplorer.Extensions' is already
loaded at C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\
B1NUOYPH.H2N\...</description>
<path>C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\COMMONEXTENSIONS\
MICROSOFT\TEAMFOUNDATION\TEAM EXPLORER\</path>
</entry>
这可能会建议一个重复的扩展,但在扩展管理器中似乎不是这样。
这是在一台也安装了VS2013的机器上。它从来没有安装过任何VS2015的预览/RC版本。
发布于 2015-07-21 00:50:27
通过扩展和更新完全删除NuGet,重新启动VS,然后通过扩展和更新重新安装NuGet为我解决了这个问题。完全的VS重装是不必要的。
发布于 2015-09-09 13:54:14
将Nuget更新到最新版本似乎已经解决了这个问题。
发布于 2015-09-17 06:39:49
在从MSDN网站上完全干净地安装了Visual Studio Professional 2015之后,我以管理员身份运行VS2015,从Tools -> NuGet Package Manager... -> Package Manager Console
打开了包管理器控制台,我收到了这个错误:
"Windows PowerShell updated your execution policy successfully,
but the setting is overridden by a policy defined at a more
specific scope. Due to the override, your shell will retain its
current effective execution policy of Unrestricted.
Type "Get-ExecutionPolicy -List" to view your execution policy
settings. For more information please see "Get-Help Set-ExecutionPolicy"
通过执行上述步骤来
1)使用Tools -> Extensions and Updates...
卸载NuGet Package Manager for Visual Studio 2015
。
2)重启Visual Studio。
3)使用Tools -> Extensions and Updates...
重新安装 NuGet Package Manager for Visual Studio 2015
。
4)重启Visual Studio。
现在,当我打开包管理器控制台时,Powershell加载正确,一切正常。非常感谢你这么做!
https://stackoverflow.com/questions/31521438
复制相似问题