【发布时间】: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