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

FileNotFoundException when using referenced assembly in x64 project #870

Open
1 of 6 tasks
sasjaq opened this issue Feb 6, 2023 · 4 comments
Open
1 of 6 tasks

FileNotFoundException when using referenced assembly in x64 project #870

sasjaq opened this issue Feb 6, 2023 · 4 comments

Comments

@sasjaq
Copy link

sasjaq commented Feb 6, 2023

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

@sasjaq
Copy link
Author

sasjaq commented Feb 6, 2023

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

@sasjaq
Copy link
Author

sasjaq commented Feb 7, 2023

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

@Mrgaton
Copy link

Mrgaton commented Feb 22, 2023

Got same error with Interop.WMPLib

@Mrgaton
Copy link

Mrgaton commented Feb 22, 2023

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

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