-
Notifications
You must be signed in to change notification settings - Fork 743
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
False-positive errors in XAML preview when Windows is not selected as target #8774
Comments
Note that the repro cannot work, since LiveChartsCore.SkiaSharpView.Uno references Uno.UI, not Uno.WinUI. LiveCharts can't yet be updated until mono/SkiaSharp#1787 is fixed. Make sure to validate with Uno.UI first. |
This happens for me as well. The project compiles. It is an Intellisense error only. Looks like there are some issues in Uno libraries that make Intellisense not work correctly. Lots of this type of errors happen. |
@lotrasoft that's correct, it's a Visual Studio issue that we've working with Microsoft to improve. If you select the Windows project in the top left selector in the XAML editor, this error should go away. |
This is curious. Where is the file located in your solution? In which project, specifically? |
@jeromelaban The Xaml file is located in the Shared project. And note that the WYSIWYG editor for XAML is also not available. |
It is expected that the designer is not available microsoft/microsoft-ui-xaml#5917, but the curious part is the missing top level bar. Can you try closing all the editor files, then close visual studio, then reopen the solution? |
Thanks for the update. Two things:
|
@muhammet484 make sure to select the |
do you mean this? I selected the windows already |
thanks it solved the problem. |
I would like to address this issue a little more. Let's say I'd like to build apps only for mobile platforms (Android/iOS) because I'm not interested in developing an app for other platforms. When I generate a new project from template using custom settings (just Android and iOS or just one of them as platforms), then this workaround doesn't work, because i cannot select "Windows" nor "UWP" from the projects dropdown. Is there anything known I can do with this? Every issue I've found pointed me to selecting "Windows" from the dropdown menu, which works if I generate a project also targetting that platform. |
@dallyh This is unfortunately true, we are using built-in XAML intellisense provided by Microsoft, which is only compatible with the Windows target. this causes the underlines in other cases. We were able to avoid these problems by implementing a custom IntelliSense provider in Visual Studio Code, but on VS 2022 this is a much more complex task. For now the recommendation is to include the Windows project there even if it is not going to be used as a production environment - it is useful for IntelliSense and even debugging. |
It would be useful if we could automatically detect that non-Windows target is selected when a |
Current behavior
Page
Background
asBackground="{ThemeResource ApplicationPageBackgroundThemeBrush}"
Wasm
asExpected behavior
It ought to work like on Windows Desktop.
How to reproduce it (as minimally and precisely as possible)
No response
Workaround
No response
Works on UWP/WinUI
Yes
Environment
Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia, Uno.UI.RemoteControl / Uno.WinUI.RemoteControl
NuGet package version(s)
Affected platforms
WebAssembly
IDE
No response
IDE version
Version 17.2.0
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: