DNX beta8-15530:无法加载文件或程序集“Microsoft.DNX.PackageManager”

15

我已经在程序包管理器控制台中运行了此命令以升级dnx。

"dnvm upgrade -u default"

更新后,我可以在(C:\Users\Chandrasekar.dnx\runtimes)目录下看到以下提到的新运行时版本。

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

我正在使用VS2015创建新的项目--> ASPNET 5 Web应用程序,但出现了一些错误。

enter image description here

在输出窗口中,您可以看到错误信息“Could not load 'Microsoft.DNX.PackageManager'”,根据这个公告,它已经被重命名为'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文件或软件吗?

工具: Microsoft Visual Studio Enterprise 2015 版本14.0.23107.0


你是否有名为WEBPROJ_ENABLEBETA7RENAMES的环境变量?如果有,请删除它并重新加载 VS,然后再试一次,看看是否可以解决问题。 - Kiran
和 OP 一样的问题,日志也很相似。我没有 WEBPROJ_ENABLEBETA7RENAMES,除非是 VS2015 在某种程度上添加了它。这个错误只在 VS2015 中出现;从命令行中运行它可以正常工作。 - Matt DeKrey
@KiranChalla 我还没有添加那个环境变量。我已经重启了VS和电脑很多次,但是没有希望。我还漏掉了其他什么吗? - Chandrasekar Kesavan
@MattDeKrey 有没有办法在VS2015中解决这个问题? - Chandrasekar Kesavan
还在寻找答案,@Chandru!如果我找到了,我一定会发布一个答案。 - Matt DeKrey
3个回答

12

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

20711存在一个错误,因为它尝试加载 Microsoft.DNX.PackageManager ,实际上应该是 Microsoft.Dnx.Tooling 。

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

请查看公告。


1
请确保按照完整的安装说明进行操作 - 这是两个单独的安装程序!(再次感谢@VictorHurdugaci!) - Matt DeKrey
谢谢Victor Hurdugaci,我将更新Web Tools 2015(Beta6)- Visual Studio 2015。我需要多久检查和更新此工具,因为到目前为止我没有收到任何更新Web工具的通知?我需要在某个地方注册以获取新版本的通知吗? - Chandrasekar Kesavan
谢谢Victor。安装了最新版本的Web工具后,一切都正常运行。 - Chandrasekar Kesavan
我也试过了,我使用的是Beta 7版本。https://www.microsoft.com/en-us/download/confirmation.aspx?id=48738 - Marksl

5

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接