Open yeahg-dev opened 1 month ago
The Uno Platform extension provides its own tasks but otherwise it's VS Code that does the match up (between launch and tasks).
Can you attach a test case that demonstrate the issue ? and any other steps (like what's selected in the status bar). Thanks!
note: the mixup between net7.0 and net8.0 is weird
When Start Debug on not workspace, Uno Platforms's task run well. but on workspace, I think VScode can not find Uno Platform's task.
This is status bar selected.
on not workspace
on workspace
I uploaded the project to this repo. Please check it out
@yeahg-dev could you give a try at the latest version we published last friday?
@jeromelaban
Uno.WinUI 5.4.0-dev.1004
, But since I am using Uno.SDK 5.1.50
Conflict has occured. Uno.Sdk
with msbuild sdk
of csproj files. and specify version of WinUI
packages like this. Then the devices or simulator will not run.
Did I misunderstood "latest version we published last friday"?
or Is there any simple way to use `Uno.WinUI 5.4.0-dev.1004`(which is not compatible with Uno.SDK)? '
The commit applying the above mentioned attempt has been updated on the [repo](https://github.com/yeahg-dev/VSCodeWorkspaceTaskTest), so it would be good to refer to it
Thanks for the update, I should have been more specific. I wanted you to try out the latest Uno Platform VSCode extension to see if it helps. For the update, you may want to upgrade your solution to single project, which makes upgrading to newer version much easier.
Thanks! But It seems not fixed. still the same error is occuring
Thanks. Can you take a picture of your vscode, particularly the page that opens when viewing the options of the uno platform extension?
There is just no docs how to configure it right. But I figured out how
@jeromelaban Here is screen capture of VScode.
Uno Extension Settings - User
Uno Extension Settings - Workspace
And this is User Task Command Palette on Test workspace
There is just no docs how to configure it right. But I figured out how
Oh Can you share the solution?
@yeahg-dev sorry for the delay. I don't get quite the same results as you have described.
When I start debug with "Launch Test wiith Custom Task", nothing happens except this error alert is showing. When I start debug with "Launch Test wiith Uno Platfrom Task", nothing happens except this error alert is showing.
Those names do not exist inside your repo.
What I noticed is that your repo seems to use an old Uno templates which has more than one solution, like:
DrawerControlSafeAreaTest.sln
andDrawerControlSafeAreaTestMobile\DrawerControlSafeAreaTestMobile.sln
And based on your screenshots you're using the *Mobile.sln
solution, which is not at the same level as the .vscode
where your custom configuration resides.
When I use DrawerControlSafeAreaTest.sln
then I do not have build failures.
When I use DrawerControlSafeAreaTestMobile.sln
I do get build failures (but not alerts as you mentioned above).
What happens to you if you use the DrawerControlSafeAreaTest.sln
solution file ?
Also, if possible, I suggest you to update to the latest single project templates so you'll have a better overall experience (with a single solution file). That might fix your issue... but I can't be sure since I don't have the same errors as you did.
@xperiandri hey, I'm not sure I'm following what you're suggesting ?
Your linked gist seems to be a copy of the launch.json
that is part of our templates (using dotnet new ...
or our online wizard. Am I missing something ?
Side note: except for web assembly, which requires more configuration, a launch.json
file is not needed to build/debug Uno applications. Press F5 while a C# file is opened and it will build/deploy using the settings you selected (in the status bar).
@spouliot maybe it works for you and I would love to see a step-by-step guide to that. But for my scenario of enterprise development where in one solution there may be multiple different runnable projects, I was not managed to successfully apply your approach. Maybe I did something wrong but till now no one made any explanation or tutorial for that.
Hello @xperiandri
maybe it works for you and I would love to see a step-by-step guide to that.
From this guide you have separate step-by-step instructions for VS, VS Code and Rider with, where applicable, OS specific steps.
But for my scenario of enterprise development where in one solution there may be multiple different runnable projects, I was not managed to successfully apply your approach.
We used, before Uno 5 and the single project support, to have several .csproj
inside a solution. This is also quite common in the Uno git repository.
IMO the strangest part is that you're using the same launch.json
file that our template provides. I would not expect one to work and the other to fail since the input would be the identical. Since it fails for you then there must be a difference somewhere...
Maybe I did something wrong but till now no one made any explanation or tutorial for that.
Do you mind opening a discussion to continue ?
I'd like to figure out what is the problem and, if required, update our code/docs.
Also I'm not sure it's related to the original question where a .code-workspace
file, for multi-root workspaces, is being used.
Thanks!
@spouliot Thank you for sharing and kind suggestion! But changing to single solution or single project will be not suitable for my product. Because the purpose of using workspace is to collect folders belonging to different solutions and work on them in a workspace.
When I start debug with "Launch Test wiith Custom Task", nothing happens except this error alert is showing. When I start debug with "Launch Test wiith Uno Platfrom Task", nothing happens except this error alert is showing.
Those names do not exist inside your repo.
Oh I updated latest version 3 weeks ago. maybe you would opened not latest version. In latest you could find "Launch Test wiith Custom Task", and "Launch Test wiith Uno Platfrom Task" when open "Test.code-workspace". Could you check again with the latest version?
Because the purpose of using workspace is to collect folders belonging to different solutions and work on them in a workspace.
Yes but a .code-workspace
file is a VS Code only feature, it consolidate various locations inside a single virtual workspace of VS Code.
However it does not affect how the (dotnet) builds are done, dotnet
is not aware of normal (or multi-rooted) workspaces. Now it's up to you but you should have no problem using a newer, single project Uno template.
Could you check again with the latest version?
I double checked and I was using the latest version. I likely missed them because of copy/paste errors :) I copied the names from the issue, but they are not an exact match (typo) for the content of https://github.com/yeahg-dev/VSCodeWorkspaceTaskTest/blob/main/.vscode/Test.code-workspace#L21
For some reasons the Microsoft C# (and/or C# DevKit) extension(s) [1] does not load your project this morning, it just keeps spinning ?!?
This works fine with other projects that I used and this is not something related to the Uno extension, I uninstall it to make sure of it.
Note that I am using the pre-release versions of the MS extensions.
I'll try again with the stable releases.
The project loads correctly when using the current stable releases
Filled with Microsoft as https://github.com/dotnet/vscode-csharp/issues/7455
I can duplicate the issue. Even if the extension register the task with every workspace I still get the error 😢
This seems similar to https://github.com/microsoft/vscode/issues/192041 and MS answer is, at best, not very helpful (for the extension that normally provides the task definition).
Side note: adding a .vscode
inside a multi-rooted workspace is likely a bad idea since (at least parts of) VS Code can create another .vscode
directory inside it. IOW it might not always behave like a normal .vscode
subdirectory would.
Thank you for checks and side note!
I don't know if I understood it well, Does Uno Platform Extension also provide task definition?
Does Uno Platform Extension also provide task definition?
Yes, every Uno: *
tasks that VS Code offers comes from the extension.
You don't have to create a tasks.json
to use them, the extension will provide them on demand when needed.
However you can still add/copy them if you want to customize the tasks.
Type: Bug
Current Behavior
Extension Status
Extension: Dev Kit Mode Debugger: Ready Hot-Reload: Running on port 61370 XAML LSP: Ready
Environment information
Extension version: 0.14.1 VS Code version: Code 1.91.1 (f1e16e1e6214d7c44d078b1f0607b2388f29d729, 2024-07-09T22:07:46.768Z) OS version: Darwin arm64 23.1.0 Modes:
System Info
|Item|Value| |---|---| |CPUs|Apple M1 Pro (10 x 2400)| |GPU Status|2d_canvas: enabledcanvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|10, 11, 10| |Memory (System)|32.00GB (3.56GB free)| |Process Argv|--crash-reporter-id b84a933d-ae30-433b-abe7-a8314f276265| |Screen Reader|no| |VM|0%|
A/B Experiments
``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonnoceb:30805159 asynctok:30898717 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 chatpanelt:31048053 dsvsc021:30996838 jg8ic977:31013176 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 dwnewjupyter:31046869 newcmakeconfigv2:31071590 impr_priority:31094925 refactorc:31098050 ccplti:31098112 ```