Avalonia aot 启动失败
yangjieshao opened this issue · 0 comments
yangjieshao commented
Avalonia 11.0.9 尝试aot 启动失败
(try aot , failed)
<PropertyGroup>
<IlcGenerateMapFile>false</IlcGenerateMapFile>
<PublishAot>true</PublishAot>
<PublishTrimmed>true</PublishTrimmed>
<PublishReadyToRun>true</PublishReadyToRun>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
<EnableAotAnalyzer>true</EnableAotAnalyzer>
<MaxCpuCount Condition="'$(MaxCpuCount)' == ''">0</MaxCpuCount>
</PropertyGroup>
<Project>
<ItemGroup>
<TrimmerRootAssembly Include="FlashCap" />
<TrimmerRootAssembly Include="FlashCap.Core" />
</ItemGroup>
</Project>
Log :
COM Interop requires ComWrapper instance registered for marshalling.
System.NotSupportedException
<unknown>
at System.Runtime.InteropServices.ComWrappers.ComObjectForInterface(IntPtr) + 0x76
at FlashCap.Internal.NativeMethods_DirectShow.CoCreateInstance(Guid& classId, Object outer, NativeMethods_DirectShow.CLSCTX classContext, Guid& iid, Object& created) + 0xa7
at FlashCap.Internal.NativeMethods_DirectShow.<EnumerateDeviceMoniker>d__48.MoveNext() + 0x65
at System.Linq.EnumerableExtension.<Collect>d__0`2.MoveNext() + 0xbf
at System.Linq.Enumerable.ConcatIterator`1.MoveNext() + 0x5b
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() + 0x51
at Jgj.FrontDesk.ViewModels.UsbCameraViewModel..ctor(Int32 defaultDevcieIndex, Int32 defaultVideoResolution, Boolean autoStart) + 0x26a
at Jgj.FrontDesk.ViewModels.RegisterViewModel..ctor() + 0xc80
at Jgj.FrontDesk.ViewModels.MainWindowViewModel..ctor() + 0x9d
at Jgj.FrontDesk.ViewModels.MainWindowViewModel..ctor(CancellationToken cancellationToken) + 0x36
at Jgj.FrontDesk.App.OnFrameworkInitializationCompleted() + 0xb8
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder, String[], Action`1) + 0x2f
at Jgj.FrontDesk.Program.Main(String[] args) + 0x547