【问题标题】:DNX beta8-15530 : Could not load file or assembly 'Microsoft.DNX.PackageManager'DNX beta8-15530:无法加载文件或程序集“Microsoft.DNX.PackageManager”
【发布时间】:2015-09-01 11:05:20
【问题描述】:

我已在包管理器控制台中运行此命令来升级 dnx。

"dnvm upgrade -u default"

一旦更新,我可以看到(C:\Users\Chandrasekar.dnx\runtimes)新的运行时版本,如下所述

"dnx-clr-win-x86.1.0.0-beta8-15530"  

我开始在 VS2015 中创建新项目 --> ASPNET 5 Web 应用程序最终出现一些错误。

在输出窗口中,您可以看到错误“无法加载'Microsoft.DNX.PackageManager'”,根据announcement,它已重命名为'Microsoft.Dnx。 Tooling' 所以我的问题是为什么新的 DNX beta 8 版本仍然依赖于这个删除或重命名的 DLL 'Microsoft.DNX.PackageManager'

输出窗口错误:

PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git
C:\Users\Chandrasekar\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8-15530\bin\dnx.exe "C:\Users\Chandrasekar\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8-15530\bin\lib\Microsoft.DNX.PackageManager\Microsoft.DNX.PackageManager.dll" restore "C:\Users\Chandrasekar\Documents\Visual Studio 2015\Projects\DNX8\src\DNX8" -f "C:\Program Files (x86)\Microsoft Web Tools\DNU"
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DNX.PackageManager' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.DNX.PackageManager'
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at Microsoft.Dnx.Runtime.Loader.LoadContext.Load(AssemblyName assemblyName)
   at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, FrameworkName targetFramework)
   at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, FrameworkName targetFramework)
   at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, FrameworkName targetFramework)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

你能帮我解决这个问题吗?我需要更新任何 dll 或软件吗?

工具: 微软 Visual Studio 企业版 2015 版本 14.0.23107.0

【问题讨论】:

  • 你是否碰巧有一个名为WEBPROJ_ENABLEBETA7RENAMES的环境变量?..如果是这样删除它并重新加载VS并重试,看看它是否解决了问题。
  • 与 OP 相同的问题,类似的日志。我没有 WEBPROJ_ENABLEBETA7RENAMES,除非 VS2015 以某种方式添加它。此错误仅在 VS2015 中出现;从命令行可以正常工作。
  • @KiranChalla 我没有添加那个环境变量。我重新启动了VS和计算机很多次都没有希望。我还缺少其他东西吗?
  • @MattDeKrey 在 VS2015 中有没有办法解决这个问题
  • 仍在寻找自己,@Chandru!如果我找到答案,我一定会发布答案。

标签: visual-studio-2015 asp.net-core dnx dnvm coreclr


【解决方案1】:

您使用的不是最新的工具版本。您的版本可能是 14.0.20711.0,而最新版本是 14.0.20723.0。

20711 有一个错误,因为它试图加载实际上是 Microsoft.Dnx.Tooling 的 Microsoft.DNX.PackageManager。

获取最新版本:http://www.microsoft.com/en-us/download/details.aspx?id=48222

this 公告。

【讨论】:

  • 确保遵循完整的安装说明 - 这是两个独立的安装程序! (再次感谢@VictorHurdugaci!)
  • 感谢 Victor Hurdugaci,我将更新 Web Tools 2015 (Beta6) – Visual Studio 2015。我需要多久检查一次并更新此工具,因为直到现在我还没有收到任何更新我的通知网络工具?我是否需要在哪里注册才能获得新版本的通知?
  • 谢谢维克多。安装最新版本的 Web Tool 后一切正常。
  • 也为我工作。我用的是 Beta 7。microsoft.com/en-us/download/confirmation.aspx?id=48738
【解决方案2】:

让我突出显示 - 我倾向于忘记。这是 Beta 8:

Microsoft ASP.NET and Web Tools 2015 (Beta8) – Visual Studio 2015

然后搜索所有这些 - 如果名称没有改变,RC1 很快就会出现;)

Search results for Microsoft ASP.NET and Web Tools on Microsoft.com

【讨论】:

    【解决方案3】:

    对于 RC1,Microsoft ASP.NET and Web Tools 2015 (RC) – Visual Studio 2015 页面下的下载有很多选择,我缺少的是 WebToolsExtensionsVS14.msi。安装参考后得到修复并且包能够恢复。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-17
      相关资源
      最近更新 更多