Closed ZGHHGZ closed 1 year ago
Are you using a shared project?
Yes
When I double click UI in xaml desingner , visual studio tell me that is error, it couldn't creat events, sometimes visual studio will breakdown when I double click。
This is a problem on Visual Studio side. Not something that Uno controls. However, the new templates no longer use a shared project, so in the new templates you will be able to create the event normally.
How can I use the new templates ?
@Youssef1313 Is it the next version ?
If you are creating a project from scratch, the latest -dev
solution template packages should have the new project structure.
If you have an existing project, you probably need to manually migrate to the new structure.
@jeromelaban Do we have any documentation for moving from shared project to class lib?
I couldn't find the latest -dev solution template packages . This is newest version(4.7.37) in Visual Studio 2022
This is indeed an issue on Visual Studio's side caused by Shared Projects that we cannot fix for UWP applications. It is resolved when building WinAppSDK applications, using our latest template.
If you want to stay on UWP, you may also try to create a cross-targeted library: And move all the XAML files from the "shared project" to that new project, then reference it from the other heads.
Current behavior
Expected behavior
No response
How to reproduce it (as minimally and precisely as possible)
No response
Workaround
No response
Works on UWP/WinUI
Yes
Environment
Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia, Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia, Uno.SourceGenerationTasks, Uno.UI.RemoteControl / Uno.WinUI.RemoteControl
NuGet package version(s)
No response
Affected platforms
Windows
IDE
No response
IDE version
Visual Studio 2022 17.5.0 Preview6.0
Relevant plugins
No response
Anything else we need to know?
I want creat event in UWP project