-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
IL2008: System.Diagnostics.FileVersionInfo: Could not resolve type 'System.SR'. #102303
Comments
Tagging subscribers to this area: @tommcdon |
By chance I found the issue: I had a call to Assembly.GetExecutingAssembly().Location in my code. I replaced it with AppContext.BaseDirectory and the issue went away. Still, is there a way the Linker could generate a better warning here? |
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas |
The problem is that It's safe to ignore or suppress this warning. It's a harmless bug in the authoring. |
This should be fixed. |
…blish time Fixes dotnet#96539. Fixes dotnet#102303. Two possible approaches were discussed in dotnet#96539 but doing it in illinker feels more straightforward.
Fixes #102303. * Set a default value for the feature switch * Make it possible to preinitialize the static constructor * Fix generation of substitutions XML * Update SR.vb to match SR.cs * Fix resources in System.Diagnostics.FileVersionInfo.csproj @dotnet/illink
I'm trying to trim my application and get this warning:
It's unclear to me what the linker is complaining about and how I can fix this. There isn't even a hint to where I use FileVersionInfo. I can't find any reference to it in my solution, so it must be further down the call-stream.
It would be great if the ILLinker could pinpoint me to the source.
The text was updated successfully, but these errors were encountered: