msbuild
msbuild copied to clipboard
ngen arm64 binaries as arm64
Fixes an issue we've had with our arm64 MSBuild binaries not being ngen'd for arm64.
Notes
This brought up a question, how does ngen
work cross-platform? Our msbuild binaries mostly reference what's in bin/
, but if we're on an arm64 machine and we reference what's in bin/
, don't those need to be ngen'd for arm64?
We're supposed to have arm64 bits on non-arm machines too, right? So then would this mean they wouldn't be ngen'd for that scenario? Is the decision here that arm64 bits are most important on arm machines, so if there's a VS setup issue, we should prioritize arm-on-arm for now?
isn't ngen deprecated? PublishAot with OutputType=Library (default) gets you native share lib on windows, linux and mac. some os/architectures don't support aot, there fallback to PublishReadyToRun for libraries and PublishSingleFile for executable.
isn't ngen deprecated?
ngen is the best JIT-reduction/AOT technology available on .NET Framework 4.8, which is relevant to MSBuild because it's what Visual Studio, one of our major partners, uses.
In the .NET SDK on .NET 6/7, we use the newer crossgen approach.
Testing this here: https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=6707696&view=results if it gets to the VS PR stage with no issues then we can merge this
@BenVillalobos, looks like you hit a missing optprof data issue. You presumably have to retarget where you're getting your data from the same way we did for main.
I kicked off a separate pipeline build with the right data, but didn't notice the release failed. Kicked another one and that seems to be moving forward: https://dev.azure.com/devdiv/DevDiv/_releaseProgress?_a=release-pipeline-progress&releaseId=1395478
Relevant PR: https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/426628
Passed RPS, this should be good to go.