Skip to content

[Issue] Single file deployment module loading issue #233

@Coolkeke

Description

@Coolkeke

Description

An exception occurred while rewriting the CreateModulaeCatalog method, causing the program to be unable to perform directory scanning and loading

Environment

  • OS: Windows 10
  • Prism.Avalonia Version: 9.0.537.11130
  • Avalonia Version: 11.3.0

Steps To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Rewrite the CreateModulus eCatalog method in App. axaml. cs'
  2. Deploy the program as a single file
  3. Run the currently deployed program
  4. Error message :
Application: Prism.AvaloniaDemo.exe
CoreCLR Version: 7.0.2024.26716
.NET Version: 7.0.20
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Exception: There was an error loading assemblies.
 ---> System.ArgumentException: The path is empty. (Parameter 'path')
   at System.IO.Path.GetFullPath(String path)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at Prism.Modularity.DirectoryModuleCatalog.InnerLoad()
   --- End of inner exception stack trace ---
   at Prism.Modularity.DirectoryModuleCatalog.InnerLoad()
   at Prism.Modularity.ModuleCatalogBase.Initialize()
   at Prism.Modularity.ModuleManager.Run()
   at Prism.PrismApplicationBase.Initialize()
   at Avalonia.AppBuilder.SetupUnsafe()
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action`1 lifetimeBuilder)
   at Prism.AvaloniaDemo.Program.Main(String[] args) in C:\Users\keke\Desktop\Dera.Avalonia\Dera.Avalonia\Prism.AvaloniaDemo\Program.cs:line 12

Expected Behavior

The program cannot run

Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions