@@ -77,6 +77,20 @@ static internal bool LibVLCLoaded
7777 {
7878 arch = Path . Combine ( ArchitectureNames . MacOS64 , Constants . Lib ) ;
7979 }
80+
81+ #if ! NET40 && ! NETSTANDARD1_1
82+ else if ( PlatformHelper . IsWindows )
83+ {
84+ arch = RuntimeInformation . ProcessArchitecture switch
85+ {
86+ Architecture . X64 => ArchitectureNames . Win64 ,
87+ Architecture . X86 => ArchitectureNames . Win86 ,
88+ Architecture . Arm64 => ArchitectureNames . WinArm64 ,
89+ _ => arch = PlatformHelper . IsX64BitProcess ? ArchitectureNames . Win64 : ArchitectureNames . Win86
90+ } ;
91+ }
92+ #endif
93+
8094 else
8195 {
8296 arch = PlatformHelper . IsX64BitProcess ? ArchitectureNames . Win64 : ArchitectureNames . Win86 ;
@@ -117,6 +131,27 @@ static internal bool LibVLCLoaded
117131
118132 paths . Add ( ( string . Empty , libvlcPath3 ) ) ;
119133
134+ // Add Win64 folders as fallback for WinArm64 to keep compatibility
135+ if ( arch == ArchitectureNames . WinArm64 )
136+ {
137+ var fallbackLibvlcDirPath1 = Path . Combine ( Path . GetDirectoryName ( libvlcAssemblyLocation ) ! ,
138+ Constants . LibrariesRepositoryFolderName , ArchitectureNames . Win64 ) ;
139+
140+ var fallbackLibvlccorePath1 = LibVLCCorePath ( fallbackLibvlcDirPath1 ) ;
141+ var fallbackLibvlcPath1 = LibVLCPath ( fallbackLibvlcDirPath1 ) ;
142+ paths . Add ( ( fallbackLibvlccorePath1 , fallbackLibvlcPath1 ) ) ;
143+
144+ if ( ! string . IsNullOrEmpty ( assemblyLocation ) )
145+ {
146+ var fallbackLibvlcDirPath2 = Path . Combine ( Path . GetDirectoryName ( assemblyLocation ) ! ,
147+ Constants . LibrariesRepositoryFolderName , ArchitectureNames . Win64 ) ;
148+
149+ var fallbackLibvlccorePath2 = LibVLCCorePath ( fallbackLibvlcDirPath2 ) ;
150+ var fallbackLibvlcPath2 = LibVLCPath ( fallbackLibvlcDirPath2 ) ;
151+ paths . Add ( ( fallbackLibvlccorePath2 , fallbackLibvlcPath2 ) ) ;
152+ }
153+ }
154+
120155 if ( PlatformHelper . IsMac )
121156 {
122157 var libvlcPath4 = Path . Combine ( Path . Combine ( Path . GetDirectoryName ( libvlcAssemblyLocation ) ! ,
0 commit comments