Reasons and solutions for Visual Studio 2015 not being able to do package restore

Source: Internet
Author: User
Tags windows 7 x64

This article is recorded on my current computer, and installing Visual Studio Community Edition does not issue a package restore and is likely to fail to reproduce on your computer. My environment is

1.Windows 7 x64

2. Visual Studio 2013 is already installed

3. DNVM and DNX have been installed by hand

Problem phenomenon:

To better understand and learn about the latest features such as ASP. NET 5, MVC 6, visual Studio Community Edition is installed on the current computer. Prior to installation, it was confirmed that it could be run in parallel with the current visual Studio 2013 (Side by Side).

After the installation of the default settings, start Visual Studio 2015, create a simplest application, but cannot compile through, look at the Output window, get the following error message

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\chenxizhang\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta7\bin\dnx.exe "C:\Users\chenxizhang\.dnx\runtimes\ Dnx-clr-win-x86.1.0.0-beta7\bin\lib\microsoft.dnx.packagemanager\microsoft.dnx.packagemanager.dll "Restore" c \ Users\chenxizhang\documents\visual Studio 2015\projects\consoleapp1\src\consoleapp1 "-S" C:\Program Files (x86) \ Microsoft Web Tools\dnu "
System.IO.FileNotFoundException:Could not load file or assembly ' Microsoft.DNX.PackageManager ' or one of its dependen Cies. 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].

Look at this error message because the Package Manager component in the corresponding DNX (runtime) could not be found. Is it true? There are several runtime installed on my computer at the moment (note that this is my own manual installation, prior to doing other experiments.) Visual Studio 2015 also installs its own DNVM and corresponding DNX during installation)



Visual Studio 2015 defaults to calling the latest version of runtime (currently 1.0.0-beta 7) and attempting to use it for package Restore. I found the corresponding directory to see, really did not Microsoft.DNX.PackageManager this folder.

But oddly, earlier versions (for example, 1.0.0-beta 5) did exist for this directory and the corresponding DLL

Solution Solutions

It is not clear why Beta7 has this problem, but to solve this problem, the first time to use Beta 5 I think it is acceptable

For the sake of brevity, we can also remove the other runtime, leaving only Beta5. This will not require each project to be set up.

Of course, I believe that after the official release of 1.0.0, these problems can be solved

Reasons and solutions for Visual Studio 2015 not being able to do package restore

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.