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

Strange behavior in v8.1.240821. #489

Closed
3 of 24 tasks
Petrarca181 opened this issue Aug 25, 2024 · 14 comments
Closed
3 of 24 tasks

Strange behavior in v8.1.240821. #489

Petrarca181 opened this issue Aug 25, 2024 · 14 comments

Comments

@Petrarca181
Copy link

Describe the bug

If I update Behaviors to v8.1.240821 "using CommunityToolkit.WinUI;" is not recognizable anymore only "using CommunityToolkit;"
Also updating Extensions to v8.1.240821 EnqueueAsync() is not found for DispatcherQueue.

How to fix this or I'm missing something?

Steps to reproduce

Fresh winui app ith toolkit.

Expected behavior

A in previous version?

Screenshots

No response

Code Platform

  • UWP
  • WinAppSDK / WinUI 3
  • Web Assembly (WASM)
  • Android
  • iOS
  • MacOS
  • Linux / GTK

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 10 21H2 (Build 19044)
  • Windows 10 22H2 (Build 19045)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Windows 10, version 2104 (Build 20348)
  • Windows 11, version 22H2 (Build 22000)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

No response

Visual Studio Build Number

No response

Device form factor

No response

Additional context

No response

Help us help you

No, I'm unable to contribute a solution.

@weya3
Copy link

weya3 commented Aug 26, 2024

I had happend the same problem;can't using the nameplace!!!

image
and I change the version to
image
Uploading image.png…

It is working
maybe the lastest version has some problems
but I also have problem in use dockpanel, the example code has fault
Failed to assign to property 'CommunityToolkit.WinUI.Controls.DockPanel.Dock'. [Line: 20 Position: 50]”

@fabianoriccardi
Copy link

Same here: the namespace CommunityToolkit.WinUI is not found on the v8.1.

@fabianoriccardi
Copy link

fabianoriccardi commented Aug 26, 2024

As from the release note you need to change the TargetFramework to build 22621.

I have tried to create a new app from scratch, install the CommunityToolkit.WinUI.Controls.Primitives, and it doesn't work until you change the TargetFramework in .csproj to:

<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>

The default version (19041) doesn't work.

@michael-hawker
Copy link
Member

@Petrarca181 can you confirm updating the TFM resolves your issue?

@Arlodotexe I know at one point there was an explicit warning message about this, but doesn't seem like it's showing up in some cases.

@Arlodotexe
Copy link
Member

Arlodotexe commented Aug 26, 2024

@Petrarca181 What are your TargetPlatformMinVersion (or SupportedOSVersion) and your TargetFramework set to in your project? One of those is 18363?

Linking CommunityToolkit/Tooling-Windows-Submodule#185, might be related.

@Petrarca181
Copy link
Author

@Petrarca181 can you confirm updating the TFM resolves your issue?

@Arlodotexe I know at one point there was an explicit warning message about this, but doesn't seem like it's showing up in some cases.

image

@Petrarca181
Copy link
Author

upd: targeting os to 26100 solved the problem.

@fabianoriccardi
Copy link

I can further elaborate on this issue (only apparently solved).

If you create a project from scratch, you just need to change the TFM as written in Release Notes. But in a more complex project, I cannot change the Target OS Version. If I try from the editor, it switches back to 19041. If I try to edit the csproj, it keeps showing 19041.
Is it an issue related to other dependencies?

@Arlodotexe
Copy link
Member

@fabianoriccardi Try changing your TFM with an editor other than visual studio, then open your project again. It shouldn't be reverting it.

@michael-hawker
Copy link
Member

Sergio had also mentioned issues with the MVVM Toolkit update and changes needed from the Windows SDK update, see that workaround here: CommunityToolkit/dotnet#923 (comment)

If anyone else had the TFM issue, but was still seeing issues and the above resolved this for them, please let us know. Thanks!

@michael-hawker
Copy link
Member

We determined another vector/aspect of this issue is if the <TargetFramework> isn't also updated to match the csproj TFM in the Publishing Profile xml file. It's important that you update/match the TFM in your csproj, the Windows SDK, and the publishing profile.

With that, I think this issue is resolved, so going to close and will follow-up with an issue in the WinUI repo.

@fabianoriccardi
Copy link

@fabianoriccardi Try changing your TFM with an editor other than visual studio, then open your project again. It shouldn't be reverting it.

Finally I had solved, there was messing properties in csproj and publish profile.

@DexrnZacAttack
Copy link

hmm I'm getting the same issue after updating the Windows App SDK and using 10.0.26100.0 SDK...

I also get The type 'Panel' is defined in an assembly that is not referenced. You must add a reference to assembly 'Uno.UI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'.
Before I updated all the nuget packages, I never used Uno.

@michael-hawker
Copy link
Member

@DexrnZacAttack if it's trying to load Uno then it's not using the right TFM and trying to fallback incorrectly. Please double-check the steps in the release notes and your configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants