diff --git a/doc/articles/uno-build-error-codes.md b/doc/articles/uno-build-error-codes.md index 96c4f85a513e..ac67e0358a7e 100644 --- a/doc/articles/uno-build-error-codes.md +++ b/doc/articles/uno-build-error-codes.md @@ -129,6 +129,18 @@ When building with Rider on Linux or macOS, unsupported target frameworks are [n See how to [make platforms conditional](xref:Uno.GettingStarted.CreateAnApp.Rider#considerations-for-macos-and-linux) for Rider. +### UNOB0015: The desktop TargetFramework must be placed first + +In Visual Studio 17.12 or later, when both mobile (`-ios`, `-android`, `-maccatalyst`) and `desktop` target frameworks are used, the `-desktop` target framework must be placed first in order for WSL debugging to work. + +If `-desktop` is not first, the following message will appear: + +```text +The project doesn't know how to run the profile with name 'MyApp (Desktop WSL2)' and command 'WSL2'. +``` + +To fix the issue, reorder the items in your `.csproj` so that `TargetFrameworks` contains `netX.0-desktop` as the first target framework. + ## Compiler Errors ### UNO0001 diff --git a/src/Uno.Sdk/targets/Uno.Sdk.After.targets b/src/Uno.Sdk/targets/Uno.Sdk.After.targets index 643b98a3e6b9..6c1290103c71 100644 --- a/src/Uno.Sdk/targets/Uno.Sdk.After.targets +++ b/src/Uno.Sdk/targets/Uno.Sdk.After.targets @@ -41,10 +41,23 @@ @@ -101,13 +116,34 @@ Text="The desktop TargetFramework must not be placed first in the TargetFrameworks property in order for other platforms debugging to work. (See https://aka.platform.uno/UNOB0011)" /> + + + + +