-
Notifications
You must be signed in to change notification settings - Fork 697
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
Don't require targetversion to be latest for Class Libraries #2397
Comments
@jevansaks @llongley any ideas why 19H1 is required ? |
Agree that the check for class libraries could be different. This check is serving two purposes:
Now for class libraries the #2 check still needs to be there, but perhaps the Windows SDK we require can be lowered? I think if someone can suggest a fix here that covers all the various project types we would be happy to accept it. @dotMorten is there a challenge in having your class library target the 18362 SDK? |
I prefer keeping min and max version the same. This to avoid having to ensure we don't call APIs that aren't supported on that platform. If I don't need the latest features, why enable them? I don't really get your second point. Why is it confusing to not see APIs that you can't call on the version you're targeting? It's way more confusing to see your app crash on an older PC because we called an API not available on that device. |
The problem is that the WinUI metadata has types it references that weren't introduced until a later version of the Windows SDK. You will get a bizarre compiler error about not being able to resolve types if you disable the check and target too old of a Windows SDK. |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
I’m ok with closing this |
Describe the bug
When building a class library, the target version should not matter, as long as it's at least minversion. That check should only apply to app projects.
This check is done here and should have a condition for class libraries to ignore it (or check that target is at least minversion):
microsoft-ui-xaml/build/NuSpecs/MUXControls-Nuget-Common.targets
Lines 16 to 18 in 8f8cd0f
Steps to reproduce the bug
Expected behavior
Build succeeds
Actual behavior
Build error:
Version Info
2.3.191211002
The text was updated successfully, but these errors were encountered: