Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avalonia aot 启动失败 #136

Open
yangjieshao opened this issue Feb 29, 2024 · 0 comments
Open

Avalonia aot 启动失败 #136

yangjieshao opened this issue Feb 29, 2024 · 0 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@yangjieshao
Copy link

yangjieshao commented Feb 29, 2024

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
@kekyo kekyo added help wanted Extra attention is needed question Further information is requested labels Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants