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

Embedding a library that is an exe results in FileNotFoundException #19

Closed
xiperware opened this issue Jun 19, 2013 · 2 comments
Closed

Comments

@xiperware
Copy link

An exe can be added as a project reference when you need to reuse some code from it. Costura correctly embeds the assembly (as "costura.sharedlibexe.exe.zip), but fails to resolve it when the parent exe runs.

Using v0.3.2.0.

Example solution at http://www.sendspace.com/file/bs6b9v
To replicate, build, move resulting StartupExe.exe out to a new folder, run, press a key, observe exception.

System.IO.FileNotFoundException was unhandled
  HResult=-2147024894
  Message=Could not load file or assembly 'SharedLibExe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
  Source=StartupExe
  FileName=SharedLibExe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  FusionLog==== Pre-bind state information ===
LOG: User = DOMAIN\me
LOG: DisplayName = SharedLibExe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = file:///C:/VS Projects/TestCostura/StartupExe/bin/
LOG: Initial PrivatePath = NULL
Calling assembly : StartupExe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: The same bind was seen before, and was failed with hr = 0x80070002.

  StackTrace:
       at StartupExe.Program.GetValue()
       at StartupExe.Program.Main(String[] args)
  InnerException:
@distantcam
Copy link
Member

Fixed in 0.3.2.1

@xiperware
Copy link
Author

Tested, works, thanks for the super quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants