unoplatform / uno

Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
https://platform.uno
Apache License 2.0
8.45k stars 685 forks source link

[VS] Single project - quickly switching targets and F5 causes error #16516

Open MartinZikmund opened 2 weeks ago

MartinZikmund commented 2 weeks ago

Current behavior

When I switch targets and F5 in quick succession, I get intermittent error in console:

1>Error: Cannot access a disposed object.
1>Object name: 'Microsoft.VisualStudio.ProjectSystem.ConfiguredProjectImpl'.

Second F5 works fine

Expected behavior

No error

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

No response

Workaround

Works on UWP/WinUI

None

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

No response

Affected platforms

No response

IDE

Visual Studio 2022

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

MartinZikmund commented 2 weeks ago

I guess this must be already tracked somewhere, if yes, feel free to close as dupe

jeromelaban commented 2 weeks ago

This is caused by:

  1. net8.0 must be first for WSL debugging to work
  2. net8.0 must be first for WebAssembly publishing/debugging to work
  3. net8.0-windows10 needs to be first for WinAppSDK Hot reload to work
ADD-David-Antolin commented 2 weeks ago

@jeromelaban notice they (bot) closed you the second one as duplicated of the first one.

jeromelaban commented 2 weeks ago

@ADD-David-Antolin yes we noticed, and it's known on the Microsoft side, it will be adjusted.