aspnet/dnvm

fresh dnvm install fails on windows 7

Closed this issue · 4 comments

I have encountered an issue similar to #336. I followed the instructions to install DNVM, then ran dnvm list. It offered me to install a DNX, which I accepted.

C:\Users\aau02>dnvm list

Getting started
It looks like you don't have any runtimes installed. Do you want us to install a DNX to get you started?
[Y] Yes  [N] No  [?] Help (default is "Y"):
Determining latest version
Downloading dnx-clr-win-x86.1.0.0-beta7 from https://www.nuget.org/api/v2
Installing to C:\Users\aau02\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta7
Adding C:\Users\aau02\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta7\bin to process PATH
Adding C:\Users\aau02\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta7\bin to user PATH
Setting alias 'default' to 'dnx-clr-win-x86.1.0.0-beta7'

Active Version     Runtime Architecture OperatingSystem Alias
------ -------     ------- ------------ --------------- -----
  *    1.0.0-beta7 clr     x86          win

So far so good. Then, as suggested in the instructions, I attempted to install the x64 version, which failed with the reported error.

C:\Users\aau02>dnvm install -r coreclr -arch x64 latest -u
Determining latest version
Downloading dnx-coreclr-win-x64.1.0.0-rc1-15798 from https://www.myget.org/F/aspnetvnext/api/v2
Installing to C:\Users\aau02\.dnx\runtimes\dnx-coreclr-win-x64.1.0.0-rc1-15798
Move-Item : Access to the path 'C:\Users\aau02\.dnx\runtimes\temp\' is denied.
At C:\Users\aau02\.dnx\bin\dnvm.ps1:1461 char:17
+                 Move-Item $UnpackFolder $RuntimeFolder
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\Users\aau02\.dnx\runtimes\temp\:DirectoryInfo) [Move-Item], IOException
    + FullyQualifiedErrorId : MoveDirectoryItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand

Cannot find dnx-coreclr-win-x64.1.0.0-rc1-15798, do you need to run 'dnvm install 1.0.0-rc1-15798'?
At C:\Users\aau02\.dnx\bin\dnvm.ps1:1650 char:9
+         throw "Cannot find $runtimeFullName, do you need to run '$CommandName in ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Cannot find dnx...0.0-rc1-15798'?:String) [], RuntimeException
    + FullyQualifiedErrorId : Cannot find dnx-coreclr-win-x64.1.0.0-rc1-15798, do you need to run 'dnvm install 1.0.0-rc1-15798'?

I'm just guessing here but could it be because you aren't running powershell with as admin?

Access to the path 'C:\Users\aau02.dnx\runtimes\temp' is denied.

Try running a powershell as admin and then run your command again. Perhaps it will work then.

I attempted again and now it worked. That's weird because I ran that command as admin before. Actually, I was able to create and delete that directory manually without problems, and I was also able to install the DNVM and initial DNX without problems from the same console session.

I have this same problem. It's weird. If I close all the powershell session and reopen and run one. Sometimes it works and sometimes it won't. No clue whats going on

Running cmd as admin worked for me!