-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Steps to reproduce
- Create empty Version directory in C:\Program Files\dotnet\shared\Microsoft.NETCore.App\ that is between the base-version of the target framework of the decompiled assembly (in my case 8.0.0) and the currently installed version (in my case 8.0.8). In my case a version directory for v8.0.2 and v8.0.5 were already there. It seemes they were left over by an update of dotnet.
- decompile an assembly of mentioned framework, click on References and select a net assembly e.g. System.Runtime
- Output shows
Error: Could not find reference: System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Error message shown
Details
- Product in use: ILSpy and ICSharpCode.Decompiler nuget package
- Version in use: ILSpy and Nuget both v8.2.0.7535
Same behaviour happens if I'll try to find System.Runtime with the class DotNetCorePathFinder. If I remove the empty version folder the problem disappears. Of course it is easy to delete said empty folders, but it would be nice to be safe in case future updates of dotnet do the same thing again. I'm not sure why these folders exist for me since the only issue I found regarding this problem is older and closed but they also mentioned that most consumers were made more resilliant so maybe just no one notices? I think an easy and safe solution is simply to filter empty folders out on this line. What do you think?
