We are having an issue with Microsoft.ServiceFabric.Actors.dll file in client. When we created the project using the Service Fabric template, the dll file exists in Service, but not in client, then we tried to reference that dll file from the client project, when we run the client, we got:
An unhandled exception of type 'System.BadImageFormatException' occurred in mscorlib.dll Additional information: Could not load file or assembly 'Microsoft.ServiceFabric.Actors, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Has anyone had the same issue with dll file, and if so, how should we fix it?
I received the same error when using a client outside of the Service Fabric Application. Make sure your client project is built for the x64 platform.
Follow these steps:
1. Right click on your client project and go to 'Properties'.
2. On the 'Build' tab, set your 'Platform target' to x64.
3. Build your project and use the client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With