Skip to content

Warning on unsupported tfms#15072

Merged
nohwnd merged 3 commits into
microsoft:rel/17.14from
nohwnd:warning-on-unsupported-tfms
May 22, 2025
Merged

Warning on unsupported tfms#15072
nohwnd merged 3 commits into
microsoft:rel/17.14from
nohwnd:warning-on-unsupported-tfms

Conversation

@nohwnd

@nohwnd nohwnd commented May 22, 2025

Copy link
Copy Markdown
Member

Description

Write warning when attempting to restore on an unsupported TFM (that is netcoreapp net5, net6, net7 and netstandard).

image

Fix #15069

@Youssef1313 Youssef1313 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I just wonder if buildMultiTargeting/Microsoft.NET.Test.Sdk.props is split to buildMultiTargeting/net462/Microsoft.NET.Test.Sdk.props and buildMultiTargeting/net8.0/Microsoft.NET.Test.Sdk.props, are we going to get warning/error by NuGet for free? (if not, can you open an issue to NuGet in case it's a bug on their side? - in that case, I'm fine with us implementing the warning/error ourselves)

Comment thread src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.nuspec
Comment thread src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.targets
@nohwnd nohwnd merged commit 8a7b327 into microsoft:rel/17.14 May 22, 2025
nohwnd added a commit to nohwnd/vstest that referenced this pull request May 22, 2025
* Add warning when restoring old TFM

* revert

* Revert "revert"

This reverts commit 81c7638.
@Varorbc

Varorbc commented May 29, 2025

Copy link
Copy Markdown

can you open an issue to NuGet in case it's a bug on their side?

@Youssef1313 @nohwnd I have opened a issue and they are currently investigating.

nohwnd added a commit that referenced this pull request Jun 5, 2025
* Warning on unsupported tfms (#15072)

* Add warning when restoring old TFM

* revert

* Revert "revert"

This reverts commit 81c7638.

* Make the warning error, and restore previous props so we attempt to run (#15078)

* Make the warning error, and restore previous props so we get errors when user suppresses

* Update src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.nuspec

* Correct file count, because we are adding more props

* Wrong edit
Comment on lines +30 to +33
<file src="netstandard2.0\Microsoft.NET.Test.Sdk.targets" target="buildMultiTargeting\netcoreapp2.0\" />
<file src="netstandard2.0\Microsoft.NET.Test.Sdk.targets" target="build\netcoreapp2.0\" />
<file src="netstandard2.0\Microsoft.NET.Test.Sdk.targets" target="buildMultiTargeting\netstandard2.0\" />
<file src="netstandard2.0\Microsoft.NET.Test.Sdk.targets" target="build\netstandard2.0\" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@nohwnd Can you please revisit this?

I think buildMultiTargeting isn't intended to have TFM-specific folders as it's for the outer build (before dispatching to inner builds that actually set the TFM)

This was referenced Jul 21, 2025
This was referenced Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants