Skip to content
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

Can open any XAML window at design time. #4593

Closed
1 of 24 tasks
dmitrybv opened this issue Nov 23, 2020 · 11 comments
Closed
1 of 24 tasks

Can open any XAML window at design time. #4593

dmitrybv opened this issue Nov 23, 2020 · 11 comments
Labels
area/solution-templates Categorizes an issue or PR as relevant to the solution template difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools

Comments

@dmitrybv
Copy link

dmitrybv commented Nov 23, 2020

Current behavior

Created simple UnoApp
and started to change MainPage.xaml
After I try to change View type from UWP to to something else
https://platform.uno/docs/articles/Assets/quick-start/xaml-intellisense.png
I got error - ‘Empty path name is not legal’

And design window disappeared.
So now I can' open any XAML window at design time.
It always displays an error ‘Empty path name is not legal’

sshot-158

Expected behavior

How to reproduce it (as minimally and precisely as possible)

Workaround

Environment

Nuget Package:

  • Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
  • Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
  • Uno.SourceGenerationTasks
  • Uno.UI.RemoteControl / Uno.WinUI.RemoteControl
  • Other:

Nuget Package Version(s):

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Skia
    • WPF
    • GTK (Linux)
    • Tizen
  • Windows
  • Build tasks
  • Solution Templates

IDE:

  • Visual Studio 2017 (version: )
  • Visual Studio 2019 (version: Version 16.9.0 Preview 1.0)
  • Visual Studio for Mac (version: )
  • Rider Windows (version: )
  • Rider macOS (version: )
  • Visual Studio Code (version: )

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

@dmitrybv dmitrybv added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Nov 23, 2020
@jeromelaban jeromelaban added project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools area/solution-templates Categorizes an issue or PR as relevant to the solution template and removed triage/untriaged Indicates an issue requires triaging or verification labels Nov 23, 2020
@MartinZikmund
Copy link
Member

This is unfortunately an ongoing bug in Visual Studio (see here, closed as fixed, not really fixed completely yet). Maybe we should raise a new issue there to make sure they don't forget about it.

Try to use this workaround to see if it helps. It is also possible to right-click the XAML file, choose Open with... and then use a plain XML editor. However, IntelliSense is lost this way...

@dmitrybv
Copy link
Author

The XAML editor may be empty
The XAML editor may be empty when the active editor project is not UWP.

To work around this issue, close all XAML editors, open a C# file and select 'UWP' in the top left drop-down list of the text editor sector. Once selected, re-open the XAML file

This workaround works. Thanks.

@radutomy
Copy link

radutomy commented Nov 23, 2020

@dmitrybv Same problem here. Where is the top left drop-down list exactly? I can't seem to find it.

@dmitrybv
Copy link
Author

sshot-159

@MartinZikmund
Copy link
Member

I have opened a new VS feedback for this here, please upvote to get their attention 🙂

@jeromelaban
Copy link
Member

jeromelaban commented Nov 24, 2020

The editor also fails for other reasons, I also opened this issue, It's aggregated in this Uno issue #982.

@GF-Huang
Copy link

GF-Huang commented Jan 5, 2021

The XAML editor may be empty
The XAML editor may be empty when the active editor project is not UWP.

To work around this issue, close all XAML editors, open a C# file and select 'UWP' in the top left drop-down list of the text editor sector. Once selected, re-open the XAML file

This workaround works. Thanks.

Not work.

@jeromelaban
Copy link
Member

Note that Visual Studio 16.9 Preview 2 fixes parts of this issue, and Preview 3 is likely to fix it completely.

@mddifilippo89
Copy link

As a work around simply right click the xaml page and choose Open With > Html Editor > Set as Default

@RichieSams
Copy link

Confirmed that Preview 3 fixed this issue for me

@jeromelaban jeromelaban added the difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. label Feb 15, 2021
@MartinZikmund
Copy link
Member

This is now working well :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/solution-templates Categorizes an issue or PR as relevant to the solution template difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools
Projects
None yet
Development

No branches or pull requests

7 participants