WinUI.Monaco 1.1.52.120

dotnet add package WinUI.Monaco --version 1.1.52.120
                    
NuGet\Install-Package WinUI.Monaco -Version 1.1.52.120
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WinUI.Monaco" Version="1.1.52.120" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WinUI.Monaco" Version="1.1.52.120" />
                    
Directory.Packages.props
<PackageReference Include="WinUI.Monaco" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WinUI.Monaco --version 1.1.52.120
                    
#r "nuget: WinUI.Monaco, 1.1.52.120"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=WinUI.Monaco&version=1.1.52.120
                    
Install WinUI.Monaco as a Cake Addin
#tool nuget:?package=WinUI.Monaco&version=1.1.52.120
                    
Install WinUI.Monaco as a Cake Tool

WinUI.Monaco-Editor

WinUI.Monaco-Editor

.NET Version License Downloads NuGet

buy me a coffe

Introduction

The Monaco Editor (Visual Studio Code) as UI Control for WinUI 3.0

Notice: As part of a project restructuring, the NuGet name of the library was changed from winui.monaco-editor to WinUI.Monaco.

Install Monaco in a WinUI 3.0 Project

dotnet add package WinUI.Monaco

WinUI.Monaco Version

The library version is composed as follows:

  • the current project version
  • the used Monaco Editor version
  • the GitHub RunNumber of the build

1.1.${{ env.MONACO_VERSION }}.${{ github.run_number }} (example: 1.1.44.13)

Handler

This Monaco control uses handlers to provide certain actions that have nothing directly to do with the actual Monaco editor:

MonacoWebViewDevToolsHandler

This handler can be used to open the WebView2 DevTools.

MonacoWebViewDevToolsHandler handler = this.MonacoEditor.GetHandler<MonacoWebViewDevToolsHandler>();

handler.OpenDebugWebViewDeveloperTools();

MonacoFileRecognitionHandler

With this handler you can pass a file extension and get back the code language supported by the Monaco Editor, which can then be set in the Monaco Editor.

MonacoFileRecognitionHandler handler = this.MonacoEditor.GetHandler<MonacoFileRecognitionHandler>();

string fileCodeLanguage = handler.RecognizeLanguageByFileType(Path.GetExtension(file.Path));
await this.MonacoEditor.SetLanguageAsync(fileCodeLanguage);

Contributors

Contributors

Development

Update the Monaco Version

The monaco project is stored in the C#-Project Monaco under the folder monaco-editor.

To update the monaco version follow these steps (Only do this if it is really necessary. The project is always automatically updated to the latest release version of the monaco project via a GitHub workflow):

  1. download the latest version from Microsoft Monaco Project
  2. extract the archive file
  3. delete all files except for index.html from the folder monaco-editor. The index.html is required for the project
  4. copy all new files from the extracted archive to the folder monaco-editor
Product Compatible and additional computed target framework versions.
.NET net6.0-windows10.0.19041 is compatible.  net7.0-windows was computed.  net8.0-windows was computed.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.52.120 397 5/13/2025
1.1.52.119 1,075 11/26/2024
1.1.49.117 277 11/6/2024
1.1.49.116 524 6/16/2024
1.1.49.115 186 6/12/2024
1.1.49.114 270 6/4/2024
1.1.48.113 260 5/13/2024
1.1.47.78 335 5/3/2024
1.1.47.76 288 5/3/2024
1.1.47.75 244 5/3/2024
1.1.47.62 210 5/2/2024
1.1.47.61 167 5/2/2024
1.1.47.60 180 5/2/2024
1.1.47.59 179 5/2/2024
1.1.47.58 189 5/2/2024
1.1.47.57 175 5/2/2024
1.1.47.56 181 5/2/2024
1.1.47.55 185 5/2/2024
1.1.47.54 176 5/2/2024
1.1.47.53 163 5/2/2024
1.1.47.52 162 5/2/2024
1.1.47.51 194 5/2/2024
1.1.47.50 342 4/5/2024
1.1.47.49 280 4/5/2024
1.1.47.48 223 4/5/2024
1.1.47.47 322 3/24/2024
1.1.47.46 331 3/24/2024
1.1.46.45 176 3/23/2024
1.1.46.44 656 2/10/2024
1.1.46.43 497 2/10/2024
1.1.46.42 474 2/10/2024
1.1.46.41 480 2/10/2024
1.1.46.40 521 2/10/2024
1.1.46.39 505 2/10/2024
1.1.46.38 511 2/10/2024
1.1.46.37 556 2/10/2024
1.1.46.36 495 2/10/2024
1.1.46.35 483 2/10/2024
1.1.44.34 528 1/28/2024
1.1.44.33 577 12/26/2023
1.1.44.32 587 12/26/2023
1.1.44.31 623 12/26/2023
1.1.44.30 562 12/26/2023
1.1.44.29 564 12/26/2023
1.1.44.28 597 12/26/2023
1.1.44.27 722 11/22/2023
1.1.44.26 585 11/22/2023
1.1.44.25 528 11/22/2023
1.1.44.24 560 11/22/2023
1.1.44.23 518 11/22/2023
1.1.44.22 574 11/21/2023
1.1.44.21 617 11/20/2023
1.1.44.19 640 11/20/2023
1.1.44.18 639 11/20/2023
1.0.0 595 11/20/2023