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

UWP could not creat envet #11267

Closed
ZGHHGZ opened this issue Feb 10, 2023 · 10 comments
Closed

UWP could not creat envet #11267

ZGHHGZ opened this issue Feb 10, 2023 · 10 comments
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification

Comments

@ZGHHGZ
Copy link

ZGHHGZ commented Feb 10, 2023

Current behavior

image
image

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

@ZGHHGZ ZGHHGZ added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Feb 10, 2023
@Youssef1313
Copy link
Member

Are you using a shared project?

@ZGHHGZ
Copy link
Author

ZGHHGZ commented Feb 10, 2023

Yes

@ZGHHGZ
Copy link
Author

ZGHHGZ commented Feb 10, 2023

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。

@Youssef1313
Copy link
Member

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.

@ZGHHGZ
Copy link
Author

ZGHHGZ commented Feb 10, 2023

How can I use the new templates ?

@ZGHHGZ
Copy link
Author

ZGHHGZ commented Feb 10, 2023

@Youssef1313 Is it the next version ?

@Youssef1313
Copy link
Member

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?

@ZGHHGZ
Copy link
Author

ZGHHGZ commented Feb 10, 2023

image

@ZGHHGZ
Copy link
Author

ZGHHGZ commented Feb 10, 2023

I couldn't find the latest -dev solution template packages . This is newest version(4.7.37) in Visual Studio 2022

@jeromelaban
Copy link
Member

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:
image
And move all the XAML files from the "shared project" to that new project, then reference it from the other heads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification
Projects
None yet
Development

No branches or pull requests

3 participants