question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SDK installer leaves empty directories so it appears that an older SDK is still installed

See original GitHub issue

Describe the bug

I had VS 2019.6.0 Preview 4.0 installed. I ran the VS installer & upgraded tp 2019.6.0 Preview 5.0 Remnants of the previous 015115 that were not properly removed make it look like that SDK is still installed.

The entry in “Control Panel/Programs and Features” is gone, it is just the empty directories

To Reproduce

Per the bug description…

Further technical details

C:\Program Files\dotnet\sdk>dir
 Volume in drive C is Windows
 Volume Serial Number is 463F-F727

 Directory of C:\Program Files\dotnet\sdk

04/30/2020  03:57 PM    <DIR>          .
04/30/2020  03:57 PM    <DIR>          ..
01/16/2020  12:38 PM    <DIR>          2.1.803
04/30/2020  02:47 PM    <DIR>          3.1.300-preview-015115
04/30/2020  03:57 PM    <DIR>          3.1.300-preview-015135
01/16/2020  12:38 PM    <DIR>          NuGetFallbackFolder
               0 File(s)              0 bytes
               6 Dir(s)  501,579,292,672 bytes free

C:\Program Files\dotnet\sdk>dir 3.1.300-preview-015115 /s
 Volume in drive C is Windows
 Volume Serial Number is 463F-F727

 Directory of C:\Program Files\dotnet\sdk\3.1.300-preview-015115

04/30/2020  02:47 PM    <DIR>          .
04/30/2020  02:47 PM    <DIR>          ..
04/30/2020  02:47 PM    <DIR>          Sdks
               0 File(s)              0 bytes

 Directory of C:\Program Files\dotnet\sdk\3.1.300-preview-015115\Sdks

04/30/2020  02:47 PM    <DIR>          .
04/30/2020  02:47 PM    <DIR>          ..
04/30/2020  02:47 PM    <DIR>          Microsoft.NET.Sdk.Razor
               0 File(s)              0 bytes

 Directory of C:\Program Files\dotnet\sdk\3.1.300-preview-015115\Sdks\Microsoft.NET.Sdk.Razor

04/30/2020  02:47 PM    <DIR>          .
04/30/2020  02:47 PM    <DIR>          ..
04/24/2020  07:38 AM    <DIR>          tools
               0 File(s)              0 bytes

 Directory of C:\Program Files\dotnet\sdk\3.1.300-preview-015115\Sdks\Microsoft.NET.Sdk.Razor\tools

04/24/2020  07:38 AM    <DIR>          .
04/24/2020  07:38 AM    <DIR>          ..
04/30/2020  02:47 PM    <DIR>          netcoreapp3.0
               0 File(s)              0 bytes

 Directory of C:\Program Files\dotnet\sdk\3.1.300-preview-015115\Sdks\Microsoft.NET.Sdk.Razor\tools\netcoreapp3.0

04/30/2020  02:47 PM    <DIR>          .
04/30/2020  02:47 PM    <DIR>          ..
               0 File(s)              0 bytes

     Total Files Listed:
               0 File(s)              0 bytes
              14 Dir(s)  501,579,292,672 bytes free
C:\Program Files\dotnet\sdk>dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.300-preview-015135
 Commit:    0b3c572e97

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18363
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.1.300-preview-015135\

Host (useful for support):
  Version: 3.1.2
  Commit:  916b5cba26

.NET Core SDKs installed:
  2.1.803 [C:\Program Files\dotnet\sdk]
  3.1.300-preview-015115 [C:\Program Files\dotnet\sdk]
  3.1.300-preview-015135 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
terrajobstcommented, May 1, 2020

@pranavkm @Pilchie

@Pilchie this is likely something the installer folks need to investigate. However, dotnet/installer doesn’t show up as an option in the issue transfer list. Do you know why that might be? @terrajobst has been working on getting permissions set up for that. @marcpopMSFT in the meantime.

Should be fixed now

0reactions
KalleOlaviNiemitalocommented, Aug 20, 2021

Upgrading .NET SDK from 6.0.100-preview.6.21355.2 to 6.0.100-preview.7.21379.14 likewise left an empty directory.

PS C:\WINDOWS\system32> dotnet --list-sdks
2.1.525 [C:\Program Files\dotnet\sdk]
6.0.100-preview.6.21355.2 [C:\Program Files\dotnet\sdk]
6.0.100-preview.7.21379.14 [C:\Program Files\dotnet\sdk]
PS C:\WINDOWS\system32> dir 'C:\Program Files\dotnet\sdk'


    Directory: C:\Program Files\dotnet\sdk


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         11.8.2021     14.40                2.1.525
d-----         18.8.2021      2.50                6.0.100-preview.6.21355.2
d-----         18.8.2021      2.48                6.0.100-preview.7.21379.14
d-----         11.8.2021     14.40                NuGetFallbackFolder


PS C:\WINDOWS\system32> dir 'C:\Program Files\dotnet\sdk\6.0.100-preview.6.21355.2\'
PS C:\WINDOWS\system32> rd 'C:\Program Files\dotnet\sdk\6.0.100-preview.6.21355.2'
PS C:\WINDOWS\system32> dotnet --list-sdks
2.1.525 [C:\Program Files\dotnet\sdk]
6.0.100-preview.7.21379.14 [C:\Program Files\dotnet\sdk]
Read more comments on GitHub >

github_iconTop Results From Across the Web

SDK installer leaves empty directories so it appears that an ...
SDK installer leaves empty directories so it appears that an older SDK is still installed #7368. Open. MarkStega opened this issue on Apr ......
Read more >
Android studio- "SDK tools directory is missing"
Fix: uncheck Hide Obsolete Packages, then check the mentioned package and install it - C:\Users..\AppData\Local\Android\Sdk\tools\bin is created ...
Read more >
Unable to locate the .NET SDK: The Reasons - Hamid Mosalla
Navigate to C:\Program Files\dotnet\sdk and see if you can find folders associated with different sdk versions. If you can't find any folder ......
Read more >
The SDK 'Microsoft.NET.Sdk' specified could not be found. ...
It just shows an empty solution explorer but when I manually add files to explorer it complains about non-exiting SDK file which makes...
Read more >
nRF Toolchain Manager - Installs only C:\ncs ...
It showed successful install but the folder C:\ncs\v2.2.0 has been left empty so when I select it in NCS Visual Code it gives...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found