How to get original location of shadow-copied files
Open
area-networking
feature-iis
investigate
question
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
In dotnet/runtime#31127 you marked Assembly.CodeBase as obsolete and we should use Assembly.Location.
In the documentation to
https://learn.microsoft.com/en-us/dotnet/api/system.reflection.assembly.location?view=net-7.0
you can read that you should use CodeBase if the file has been shadow-copied.
The same problem exists with IIS serving a site from a network share. Then the DLL is also copied to the cache first.
What's the non obsolete method to get the original path of a DLL within a function inside the DLL without using an obsolete function?
Should the documentation be modified?
Contributor guide
Assessment
This issue has not been assessed yet.