CommunityToolkit / Microsoft.Toolkit.Win32

ARCHIVE - This repository contained XAML Islands wrapper controls and tooling for XAML Islands with WinUI 2, see readme for more info about XAML Islands with WinUI 3 and the WindowsAppSDK.
https://aka.ms/windowsappsdk
Other
383 stars 89 forks source link

Will not compile with target winskd 18362.1 #260

Closed eowarren625 closed 4 years ago

eowarren625 commented 4 years ago

I believe the problem is in the following file/line: File: Microsoft.UI.Xaml>targets Line 18: Current: Condition="$(MicrosoftUIXamlTargetPlatformCheckValue) < 18362" /> Should be Condition="$(MicrosoftUIXamlTargetPlatformCheckValue) > 18362" />

When I make the change noted above it will compile on my system.

EOW

ghost commented 4 years ago

Hello eowarren625, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

michael-hawker commented 4 years ago

@marb2000 @ocalvo ideas on what this is about?

marb2000 commented 4 years ago

@eowarren625 I need more information, What does not compile and what scenario?

eowarren625 commented 4 years ago

Microsoft Visual Studio Enterprise 2019 Version 16.5.4

I am trying to follow the example provided here:

https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/host-custom-control-with-xaml-islands

Create a WPF project -Done and working

In the NuGet Package Manager window, make sure that Include prerelease is selected.

Select the Browse tab, search for the Microsoft.Toolkit.Wpf.UI.XamlHost package (version v6.0.0 or later), and install the package. This package provides everything you need to use the WindowsXamlHost control to host a UWP control, including other related NuGet packages.

Note

Windows Forms apps must use the Microsoft.Toolkit.Forms.UI.XamlHost package (version v6.0.0 or later).

Define a XamlApplication class in a UWP app project

Open the App.xaml file and replace the contents of this file with the following XAML. Replace MyUWPApp with the namespace of your UWP app project.

XML

Copy <xaml:XamlApplication x:Class="MyUWPApp.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:xaml="using:Microsoft.Toolkit.Win32.UI.XamlHost" xmlns:local="using:MyUWPApp"> </xaml:XamlApplication> Open the App.xaml.cs file and replace the contents of this file with the following code. Replace MyUWPApp with the namespace of your UWP app project.

C#

Copy namespace MyUWPApp { public sealed partial class App : Microsoft.Toolkit.Win32.UI.XamlHost.XamlApplication { public App() { this.Initialize(); } } } Delete the MainPage.xaml file from the UWP app project.

Clean the UWP app project and then build it.

-------------------------------------------------here is the point of failure--------

**This generates the following error:

Severity Code Description Project File Line Suppression State Error Microsoft.UI.Xaml nuget package requires TargetPlatformVersion >= 10.0.18362.0 (current project is -1)

Since I have targeted 18362 and have 18362.1 install this should passs but the file: Microsoft.UI.Xaml.targets is testing for &lt rather that &gt. on line 18

--------------------------------------------------------------------------------------------------------------**------------ Target Version: Windows 10, version 1903 (10.0 Build 18362) Min Version: Windows 10, version 1903 (10.0 Build 18362)

Installed Windows Software Development Kit- 10.0.18362.1

I hope this provides enough details to help resolve the issue.

ghost commented 4 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 4 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 4 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 4 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

michael-hawker commented 4 years ago

@marb2000 can you investigate the steps provided? It seems like a pretty straight-forward setup?

ghost commented 4 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

michael-hawker commented 4 years ago

@marb2000 is this enough information for you to take a look?

eowarren625 commented 4 years ago

I have provided all the information and detail I can. If cannot resolve with what I have posted mark as completed. I have found a work around, just thought I could help resolve a simple issue.

ghost commented 4 years ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

marb2000 commented 4 years ago

@eowarren625 thanks for opening this issue. We updated the XamlHost packages with a new version: 6.11.

Did this fix your issue?

ocalvo commented 4 years ago

Xaml Islands version 1 in only supported in Windows 10 1909 and above.

Version 1903 (Windows 10 build 18362) is not supported unfortunately.

We plan to support 1903 in an upcoming release of WinUI 3.

marb2000 commented 4 years ago

Hey @ocalvo!

XAML Islands v1 is supported in Windows 10 1903, codename 19H1. We plan to support 1809 (codename RS5) and 1803 (RS4) in WinUI 3. Sometimes it's easy to use the codenames instead of numbers. 😉

marb2000 commented 4 years ago

I have tested the issue and it disappears with the 6.1.1 update.