Skip to content

Conversation

@Evangelink
Copy link
Member

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

@MichaelSimons
Copy link
Member

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.

@Evangelink Evangelink enabled auto-merge (squash) January 29, 2024 16:41
@Evangelink Evangelink disabled auto-merge January 29, 2024 18:24
@Evangelink Evangelink merged commit 98c26a1 into microsoft:main Jan 29, 2024
targeting NetCurrent or NetPrevious hence we must produce both.
-->
<PropertyGroup Condition=" '$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildFromSourceFlavor)' != 'Product' ">
<TargetFrameworks>$(NetPrevious);$(NetCurrent)</TargetFrameworks>
Copy link
Member

@ViktorHofer ViktorHofer Jan 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we insert in both net8 and net9 and it's causing some insertion. That's the solution recommended by @MichaelSimons.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find any easy trick to unset TargetFramework and replace it with TargetFrameworks in case of source build.

nohwnd added a commit to nohwnd/vstest that referenced this pull request Jan 31, 2024
@Evangelink Evangelink deleted the fix-source-build branch January 31, 2024 15:25
renovate bot referenced this pull request in apollographql/subgraph-csharp-hotchocolate-annotation May 22, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](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` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/Microsoft.NET.Test.Sdk/17.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Microsoft.NET.Test.Sdk/17.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Microsoft.NET.Test.Sdk/17.9.0/17.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Microsoft.NET.Test.Sdk/17.9.0/17.10.0?slim=true)](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
[@&#8203;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
[@&#8203;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
[@&#8203;nohwnd](https://togithub.com/nohwnd) in
[https://github.com/microsoft/vstest/pull/4833](https://togithub.com/microsoft/vstest/pull/4833)
- Terminal logger fixes by [@&#8203;nohwnd](https://togithub.com/nohwnd)
in
[https://github.com/microsoft/vstest/pull/4834](https://togithub.com/microsoft/vstest/pull/4834)
- Add RiscV64 by [@&#8203;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
[@&#8203;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
[@&#8203;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 [@&#8203;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
[@&#8203;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
[@&#8203;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 [@&#8203;nohwnd](https://togithub.com/nohwnd)
in
[https://github.com/microsoft/vstest/pull/4885](https://togithub.com/microsoft/vstest/pull/4885)
- Improve terminal logger by
[@&#8203;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 [@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;ViktorHofer](https://togithub.com/ViktorHofer) in
[https://github.com/microsoft/vstest/pull/4920](https://togithub.com/microsoft/vstest/pull/4920)
- Migrate pipelines by [@&#8203;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
[@&#8203;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
[@&#8203;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

- [@&#8203;ellahathaway](https://togithub.com/ellahathaway) made their
first contribution in
[https://github.com/microsoft/vstest/pull/4785](https://togithub.com/microsoft/vstest/pull/4785)
- [@&#8203;MSLukeWest](https://togithub.com/MSLukeWest) made their first
contribution in
[https://github.com/microsoft/vstest/pull/4866](https://togithub.com/microsoft/vstest/pull/4866)
- [@&#8203;lahma](https://togithub.com/lahma) made their first
contribution in
[https://github.com/microsoft/vstest/pull/4890](https://togithub.com/microsoft/vstest/pull/4890)
- [@&#8203;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>
This was referenced Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants