The goal of this session to introduce Linux fans to a onestop solution for building custom Linux tools with. NET. Ship to the Web as well from the same codebase — with some help from VS Code.
and VS Code The goal of this session to introduce Linux fans to a one- stop solution for building custom Linux tools with. NET. Ship to the Web as well from the same codebase — with some help from VS Code. February 24, 2023 Aba Microsoft User Hangout
Visual Studio Code Extension .NET SDK .NET 7.0 SDK (version 7.0 (SDK 7.0.102) or later) Optionally, you might need the Gtk+3 runtime, as well Use dotnet --version from the terminal to get the version installed.
To update the tool, if you already have a legacy one: 2* a* Install the tool by running the following command from the command prompt: dotnet tool install -g uno.check dotnet tool update -g uno.check
command prompt with the following command: 4* Follow the instructions indicated by the tool If the above command fails, use the following: uno-check ~/.dotnet/tools/uno-check
create a new project: START RUN END This will create the Canvas that includes support for only the WebAssembly and Skia+GTK platforms dotnet new unoapp -o UnoHelloLinux -mobile=false --skia- wpf=false --skia-linux-fb=false --vscode
Terminal: 2* Open Visual Studio Code to see the generated codebase or run 4* Once the project has been loaded, in the status bar at the bottom left of VS Code, UnoHelloLinux.sln is selected by default. Select UnoHelloLinux.Skia.Gtk.csproj instead. code ./UnoHelloLinux 3* Visual Studio Code will ask to restore the NuGet packages.
Margin="20" FontSize="30" /> <TextBlock Text="{Binding Value, ElementName=slider}" Margin="20" FontSize="30" /> <Slider x:Name="slider"/> </StackPanel> </Grid> Replace the Grid's content with the following lines of code. This will add a StackPanel, a TextBlock, a Slider, and a Binder to give a dynamic result on the first try. Your new Grid layout should look like this: In your UnoHelloLinux Class Library project, open up MainPage.xaml
of the Code activity bar, select Skia.GTK (Debug) Press F5 to start the debugging session Place a breakpoint inside the OnClick method Click the button in the app, and the breakpoint will hit 1. 2. 3. 4. On WebAssembly In the debugger section of the Code activity bar, select Debug (Chrome, WebAssembly) Press F5 to start the debugging session Place a breakpoint inside the OnClick method Click the button in the app, and the breakpoint will hit 1. 2. 3. 4.
run here. For more information you can follow up on next steps at: https://platform.uno/docs/articles/getting-started- tutorial-2.html February 24, 2023 Aba Microsoft User Hangout