-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module.ScopeName returns appname.dll
for single-file apps
#56519
Comments
Tagging subscribers to this area: @agocke, @vitek-karas, @VSadov Issue DetailsWhen published as a single file, this code prints class Program
{
public static void Main()
{
Console.WriteLine(typeof(Program).Assembly.GetModules()[0].ScopeName);
}
} It's unclear whether this is the correct behavior or just an oversight.
|
I think it is the correct behavior. ScopeName is meant to return the scope name from metadata, with no sugar coating. |
Is |
If we do not end up changing this behavior, I think the behavior change should maybe be on MetadataLoadContext (at the suppression in #56196) to produce a string different from |
Agree.
Roslyn uses the filename, including the suffix, for this by default. You can override the default using |
I'm going to close this as by-design. Changing these values now seems like low value without a motivating scenario. |
When published as a single file, this code prints
single-file.dll
.It's unclear whether this is the correct behavior or just an oversight.
Name
andFullyQualifiedName
both return<Unknown>
The text was updated successfully, but these errors were encountered: