Use package version properties for dependabot project during source build (#7798)
Use package version properties for dependabot project during source build (#7798)

Context
See dotnet/source-build#2933

Changes Made
During source-build, set PackageReferences to versions specified by their respective *Version properties (like SystemCodeDomVersion for example). Source-build will define and import properties for packages that are available during source-build.
Then, if any of the packages didn't have *Version properties set, set them to the dependabot-managed versions.
During a non-source-build build, these dependencies should all be set to their dependabot-managed versions, since none of these dependencies have versions properties defined in eng/Versions.props.
Testing
I tested the msbuild build locally by running ./build.sh on Linux. I also tested this commit in source-build locally and confirmed that packages in this file no longer report as prebuilts. Here is the prebuilt report from my local build.

msbuild-annotated-prebuilt-usage.txt

Notes
There is still the open question of if dependabot can read and update these dependencies with conditions in their PackageReferences. I spent too long trying to get dependabot to run locally with no luck. I dug into the source code at it appears they use a proper XML parsing library.

Here is where it looks for PackageReferences:
https://github.com/dependabot/dependabot-core/blob/8315e7b213870959158c1c2bcfb482728a7e801a/nuget/lib/dependabot/nuget/file_parser/project_file_parser.rb#L17-L21

Here is where it looks for the Version of each PackageReference: https://github.com/dependabot/dependabot-core/blob/8315e7b213870959158c1c2bcfb482728a7e801a/nuget/lib/dependabot/nuget/file_parser/project_file_parser.rb#L195
sean-gilliam/msbuild,rainersigwald/msbuild,AndyGerlicher/msbuild,sean-gilliam/msbuild,rainersigwald/msbuild,AndyGerlicher/msbuild,rainersigwald/msbuild,AndyGerlicher/msbuild,sean-gilliam/msbuild,AndyGerlicher/msbuild,rainersigwald/msbuild,sean-gilliam/msbuild