stilldesign / PhysX.Net

A .NET wrapper for NVIDIA PhysX 4.1.2 written using C++/CLI.
MIT License
206 stars 54 forks source link

Cannot run compiled file-Missing dependencies (USING WINDOW 10) #20

Closed thunguyenphuoc closed 8 years ago

thunguyenphuoc commented 8 years ago

Hello, I wrote a very simple bounding box scene just to test the workflow (I use Nuget to get the package and dependencies). I can compile the file but when I run the file it gives out the error of:

"An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

Additional information: Could not load file or assembly 'PhysX.Net.dll' or one of its dependencies. The specified module could not be found."

I'm using window 10 64 bit, Visual Studio 2015.

Any thoughts on this?

Regards

stilldesign commented 8 years ago

Hey, The nuget package should install the few required native PhysX DLLs to enable PhysX.Net to run, so it's probably some other missing DLL. To debug these kinds of missing file exceptions - you'll need to use the fusion log viewer

Fuslogvw.exe is in the Windows SDK: C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\FUSLOGVW.exe

To enable it: http://stackoverflow.com/questions/255669/how-to-enable-assembly-bind-failure-logging-fusion-in-net

AnderT commented 8 years ago

Hi, I had the same problem after upgrading to 2015 RTM. Did some digging with Procmon and noticed the following DLLs could not be found;

msvcp120d.dll msvcr120d.dll

I had to revert to the preview and copy the DLLs. I dropped them into my output directory and now all is good, even after upgrading again. I have attached a zip containing them, you will need to change the extension to zip.

MissingDLLs.txt

Ander

thunguyenphuoc commented 8 years ago

Hi Chad @stilldesign , Thank you for your reply. I followed your advice and try to find the missing dll but didn't succeed, but seems like @AnderT has found the solution. I will have a look into them. Thank you to you both.

Updated: IT WORKED! Thank your very much @AnderT Thu

stilldesign commented 8 years ago

Hi, Good to hear :) Yes, PhysX.Net.dll is currently in VS2013 (which is v12) and the nuget package installs the debug version of PhysX.Net.dll which in-tern uses the debug version of the C++ runtime, hence why it's looking for msvcp120d and msvcr120d.

I should update the solution and nuget package to 2015 at some point :)

AnderT commented 8 years ago

Hi Thu,

Very happy to have been able to help : )