Fixes: [AB#2014670](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2014670)
### Description
A change was made in 8.0.2xx to register MSBuildSdkResolver for NGEN (#17732), against both devenv.exe and MSBuild.exe. Later a bug was found in the way MSBuild.exe loads the resolver so the change was reverted in 8.0.3xx (#19112). However, because the change had a measurable positive perf effect, the revert was effectively a regression for devenv.exe and got flagged so by PerfDDRITs.
This PR is a re-do of the original change, only this time with MSBuild.exe omitted, i.e. we're NGENing the resolver only for the default architecture of devenv.exe.
### Customer Impact
Startup perf regression, about 5% more methods JITted in scenarios measured by Visual Studio PerfDDRITs.
### Regression
Yes, perf regression in VS 17.10.
### Risk
Low
This reverts commit f0c4e4e14c.
Fixes [AB#1994786](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1994786/)
The MSBuild change which took advantage of this was reverted in 17.9 because it introduced issues in installations that don't have the .NET SDK component installed. We are fixing the bug in 9.0 by making changes to the dependencies of `Microsoft.DotNet.MSBuildSdkResolver` (see https://github.com/dotnet/sdk/pull/39573) so this should stay in main. I am reverting it only in 8.0.3xx / 17.10 to fix the `Build_Ngen_InvalidAssemblyCount` counter which was flagged as a regression by PerfDDRITs.
Backport of #17732 to release/8.0.2xx
MSBuild.exe currently spends a significant amount of time JITting `Microsoft.DotNet.MSBuildSdkResolver` and its dependencies, see https://github.com/dotnet/msbuild/issues/9303 for details.
This PR makes Visual Studio installer add these assemblies to the NGEN queue, which is a necessary condition for eliminating JITting. Just like `Microsoft.Build.*` assemblies, we need to NGEN these with two configurations: vsn.exe so it works in the devenv process, and MSBuild.exe so it works in MSBuild satellite processes.
The hard links are causing issues with package tooling.
This changes to use symbolic links instead.
Besides fixing the issues with the package tooling,
symbolic links are easier to preserve throughout
the packaging process.
- Cherry pick the internal runtime download changes over
- Cherry pick changes to the arcade SB template over (making the next update a noop and unblocking P7+)
- Hoist out the variable groups and parameters needed for the internal download to the top level yaml file.
- Remove the old DownloadFile task and replace this with the Arcade version. Specifically this allows us to remove
set/use of the DOTNETCLIMSRC_READ_SAS_TOKEN environment variable and instead rely on that task's ability to decode and
use a base64 encoded SAS token. The reason for the environment variable usage before was that the
non-encoded SAS token was getting mangled by msbuild/bash/etc. on non-Windows OSs.
- Update the source build tarball template with support for internal runtimes
Update to source build template
- The stage has been subsumed by the aka.ms functionality and now can be removed.
- Clean up dead properties and functionality no longer needed because of it.
- Removing publishing of nupkg files as blobs. This used to be useful before because we often needed to get at the nupkgs in a flat, easy to copy format for pushing to the VS feed. But now the staging pipeline takes care of this, and moreover the use of post-build signing means that these files are not useful straight out of the build anyway. This should reduce publishing time and some post-build signing time.
Remove nupkg install in publishing.props