Fody / Costura

Embed references as resources

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FileNotFoundException when using referenced assembly in x64 project

sasjaq opened this issue · comments

commented

IF YOU DON'T ANSWER THIS TEMPLATE - THE BOT WILL AUTOMATICALLY CLOSE YOUR ISSUE!

Please check all of the platforms you are having the issue on (if platform is not listed, it is not supported)

  • WPF
  • UWP
  • iOS
  • Android
  • .NET Standard
  • .NET Core

Component

What component is this issue occurring in?
Costura.Fody

Version of Library

5.7.0

Version of OS(s) listed above with issue

w11 (amd64)

Steps to Reproduce

  1. create library project (.net47 or .standard20)
  2. npm google.protobuf (or protobuf-net)
  3. create console project (.net47, x64!)
  4. reference library above
  5. use class from library in code
  6. FileNotFoundException occures

Expected Behavior

when targeting AnyCPU, everythings fine

Actual Behavior

when using class from referenced library, exception throws
image

when using code from Costura.AssemblyLoader and manualy load assembly/type/class, it works
image

the resource is always present, even compressed, uncompressed, every target combination on project and google.protobuf
image

tested on all combinations of targeted architecture, even rebuilding whole google.protobuf class to x64

commented

oops, images were mixed, first 2 are from protobuf-net, last one from google.protobuf... but they are same in both projects vice versa

commented

just for clarity:
SomeUsefullClass is empty class just to can select referenced assambly by type
Timestamp is prototype class referencing google.proto/proto-net, can't be used to select assembly, because it ends in FileNotFoundException

Got same error with Interop.WMPLib

when i updated visual studio code the error showed before worked fine :C