Thank you for downloading OpenSilver

Your download will start shortly. If your download does not begin:

Click here to retry

Release notes:

  • Requirements: The file you are downloading requires Visual Studio 2022 for Windows (note: a Mac and Linux-compatible VS Code version is available from the Downloads page).
  • To target mobile/desktop platforms, be sure to install the MAUI workload using the Visual Studio Installer. There is a known issue related to the internal path size limitations in MAUI: be sure to choose a short name for your project (e.g. “MyApp”), and put your solution folder as close as possible to the root directory (e.g. “C:\MyApp\”) to reduce the overall path length.
  • If you are upgrading from a previous version, you may need to manually uninstall the old one.
  • Read the Getting Started page of the OpenSilver documentation for a step-by-step guide to create a new application with OpenSilver.

Important recommendations:

Performance:

For best performance:

  • Enable virtualization if you are working with a list, combobox, or a treeview that contains many items.

  • Compile the application using the Ahead-of-Time (AOT) setting. This improves speed by 3 to 5 times. Note that it’s not enabled by default because compilation takes significantly longer, but it’s definitely the way to go when publishing the app.

  • Make sure to enable IIS compression and to fine-tune the “trimming” settings when publishing, to significantly reduce the initial loading time.

Common issues and solutions:

MAUI Hybrid:

  • If you get the error ‘The “GetLatestMSVCVersion” task failed unexpectedly’, it means that the MAUI workload has not been installed. You need to install the MAUI workload using the Visual Studio Installer.

  • If you get the error ‘The “GenerateStaticWebAssetEndpointsPropsFile” task failed unexpectedly’, it means that a file path has exceeded 256 characters. To fix this issue, make sure to use a short name for your solution/project (e.g. “MyApp”) and to put the solution folder as close as possible to the root directory (e.g. “C:\MyApp\”).

WCF and client/server communication:

  • For REST calls, use HttpClient instead of WebClient.

  • The browser security context may require that you enable cross-domain calls by configuring CORS and the SameSite attribute.

  • When adding a WCF Service Reference, please uncheck the option “Reuse types in referenced assemblies”, and update the NuGet packages from v4.4 to v4.7. When configuring a WCF Service Reference, temporarily add a reference to the “System.dll” assembly, then configure the service, and remove the reference after you are done.

  • To enable passing cookies (eg. for credentials/authentication), set the “DefaultSoapCredentialsMode” parameter.

  • Code trimming optimizes OpenSilver applications by reducing their size, enhancing performance and startup time. However, it may break .NET serialization or deserialization reliant on Reflection. If you encounter related errors, disable code trimming by setting the PublishTrimmed flag to False in the CSPROJ of the project with the “.Browser” suffix. If this resolves the issue, consider re-enabling trimming with configured rules.

  • For applications using RIA Services (like the “Business Application” template), be sure to refer to the tutorial and the “Troubleshooting” section of the Business Applications documentation.

Debugging:

  • If your breakpoints are not hit, try disabling “Enable just my code” (uncheck the option in Tools->Options->Debugging->General->Enable Just My Code)

  • Disabling code optimisation may help if you experience debugging issues (right click the project->Properties->Build->uncheck “optimize code”)

XAML files:

  • All XAML files in the project need to have the following properties: Build Action = Content, CustomTool = MSBuild:Compile

  • If you only change XAML files without changing C# (or VB.NET or F#) files, you may need to manually Rebuild the solution to see the changes reflected in your app.

Other:

The tips on this page can also be found in the Troubleshooting section of the documentation.

Please contact us for any questions.