Skip to content

Warning on unsupported tfms #15072

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 22, 2025

Conversation

nohwnd
Copy link
Member

@nohwnd nohwnd commented May 22, 2025

Description

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

image

Fix #15069

Copy link
Member

@Youssef1313 Youssef1313 left a comment

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)

@nohwnd nohwnd merged commit 8a7b327 into microsoft:rel/17.14 May 22, 2025
7 checks passed
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
Copy link

Varorbc commented May 29, 2025

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
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)

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.

4 participants