From 3073b5f2a49ad499fdf8cc43e021183353ab2160 Mon Sep 17 00:00:00 2001 From: Martin Finkel Date: Tue, 2 Jun 2026 15:53:36 +0200 Subject: [PATCH 01/10] build: include UWP and WinUI in library projects --- buildsystem/build.cake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buildsystem/build.cake b/buildsystem/build.cake index c13f7f50..6dff4a85 100644 --- a/buildsystem/build.cake +++ b/buildsystem/build.cake @@ -25,6 +25,8 @@ var libraryProjects = new string[] "../src/LibVLCSharp.Uno/LibVLCSharp.Uno.csproj", "../src/LibVLCSharp.WinForms/LibVLCSharp.WinForms.csproj", "../src/LibVLCSharp.WPF/LibVLCSharp.WPF.csproj", + "../src/LibVLCSharp.UWP/LibVLCSharp.UWP.csproj", + "../src/LibVLCSharp.WinUI/LibVLCSharp.WinUI.csproj", }; var testCsproj = "../src/LibVLCSharp.Tests/LibVLCSharp.Tests.csproj"; @@ -33,7 +35,7 @@ var isCiBuild = BuildSystem.AzurePipelines.IsRunningOnAzurePipelines; var suffixVersion = $"alpha-{DateTime.Today.ToString("yyyyMMdd")}-{BuildSystem.AzurePipelines.Environment.Build.Id}"; var feedzLVSSource = "https://f.feedz.io/videolan/preview/nuget/index.json"; var FEEDZ = "FEEDZ"; -const uint totalPackageCount = 12; +const uint totalPackageCount = 14; ////////////////////////////////////////////////////////////////////// // PREPARATION From 9ebb09422219585dfbb58ac25a6b9dfe927fc14e Mon Sep 17 00:00:00 2001 From: Martin Finkel Date: Tue, 2 Jun 2026 15:53:50 +0200 Subject: [PATCH 02/10] UWP: add LibVLCSharp.UWP project --- src/LibVLCSharp.UWP/LibVLCSharp.UWP.csproj | 52 +++++++++++++++++++++ src/LibVLCSharp.UWP/README.md | 11 +++++ src/LibVLCSharp.UWP/XamlMetaDataProvider.cs | 26 +++++++++++ 3 files changed, 89 insertions(+) create mode 100644 src/LibVLCSharp.UWP/LibVLCSharp.UWP.csproj create mode 100644 src/LibVLCSharp.UWP/README.md create mode 100644 src/LibVLCSharp.UWP/XamlMetaDataProvider.cs diff --git a/src/LibVLCSharp.UWP/LibVLCSharp.UWP.csproj b/src/LibVLCSharp.UWP/LibVLCSharp.UWP.csproj new file mode 100644 index 00000000..be396484 --- /dev/null +++ b/src/LibVLCSharp.UWP/LibVLCSharp.UWP.csproj @@ -0,0 +1,52 @@ + + + LibVLCSharp.UWP + UWP integration for LibVLCSharp + LibVLCSharp.UWP contains the UWP VideoView integration for LibVLCSharp. + +This package contains the core LibVLCSharp APIs and the UWP view that allows to display video played with LibVLCSharp in a UWP app. + +LibVLC needs to be installed separately, see VideoLAN.LibVLC.UWP. + uap10.0.18362 + $(TargetFrameworks);net9.0-windows10.0.26100;net10.0-windows10.0.26100 + {D3B33E0E-2BC1-46EF-A483-6587B9A086A3} + LibVLCSharp + LibVLCSharp + LibVLCSharp.UWP + $(PackageTags);uwp + true + false + true + win-x86;win-x64;win-arm64 + .NETCoreApp + true + true + + + + 10.0.19041.0 + + + + + + + + Designer + MSBuild:Compile + + + + + + + + + + + + + + + + diff --git a/src/LibVLCSharp.UWP/README.md b/src/LibVLCSharp.UWP/README.md new file mode 100644 index 00000000..68bfca4f --- /dev/null +++ b/src/LibVLCSharp.UWP/README.md @@ -0,0 +1,11 @@ +# LibVLCSharp.UWP + +[![NuGet Stats](https://img.shields.io/nuget/v/LibVLCSharp.UWP.svg)](https://www.nuget.org/packages/LibVLCSharp.UWP) +[![NuGet Stats](https://img.shields.io/nuget/dt/LibVLCSharp.UWP.svg)](https://www.nuget.org/packages/LibVLCSharp.UWP) + +The official UWP view for [LibVLCSharp](../LibVLCSharp/README.md). + +This package contains the core LibVLCSharp APIs and the UWP `VideoView` control. + +> BE CAREFUL: This project does not include **LibVLC** itself. Install `VideoLAN.LibVLC.UWP` separately. + diff --git a/src/LibVLCSharp.UWP/XamlMetaDataProvider.cs b/src/LibVLCSharp.UWP/XamlMetaDataProvider.cs new file mode 100644 index 00000000..7ca1c81b --- /dev/null +++ b/src/LibVLCSharp.UWP/XamlMetaDataProvider.cs @@ -0,0 +1,26 @@ +using System; + +#if WINUI +using Microsoft.UI.Xaml.Markup; +#else +using Windows.UI.Xaml.Markup; +#endif + +namespace LibVLCSharp.LibVLCSharp_XamlTypeInfo +{ + /// + /// Exposes XAML metadata under the namespace expected from the LibVLCSharp assembly name. + /// + public sealed partial class XamlMetaDataProvider : IXamlMetadataProvider + { + readonly IXamlMetadataProvider _provider = (IXamlMetadataProvider)Activator.CreateInstance( + Type.GetType("LibVLCSharp.LibVLCSharp_UWP_XamlTypeInfo.XamlMetaDataProvider, LibVLCSharp") + ?? throw new InvalidOperationException("Could not find the generated UWP XAML metadata provider."))!; + + IXamlType IXamlMetadataProvider.GetXamlType(Type type) => _provider.GetXamlType(type); + + IXamlType IXamlMetadataProvider.GetXamlType(string fullName) => _provider.GetXamlType(fullName); + + XmlnsDefinition[] IXamlMetadataProvider.GetXmlnsDefinitions() => _provider.GetXmlnsDefinitions(); + } +} From 72d0862c58fdea286c816d4c21af336792d032fa Mon Sep 17 00:00:00 2001 From: Martin Finkel Date: Tue, 2 Jun 2026 16:02:28 +0200 Subject: [PATCH 03/10] WinUI: add LibVLCSharp.WinUI project --- .../LibVLCSharp.WinUI.csproj | 44 +++++++++++++++++++ src/LibVLCSharp.WinUI/README.md | 11 +++++ src/LibVLCSharp.WinUI/XamlMetaDataProvider.cs | 21 +++++++++ 3 files changed, 76 insertions(+) create mode 100644 src/LibVLCSharp.WinUI/LibVLCSharp.WinUI.csproj create mode 100644 src/LibVLCSharp.WinUI/README.md create mode 100644 src/LibVLCSharp.WinUI/XamlMetaDataProvider.cs diff --git a/src/LibVLCSharp.WinUI/LibVLCSharp.WinUI.csproj b/src/LibVLCSharp.WinUI/LibVLCSharp.WinUI.csproj new file mode 100644 index 00000000..fc74fa47 --- /dev/null +++ b/src/LibVLCSharp.WinUI/LibVLCSharp.WinUI.csproj @@ -0,0 +1,44 @@ + + + LibVLCSharp.WinUI + WinUI integration for LibVLCSharp + LibVLCSharp.WinUI contains the WinUI VideoView integration for LibVLCSharp. + +This package contains the core LibVLCSharp APIs and the WinUI view that allows to display video played with LibVLCSharp in a WinUI app. + +LibVLC needs to be installed separately, see VideoLAN.LibVLC.Windows. + net6.0-windows10.0.17763.0;net8.0-windows10.0.19041;net9.0-windows10.0.19041;net10.0-windows10.0.19041 + {1377EBAF-FAB8-45DD-A65F-4C304FF72165} + LibVLCSharp + LibVLCSharp + LibVLCSharp.WinUI + $(PackageTags);winui + true + false + true + true + win-x86;win-x64;win-arm64 + $(NoWarn);NU1510 + $(WarningsNotAsErrors);NU1510 + .NETCoreApp + + + + + + + + Designer + MSBuild:Compile + + + + + + + + + + + + diff --git a/src/LibVLCSharp.WinUI/README.md b/src/LibVLCSharp.WinUI/README.md new file mode 100644 index 00000000..5af164e7 --- /dev/null +++ b/src/LibVLCSharp.WinUI/README.md @@ -0,0 +1,11 @@ +# LibVLCSharp.WinUI + +[![NuGet Stats](https://img.shields.io/nuget/v/LibVLCSharp.WinUI.svg)](https://www.nuget.org/packages/LibVLCSharp.WinUI) +[![NuGet Stats](https://img.shields.io/nuget/dt/LibVLCSharp.WinUI.svg)](https://www.nuget.org/packages/LibVLCSharp.WinUI) + +The official WinUI view for [LibVLCSharp](../LibVLCSharp/README.md). + +This package contains the core LibVLCSharp APIs and the WinUI `VideoView` control. + +> BE CAREFUL: This project does not include **LibVLC** itself. Install `VideoLAN.LibVLC.Windows` separately. + diff --git a/src/LibVLCSharp.WinUI/XamlMetaDataProvider.cs b/src/LibVLCSharp.WinUI/XamlMetaDataProvider.cs new file mode 100644 index 00000000..bdcb5a87 --- /dev/null +++ b/src/LibVLCSharp.WinUI/XamlMetaDataProvider.cs @@ -0,0 +1,21 @@ +using System; +using Microsoft.UI.Xaml.Markup; + +namespace LibVLCSharp.LibVLCSharp_XamlTypeInfo +{ + /// + /// Exposes XAML metadata under the namespace expected from the LibVLCSharp assembly name. + /// + public sealed partial class XamlMetaDataProvider : IXamlMetadataProvider + { + readonly IXamlMetadataProvider _provider = (IXamlMetadataProvider)Activator.CreateInstance( + Type.GetType("LibVLCSharp.LibVLCSharp_WinUI_XamlTypeInfo.XamlMetaDataProvider, LibVLCSharp") + ?? throw new InvalidOperationException("Could not find the generated WinUI XAML metadata provider."))!; + + IXamlType IXamlMetadataProvider.GetXamlType(Type type) => _provider.GetXamlType(type); + + IXamlType IXamlMetadataProvider.GetXamlType(string fullName) => _provider.GetXamlType(fullName); + + XmlnsDefinition[] IXamlMetadataProvider.GetXmlnsDefinitions() => _provider.GetXmlnsDefinitions(); + } +} From b7c1504425641e90071d9fc611dbe4f5183e07d5 Mon Sep 17 00:00:00 2001 From: Martin Finkel Date: Tue, 2 Jun 2026 16:02:36 +0200 Subject: [PATCH 04/10] LibVLCSharp: remove UWP and WinUI target frameworks --- src/LibVLCSharp/LibVLCSharp.csproj | 26 ++------------------------ src/LibVLCSharp/README.md | 4 ++-- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/src/LibVLCSharp/LibVLCSharp.csproj b/src/LibVLCSharp/LibVLCSharp.csproj index aa494630..0bcf6c0d 100644 --- a/src/LibVLCSharp/LibVLCSharp.csproj +++ b/src/LibVLCSharp/LibVLCSharp.csproj @@ -23,21 +23,19 @@ This package also contains the views for the following platforms: - iOS - Mac - tvOS -- UWP If you need Xamarin.Forms support, see LibVLCSharp.Forms. LibVLC needs to be installed separately, see VideoLAN.LibVLC.* packages. netstandard2.1;netstandard2.0;netstandard1.1;net40;net471;net6.0;net8.0;net9;net10.0 $(TargetFrameworks);net9.0-android;net9.0-ios;net9.0-macos;net9.0-tvos;net10.0-android;net10.0-ios - $(TargetFrameworks);uap10.0.18362;net6.0-windows10.0.17763.0;net8.0-windows10.0.19041;net9.0-windows10.0.19041;net10.0-windows10.0.19041;monoandroid81;xamarin.ios10;xamarin.mac20 + $(TargetFrameworks);monoandroid81;xamarin.ios10;xamarin.mac20 Debug;Release;Win32Debug;Win32Release $(TargetsForTfmSpecificBuildOutput);IncludeAWindow LibVLCSharp LibVLCSharp true false - win-x86;win-x64;win-arm64 .NETCoreApp @@ -45,13 +43,6 @@ LibVLC needs to be installed separately, see VideoLAN.LibVLC.* packages. netstandard2.1;netstandard2.0;net6.0;net6.0-windows - - true - 10.0.19041.0 - - - true - @@ -79,19 +70,6 @@ LibVLC needs to be installed separately, see VideoLAN.LibVLC.* packages. - - - - - Designer - MSBuild:Compile - - - - - - - @@ -116,4 +94,4 @@ LibVLC needs to be installed separately, see VideoLAN.LibVLC.* packages. - \ No newline at end of file + diff --git a/src/LibVLCSharp/README.md b/src/LibVLCSharp/README.md index 5358cb2b..5f364624 100644 --- a/src/LibVLCSharp/README.md +++ b/src/LibVLCSharp/README.md @@ -26,6 +26,6 @@ See the [Installation](../../README.md#installation) documentation for more info If you are in one of these situation, this package is made for you. - You want to build a console application that leverages the power of VLC for transcoding/streaming/recording/playing audio... without displaying the video anywhere -- You want to build a Xamarin.iOS/Android/Mac/tvOS/UWP app (not Xamarin.Forms, for that, see [LibVLCSharp.Forms](../LibVLCSharp.Forms/README.md) ) +- You want to build a Xamarin.iOS/Android/Mac/tvOS app (not Xamarin.Forms, for that, see [LibVLCSharp.Forms](../LibVLCSharp.Forms/README.md) ) -For other platforms, see the [main documentation](../../README.md) \ No newline at end of file +For other platforms, see the [main documentation](../../README.md) From 0774d946218c400e8f8eb6dbb2bd28f08beddd3e Mon Sep 17 00:00:00 2001 From: Martin Finkel Date: Tue, 2 Jun 2026 16:02:47 +0200 Subject: [PATCH 05/10] build, docs: update references for UWP/WinUI split --- README.md | 9 ++++++++- .../LibVLCSharp.UWP.Sample.csproj | 8 ++++---- .../LibVLCSharp.WinUI.Sample.csproj | 2 +- .../LibVLCSharp.MAUI.Sample.MediaElement.csproj | 3 +-- src/Directory.Build.props | 4 ++-- src/LibVLCSharp.MAUI/LibVLCSharp.MAUI.csproj | 3 ++- src/LibVLCSharp.Uno/LibVLCSharp.Uno.csproj | 3 ++- src/LibVLCSharp.slnx | 15 +++++++++++++++ 8 files changed, 35 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 38392460..43fc4847 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,8 @@ LibVLCSharp is the .NET wrapper that consumes `LibVLC` and allows you to interac | Xamarin.iOS | [LibVLCSharp](src/LibVLCSharp/README.md) | [![LibVLCSharpBadge]][LibVLCSharp] | | Xamarin.tvOS | [LibVLCSharp](src/LibVLCSharp/README.md) | [![LibVLCSharpBadge]][LibVLCSharp] | | Xamarin.Mac | [LibVLCSharp](src/LibVLCSharp/README.md) | [![LibVLCSharpBadge]][LibVLCSharp] | -| UWP | [LibVLCSharp](src/LibVLCSharp/README.md) | [![LibVLCSharpBadge]][LibVLCSharp] | +| UWP | [LibVLCSharp.UWP][RLibVLCSharpUWP] | [![LibVLCSharpUWPBadge]][LibVLCSharpUWP] | +| WinUI | [LibVLCSharp.WinUI][RLibVLCSharpWinUI] | [![LibVLCSharpWinUIBadge]][LibVLCSharpWinUI] | | Xamarin.Forms | [LibVLCSharp.Forms][RLibVLCSharpForms] | [![LibVLCSharpFormsBadge]][LibVLCSharpForms] | | MAUI | [LibVLCSharp.MAUI][RLibVLCSharpMAUI] | [![LibVLCSharpMAUIBadge]][LibVLCSharpMAUI] | | WPF | [LibVLCSharp.WPF][RLibVLCSharpWPF] | [![LibVLCSharpWPFBadge]][LibVLCSharpWPF] | @@ -159,6 +160,8 @@ See the docs for [preview builds installation details](docs/libvlc_preview.md). [RLibVLCSharpGTK]: src/LibVLCSharp.GTK/README.md [RLibVLCSharpFormsGTK]: src/LibVLCSharp.Forms.Platforms.GTK/README.md [RLibVLCSharpWinForms]: src/LibVLCSharp.WinForms/README.md +[RLibVLCSharpUWP]: src/LibVLCSharp.UWP/README.md +[RLibVLCSharpWinUI]: src/LibVLCSharp.WinUI/README.md [RLibVLCSharpUno]: src/LibVLCSharp.Uno/README.md [RLibVLCSharpAvalonia]: src/LibVLCSharp.Avalonia/README.md [RLibVLCSharpEto]: src/LibVLCSharp.Eto/README.md @@ -183,6 +186,10 @@ See the docs for [preview builds installation details](docs/libvlc_preview.md). [LibVLCSharp]: https://www.nuget.org/packages/LibVLCSharp/ [LibVLCSharpBadge]: https://img.shields.io/nuget/v/LibVLCSharp.svg +[LibVLCSharpUWP]: https://www.nuget.org/packages/LibVLCSharp.UWP/ +[LibVLCSharpUWPBadge]: https://img.shields.io/nuget/v/LibVLCSharp.UWP.svg +[LibVLCSharpWinUI]: https://www.nuget.org/packages/LibVLCSharp.WinUI/ +[LibVLCSharpWinUIBadge]: https://img.shields.io/nuget/v/LibVLCSharp.WinUI.svg [LibVLCSharpForms]: https://www.nuget.org/packages/LibVLCSharp.Forms/ [LibVLCSharpFormsBadge]: https://img.shields.io/nuget/v/LibVLCSharp.Forms.svg diff --git a/samples/LibVLCSharp.UWP.Sample/LibVLCSharp.UWP.Sample.csproj b/samples/LibVLCSharp.UWP.Sample/LibVLCSharp.UWP.Sample.csproj index 321ede9e..1b14dbb9 100644 --- a/samples/LibVLCSharp.UWP.Sample/LibVLCSharp.UWP.Sample.csproj +++ b/samples/LibVLCSharp.UWP.Sample/LibVLCSharp.UWP.Sample.csproj @@ -173,9 +173,9 @@ - - {d1c3b7c4-713b-46b2-b33a-e9298c819921} - LibVLCSharp + + {d3b33e0e-2bc1-46ef-a483-6587b9a086a3} + LibVLCSharp.UWP @@ -195,4 +195,4 @@ --> - \ No newline at end of file + diff --git a/samples/LibVLCSharp.WinUI.Sample/LibVLCSharp.WinUI.Sample.csproj b/samples/LibVLCSharp.WinUI.Sample/LibVLCSharp.WinUI.Sample.csproj index 76f84519..1bc40b0e 100644 --- a/samples/LibVLCSharp.WinUI.Sample/LibVLCSharp.WinUI.Sample.csproj +++ b/samples/LibVLCSharp.WinUI.Sample/LibVLCSharp.WinUI.Sample.csproj @@ -38,6 +38,6 @@ - + diff --git a/samples/MAUI/LibVLCSharp.MAUI.Sample.MediaElement/LibVLCSharp.MAUI.Sample.MediaElement.csproj b/samples/MAUI/LibVLCSharp.MAUI.Sample.MediaElement/LibVLCSharp.MAUI.Sample.MediaElement.csproj index 06c2681a..68015acb 100644 --- a/samples/MAUI/LibVLCSharp.MAUI.Sample.MediaElement/LibVLCSharp.MAUI.Sample.MediaElement.csproj +++ b/samples/MAUI/LibVLCSharp.MAUI.Sample.MediaElement/LibVLCSharp.MAUI.Sample.MediaElement.csproj @@ -52,11 +52,10 @@ - - \ No newline at end of file + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index beec5b39..c6083e7b 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -22,10 +22,10 @@ $(DefineConstants);ANDROID - + $(DefineConstants);UWP;WINDOWS_MODERN - + $(DefineConstants);WINUI;WINDOWS_MODERN diff --git a/src/LibVLCSharp.MAUI/LibVLCSharp.MAUI.csproj b/src/LibVLCSharp.MAUI/LibVLCSharp.MAUI.csproj index c60e2056..ee23d1b9 100644 --- a/src/LibVLCSharp.MAUI/LibVLCSharp.MAUI.csproj +++ b/src/LibVLCSharp.MAUI/LibVLCSharp.MAUI.csproj @@ -23,7 +23,8 @@ LibVLC needs to be installed separately, see VideoLAN.LibVLC.* packages. - + + diff --git a/src/LibVLCSharp.Uno/LibVLCSharp.Uno.csproj b/src/LibVLCSharp.Uno/LibVLCSharp.Uno.csproj index 9374368c..484ff0c3 100644 --- a/src/LibVLCSharp.Uno/LibVLCSharp.Uno.csproj +++ b/src/LibVLCSharp.Uno/LibVLCSharp.Uno.csproj @@ -27,7 +27,8 @@ It also contains a VLC MediaPlayerElement for the Uno Platform (UWP, Android, iO - + + diff --git a/src/LibVLCSharp.slnx b/src/LibVLCSharp.slnx index baec4b06..5ae8db94 100644 --- a/src/LibVLCSharp.slnx +++ b/src/LibVLCSharp.slnx @@ -482,6 +482,21 @@ + + + + + + + + + + + + + + + From a1fa151019afc0f4cea8c56a82b6e45d64c229e8 Mon Sep 17 00:00:00 2001 From: Martin Finkel Date: Tue, 2 Jun 2026 16:34:48 +0200 Subject: [PATCH 06/10] cake: use msbuild 18+ --- buildsystem/build.cake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildsystem/build.cake b/buildsystem/build.cake index 6dff4a85..e97e284a 100644 --- a/buildsystem/build.cake +++ b/buildsystem/build.cake @@ -135,7 +135,7 @@ void Build(string project) settings.WithProperty("VersionSuffix", suffixVersion); } - settings.ToolVersion = MSBuildToolVersion.VS2022; + settings.ToolVersion = MSBuildToolVersion.VS2026; MSBuild(project, settings); } From 9bddbb1a4880683d069282cb5edbc5dc9aee0df7 Mon Sep 17 00:00:00 2001 From: Martin Finkel Date: Wed, 3 Jun 2026 11:28:44 +0200 Subject: [PATCH 07/10] bump .NET sdk --- buildsystem/base-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildsystem/base-template.yml b/buildsystem/base-template.yml index 3b73a1de..14329dd9 100644 --- a/buildsystem/base-template.yml +++ b/buildsystem/base-template.yml @@ -3,7 +3,7 @@ steps: displayName: 'Use .NET Core SDK' inputs: packageType: sdk - version: 10.0.100 + version: 10.0.300 - bash: | dotnet workload install android From c1648ee9f75bba023aab5eb75509c778987dbbe8 Mon Sep 17 00:00:00 2001 From: Martin Finkel Date: Wed, 3 Jun 2026 12:13:18 +0200 Subject: [PATCH 08/10] test CI --- buildsystem/azure-pipelines.yml | 4 ++-- buildsystem/base-template.yml | 5 +++++ buildsystem/windows-build.yml | 15 ++++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/buildsystem/azure-pipelines.yml b/buildsystem/azure-pipelines.yml index 5e54ff6a..0c8f8ef2 100644 --- a/buildsystem/azure-pipelines.yml +++ b/buildsystem/azure-pipelines.yml @@ -27,7 +27,7 @@ stages: - job: Windows timeoutInMinutes: 120 pool: - vmImage: 'windows-latest' + vmImage: 'windows-2025-vs2026' steps: - template: windows-build.yml @@ -85,4 +85,4 @@ stages: command: custom custom: 'cake' arguments: --target CIDeploy - workingDirectory: buildsystem \ No newline at end of file + workingDirectory: buildsystem diff --git a/buildsystem/base-template.yml b/buildsystem/base-template.yml index 14329dd9..47e675f5 100644 --- a/buildsystem/base-template.yml +++ b/buildsystem/base-template.yml @@ -23,6 +23,11 @@ steps: script: | Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer" $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" + if (-not (Test-Path $InstallPath)) { + Write-Host "Visual Studio 2022 Enterprise is not installed. Skipping legacy Xamarin component installation." + return + } + $componentsToAdd = @("Component.Xamarin") [string]$workloadArgs = $componentsToAdd | ForEach-Object { " --add " + $_ } $Arguments = @('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"", $workloadArgs, '--quiet', '--norestart', '--nocache') diff --git a/buildsystem/windows-build.yml b/buildsystem/windows-build.yml index d4ee886a..e0537062 100644 --- a/buildsystem/windows-build.yml +++ b/buildsystem/windows-build.yml @@ -1,5 +1,18 @@ steps: - template: base-template.yml + +- task: PowerShell@2 + displayName: 'Show Visual Studio and MSBuild' + inputs: + targetType: 'inline' + script: | + $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + & $vswhere -all -products * -format table + $vsPath = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath + Write-Host "Resolved Visual Studio path: $vsPath" + & "$vsPath\MSBuild\Current\Bin\MSBuild.exe" -version + dotnet --info + - task: PowerShell@2 displayName: 'Install gtksharp' inputs: @@ -224,4 +237,4 @@ steps: - task: PublishBuildArtifacts@1 inputs: pathToPublish: 'nugets' - artifactName: 'nugets' \ No newline at end of file + artifactName: 'nugets' From 6aa26c18e7a04c5c1848bf917b17f655810528ef Mon Sep 17 00:00:00 2001 From: Martin Finkel Date: Wed, 3 Jun 2026 13:32:21 +0200 Subject: [PATCH 09/10] still install xamarin --- buildsystem/base-template.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/buildsystem/base-template.yml b/buildsystem/base-template.yml index 47e675f5..373b38b9 100644 --- a/buildsystem/base-template.yml +++ b/buildsystem/base-template.yml @@ -24,7 +24,30 @@ steps: Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer" $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" if (-not (Test-Path $InstallPath)) { - Write-Host "Visual Studio 2022 Enterprise is not installed. Skipping legacy Xamarin component installation." + Write-Host "Visual Studio 2022 Enterprise is not installed. Installing it for legacy Xamarin targets." + $Arguments = @( + '/c', + 'vs_installer.exe', + 'install', + '--channelUri', + 'https://aka.ms/vs/17/release/channel', + '--productId', + 'Microsoft.VisualStudio.Product.Enterprise', + '--installPath', + "`"$InstallPath`"", + '--add', + 'Component.Xamarin', + '--quiet', + '--norestart', + '--nocache' + ) + $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden + if ($process.ExitCode -ne 0 -and $process.ExitCode -ne 3010) { + Write-Error "Failed to install Visual Studio 2022 Xamarin components (exit code: $($process.ExitCode))" + exit 1 + } + + Write-Host "Visual Studio 2022 Xamarin components installed successfully" return } From f508c84440b11704c23ca5c1679f80f36025ac43 Mon Sep 17 00:00:00 2001 From: Martin Finkel Date: Wed, 3 Jun 2026 14:37:25 +0200 Subject: [PATCH 10/10] . --- .../LibVLCSharp.Android.Sample.csproj | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/samples/LibVLCSharp.Android.Sample/LibVLCSharp.Android.Sample.csproj b/samples/LibVLCSharp.Android.Sample/LibVLCSharp.Android.Sample.csproj index ffec26df..77768779 100644 --- a/samples/LibVLCSharp.Android.Sample/LibVLCSharp.Android.Sample.csproj +++ b/samples/LibVLCSharp.Android.Sample/LibVLCSharp.Android.Sample.csproj @@ -1,5 +1,14 @@  + + + Enterprise + Professional + Community + C:\Program Files\Microsoft Visual Studio\2022\$(VS2022Edition) + $(VS2022Root)\MSBuild + $(VS2022Root)\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\ + Debug AnyCPU @@ -102,4 +111,4 @@ - \ No newline at end of file +