-
Notifications
You must be signed in to change notification settings - Fork 365
Remove Default NgenArchitecture #15749
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
Remove Default NgenArchitecture #15749
Conversation
Remove default NgenArchitecture to allow 64-bit default to be used without generating unnecessary 32-bit images for 64-bit apps.
If |
@tmat If no |
In that case this project reference needs to be updated to set the architecture to 32 bit before we change the defaults: |
@tmat: I imagine this was already broken -- would that property have applied to stuff coming through a project reference anyways? |
Note Roslyn has a number of other places we set this, like: https://github.com/dotnet/roslyn/blob/024254813274b5e545585a73b766203c5d979dd7/eng/targets/VisualStudio.targets#L80 |
@tmat @jasonmalinowski This NGEN's InteractiveHost32.exe here: https://github.com/dotnet/roslyn/blob/024254813274b5e545585a73b766203c5d979dd7/src/Interactive/HostProcess/x86/InteractiveHost32.csproj#L27-L38 and according to NGEN logs, this is working; I don't see it show up in 64-bit logs, but I do see it show up in 32-bit logs. It's also passing the correct binding exe config (the 64-bit one for dependencies as called out in the code): 04/21/2025 18:28:34.801 [2208]: Executing command from offline queue: install "C:\VisualStudio\Common7\IDE\CommonExtensions\Microsoft\VBCSharp\LanguageServices\InteractiveHost\Desktop\Microsoft.NET.StringTools.dll" /NoDependencies /ExeConfig:"C:\VisualStudio\Common7\IDE\CommonExtensions\Microsoft\VBCSharp\LanguageServices\InteractiveHost\Desktop\InteractiveHost64.exe" /queue:3 Do note that the exe itself passes itself as the host:
|
Actually I'm wrong, misread the code. I'm not super convinced that 32-bit project code is doing anything other than NGEN'ing itself. The 64-bit seems to NGEN all the dependencies for both 32-bit and 64-bit and the logs seem to indicate that. I think this change will not break that step. |
@davkean Ah yes, looks good then and I think this is good to merge. |
Default NgenArchitecture being set to "All" causes VS to produce NGEN images for 32-bit products that don't exist, it causes 32-bit NGEN images to be created despite there being no 32-bit version of VS.
To double check: