Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Don't warn for UWP TargetVersion on Class Libraries #10368

Closed
dotMorten opened this issue Apr 17, 2020 · 0 comments · Fixed by #10713
Closed

[Bug] Don't warn for UWP TargetVersion on Class Libraries #10368

dotMorten opened this issue Apr 17, 2020 · 0 comments · Fixed by #10713
Labels
e/1 🕐 1 in-progress This issue has an associated pull request that may resolve it! p/UWP t/bug 🐛
Milestone

Comments

@dotMorten
Copy link
Contributor

dotMorten commented Apr 17, 2020

Description

When building a class library targeting a versin lower than 17763, but still above the min version of 14393, you get an unnecessary build warning:

Warning Xamarin.Forms recommends TargetPlatformVersion >= 10.0.17763.0 (current project is 17134) C:\Microsoft\Xamarin\NuGet\xamarin.forms\4.5.0.356\build\Xamarin.Forms.targets 199

This is coming from here:

<Warning
Text="Xamarin.Forms recommends TargetPlatformVersion &gt;= 10.0.17763.0 (current project is $(MicrosoftUIXamlTargetPlatformCheckValue))"
Condition="$(MicrosoftUIXamlTargetPlatformCheckValue) &lt; 17763" />

This warning has no use for class libraries and should only apply to application projects. Only thing required here is that we stay within the minversion.

Steps to Reproduce

  1. Create a UWP Class library and reference Forms.
  2. Target a version below 10.0.17763 but at least 10.0.14393
  3. Build.

Expected Behavior

No warning is generated

Actual Behavior

Build Warning about target version being too low.

Basic Information

  • Version with issue: 4.5
  • Last known good version: N/A
  • IDE: VS2019 16.5
  • Platform Target Frameworks:
    • UWP: 17134
  • Nuget Packages: Xamarin.Forms 4.5.*
  • Affected Devices:

Workaround

The targets file doesn't seem to have a variable you can set to skip the version check.
However would be better if the warning was only done for app projects.

@dotMorten dotMorten added s/unverified New report that has yet to be verified t/bug 🐛 labels Apr 17, 2020
@samhouts samhouts added p/UWP e/1 🕐 1 and removed s/unverified New report that has yet to be verified labels Apr 17, 2020
dotMorten added a commit to dotMorten/Xamarin.Forms that referenced this issue May 15, 2020
@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label May 28, 2020
@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
PureWeen pushed a commit to dotMorten/Xamarin.Forms that referenced this issue Sep 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e/1 🕐 1 in-progress This issue has an associated pull request that may resolve it! p/UWP t/bug 🐛
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants