WinUI 3 xaml ABI.Microsoft.UI vs Microsoft.UI

Viewed 451

I'm trying to use WinUI (3) for the first time. I've followed the instructions at https://docs.microsoft.com/en-us/windows/apps/winui/winui3/#install-winui-3-preview-4 so installed vs 2019 preview (Professional Version 16.9.0 Preview 4.0) and installed the "WinUI 3 Project Templates via the Manage Extensions option. Created a new solution, added project type "Blank app, Packaged (WinUI in desktop)" (C#) and this is the result: SolutionExplorer

I can start debugging and the window opens and can click the example button without any issues.

But when I open the xaml I have this issue: xaml choice

And the intellisense doesn't give options like for example grid.

The imported namespaces in the code behind: codebehind

So all the basics of a new WINUI project on a clean vs 2019 preview installation. I've only installed Resharper and imported my settings from my regular vs 2019 installation (which I reset but to no avail).

When I choose for Microsoft.UI.Xaml.Window he changes the xaml to xamlMicrosoft

And gives following errors: errorsMicrosoft

When choosing ABI.Microsoft.UI.Xaml.Window the xaml changes in the same way as before but also gives exceptions on other properties like "The property 'HorizontalAlignment' was not found in type 'StackPanel'".

No idea if this matters but as I've never worked with WPF I don't have experience with xaml (always worked with winforms as frontend). So I also added a WPF project to this solution and this worked without any issue.

I can't find anything regarding this so please help me set my first steps in WINUI.

1 Answers

I've notificed it worked for a few seconds after reopening my solution. So prime suspect was Resharper. Disabled it, and problem is solved. Re-enabled it, updated to 2020.3.2 and it worked.

So lesson here: It's not because you just installed Resharper, that it also downloads the latest version ...

Related