Update sourcebuild configuration to build net previous and net current#4856
Update sourcebuild configuration to build net previous and net current#4856Evangelink merged 14 commits intomicrosoft:mainfrom
Conversation
|
Capturing a conversation @Evangelink and I had offline. The reported prebuilts are implicitly loaded by the SDK. Since the projects are now targeting NetPrevious, these packages are not available in the source-build graph and thus reported as a prebuilt. With the suggestion I provided in #4856 (comment), it would be acceptable to add these as allowed prebuilts in the SourceBuildPrebuiltBaseline.xml because these are only referenced in CI and not the actual product build. |
Co-authored-by: Michael Simons <msimons@microsoft.com>
| targeting NetCurrent or NetPrevious hence we must produce both. | ||
| --> | ||
| <PropertyGroup Condition=" '$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildFromSourceFlavor)' != 'Product' "> | ||
| <TargetFrameworks>$(NetPrevious);$(NetCurrent)</TargetFrameworks> |
There was a problem hiding this comment.
Even when looking at the PR description I don't understand why vstest needs to build NetPrevious under source-build when not building the product. Why is that?
There was a problem hiding this comment.
Because we insert in both net8 and net9 and it's causing some insertion. That's the solution recommended by @MichaelSimons.
There was a problem hiding this comment.
This issue is that the dependent repos (e.g. SDK) target different TFM depending on the version. Therefore to support the repo level source-builds, this repo has to target multiple TFMs. This pattern is used in other repos like roslyn.
Fair feedback regarding documentation/tracability.
ViktorHofer
left a comment
There was a problem hiding this comment.
This change seems to have regressed the source-build product build: dotnet/installer#18457.
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>net6.0</TargetFramework> | ||
| <TargetFrameworks>net6.0</TargetFrameworks> |
There was a problem hiding this comment.
nit: This regresses perf as TargetFrameworks kicks-off an inner build from the outer build, even though the project is actually single-targeting. I would revert this change and instead find a better pattern in Directory.Build.props to override the TFM for source-build.
There was a problem hiding this comment.
If you have some easy suggestion, I am happy to apply otherwise I fear that's not going to be a priority for me given the other tasks I have on my shoulders at the moment.
There was a problem hiding this comment.
I couldn't find any easy trick to unset TargetFramework and replace it with TargetFrameworks in case of source build.
…t current (microsoft#4856)" This reverts commit 98c26a1.
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [Microsoft.NET.Test.Sdk](https://togithub.com/microsoft/vstest) | `17.9.0` -> `17.10.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>microsoft/vstest (Microsoft.NET.Test.Sdk)</summary> ### [`v17.10.0`](https://togithub.com/microsoft/vstest/releases/tag/v17.10.0) #### What's Changed - Add missing runtimeconfig.json file for 8.0 by [@​MarcoRossignoli](https://togithub.com/MarcoRossignoli) in [https://github.com/microsoft/vstest/pull/4792](https://togithub.com/microsoft/vstest/pull/4792) - Localized file check-in by OneLocBuild Task: Build definition ID 1222: Build ID [`2338548`](https://togithub.com/microsoft/vstest/commit/2338548) by [@​dotnet-bot](https://togithub.com/dotnet-bot) in [https://github.com/microsoft/vstest/pull/4794](https://togithub.com/microsoft/vstest/pull/4794) - Disable testhost prestart by [@​nohwnd](https://togithub.com/nohwnd) in [https://github.com/microsoft/vstest/pull/4833](https://togithub.com/microsoft/vstest/pull/4833) - Terminal logger fixes by [@​nohwnd](https://togithub.com/nohwnd) in [https://github.com/microsoft/vstest/pull/4834](https://togithub.com/microsoft/vstest/pull/4834) - Add RiscV64 by [@​nohwnd](https://togithub.com/nohwnd) in [https://github.com/microsoft/vstest/pull/4838](https://togithub.com/microsoft/vstest/pull/4838) - Add deterministic source mapping storing for Microsoft.CodeCoverage by [@​jakubch1](https://togithub.com/jakubch1) in [https://github.com/microsoft/vstest/pull/4849](https://togithub.com/microsoft/vstest/pull/4849) - Fix terminal logger encoding & error by [@​nohwnd](https://togithub.com/nohwnd) in [https://github.com/microsoft/vstest/pull/4853](https://togithub.com/microsoft/vstest/pull/4853) - Update sourcebuild configuration to build net previous and net current by [@​Evangelink](https://togithub.com/Evangelink) in [https://github.com/microsoft/vstest/pull/4856](https://togithub.com/microsoft/vstest/pull/4856) - Updating version of Microsoft.VisualStudio.Interop to 17.10 by [@​MSLukeWest](https://togithub.com/MSLukeWest) in [https://github.com/microsoft/vstest/pull/4866](https://togithub.com/microsoft/vstest/pull/4866) - Add VSTEST_DIAG_VERBOSITY to help by [@​nohwnd](https://togithub.com/nohwnd) in [https://github.com/microsoft/vstest/pull/4882](https://togithub.com/microsoft/vstest/pull/4882) - Fix feature flag name by [@​nohwnd](https://togithub.com/nohwnd) in [https://github.com/microsoft/vstest/pull/4885](https://togithub.com/microsoft/vstest/pull/4885) - Improve terminal logger by [@​nohwnd](https://togithub.com/nohwnd) in [https://github.com/microsoft/vstest/pull/4877](https://togithub.com/microsoft/vstest/pull/4877) - Remove PackageLicenseFile preventing PackageLicenseExpression from working by [@​lahma](https://togithub.com/lahma) in [https://github.com/microsoft/vstest/pull/4890](https://togithub.com/microsoft/vstest/pull/4890) - Add GitHub Actions logger by [@​martincostello](https://togithub.com/martincostello) in [https://github.com/microsoft/vstest/pull/4906](https://togithub.com/microsoft/vstest/pull/4906) - Ensure to send a session complete event by [@​drognanar](https://togithub.com/drognanar) in [https://github.com/microsoft/vstest/pull/4878](https://togithub.com/microsoft/vstest/pull/4878) - specify Win10 + maxversiontested to enable xaml APIs to be used in tests running under testhost.exe by [@​ChrisGuzak](https://togithub.com/ChrisGuzak) in [https://github.com/microsoft/vstest/pull/4888](https://togithub.com/microsoft/vstest/pull/4888) - Make VSTest repo buildable in VMR non-source-build by [@​ViktorHofer](https://togithub.com/ViktorHofer) in [https://github.com/microsoft/vstest/pull/4920](https://togithub.com/microsoft/vstest/pull/4920) - Migrate pipelines by [@​nohwnd](https://togithub.com/nohwnd) in [https://github.com/microsoft/vstest/pull/4921](https://togithub.com/microsoft/vstest/pull/4921) - Add test name to MSBuild where we have frame. by [@​nohwnd](https://togithub.com/nohwnd) in [https://github.com/microsoft/vstest/pull/4935](https://togithub.com/microsoft/vstest/pull/4935) - \[rel/17.10] Add list of known TestingPlatform dlls by [@​nohwnd](https://togithub.com/nohwnd) in [https://github.com/microsoft/vstest/pull/4982](https://togithub.com/microsoft/vstest/pull/4982) And many infrastructure related changes and updates. #### New Contributors - [@​ellahathaway](https://togithub.com/ellahathaway) made their first contribution in [https://github.com/microsoft/vstest/pull/4785](https://togithub.com/microsoft/vstest/pull/4785) - [@​MSLukeWest](https://togithub.com/MSLukeWest) made their first contribution in [https://github.com/microsoft/vstest/pull/4866](https://togithub.com/microsoft/vstest/pull/4866) - [@​lahma](https://togithub.com/lahma) made their first contribution in [https://github.com/microsoft/vstest/pull/4890](https://togithub.com/microsoft/vstest/pull/4890) - [@​ChrisGuzak](https://togithub.com/ChrisGuzak) made their first contribution in [https://github.com/microsoft/vstest/pull/4888](https://togithub.com/microsoft/vstest/pull/4888) **Full Changelog**: microsoft/vstest@v17.9.0...v17.10.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/apollographql/subgraph-csharp-hotchocolate-annotation). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Description
Update sourcebuild configuration so we generate both net previous and net current to help with multi-insertion (today we insert both in net8 and net9). The fix is based on my understand of this comment dotnet/sdk#37983 (comment) but it's possible we will have to do a few iterations to have it all right.
Related issue
This should be fixing dotnet/sdk#37983