-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Ngen DLLs generates "Failed to load type token" and "Failed to load method token" #16261
Comments
@KevinH-MS Does this make any sense? We do embed IBC data, but the errors you're showing doesn't imply to me that we have bad data there, but rather than ngen isn't able to find our dependencies properly in your setup. |
It sounds like the ngen logs are from a machine that has a different/newer version of the .NET Framework than we trained on back when 1.3 was released. We don't plan to retrain/re-release those packages, and we only embed IBC data that matches the VS configuration that the binaries are intended to target. What sort of scenario is this in service of? I assume it has nothing to do with VS, because if you did have VS installed, these binaries should already be ngen'ed. If this is not a product scenario where you might have to exist SxS with a VS installation, then one option to avoid JIT'ing might be to just strip the IBC data from the assembly and "fully" ngen everything on the target machine. |
@KevinH-MS, thanks for the prompt response. Based on your comment "It sounds like the ngen logs are from a machine that has a different/newer version of the .NET Framework than we trained on back when 1.3 was released.", does this mean that if I updated 1.3 to 2.0, the error will go away? You also mentioned that another option would be to strip the IBC data from the assembly. How would I go about doing this? |
2.0 may indeed work better for you. |
@KevinH-MS, 2.0 is still a preview release. Is there an ETA on a stable release? |
OK, I will try the 2.0 approach and see if that resolves the issue. I will close this issue for now an re-open if necessary. |
I am trying to generate native assemblies using Ngen on a root assembly that has dependency on Microsoft.CodeAnalysis and Microsoft.CodeAnalysis.CSharp. I am seeing some errors below and have reached out the Ngen team. While the native assemblies Microsoft.CodeAnalysis.ni.dll and Microsoft.CodeAnalysis.CSharp.ni.dll are generated, Ngen team has indicated that having these errors will impact performance. We are generating native binaries to improve performance, so resolving these errors is critical for us. Your help will be greatly appreciated.
Version Used: Microsoft.CodeAnalysis, Version=1.3.1.0 and Microsoft.CodeAnalysis.CSharp, Version=1.3.1.0
Steps to Reproduce:
Expected Behavior:
Native assemblies for Microsoft.CodeAnalysis.ni.dll and Microsoft.CodeAnalysis.CSharp.ni.dll should be generated without error messages.
Actual Behavior:
Lots of messages for many object types are generated for these 2 DLLs, e.g.:
Suggested fix:
I engaged the help from Ngen team and their response is as follows:
"If your team owns Microsoft.Codeanalysis.CSharp.dll, please talk to the people responsible for doing the build, and ask them to re-run IBC data generation procedure. This is usually a post-build optimization step, which runs some typical apps that use this DLL, and collect profiling data. Each team does this procedure a little differently, but hopefully the build team in your group knows how to do it. If this assembly came from another team, you’ll need to talk to its owner."
Kindly see if you can fix this soon.
The text was updated successfully, but these errors were encountered: