Jennilein1991 / assimp-net

Automatically exported from code.google.com/p/assimp-net
0 stars 0 forks source link

Cannot find Assimp32.dll in library project #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please provide any additional information below.

Within a c# library project (XNA library project to be exact) I am using 
assimpNet.dll and it always crashes saying that it can't find Assimp32.dll

Assimp32.dll is in the same file location as the assimpNet.dll and in the same 
location as the build output folder, as well as output where the main .exe is 
built that references the library.

Where does it want me to put it? 

In the error you will also notice references to folders that are not part of my 
folder structure at all (Nicolas is not part of my User list).

This is the exact error:

Error   37  Building content threw AssimpException: Error loading unmanaged 
library from path: Assimp32.dll, see inner exception for details.
The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at Assimp.Unmanaged.AssimpLibraryImplementation.LoadLibrary(String path) in C:\Users\Nicholas\Documents\Visual Studio 2010\Projects\AssimpNet\AssimpNet\Unmanaged\AssimpLibrary.cs:line 1164
   at Assimp.Unmanaged.AssimpLibrary.LoadLibrary(String libPath) in C:\Users\Nicholas\Documents\Visual Studio 2010\Projects\AssimpNet\AssimpNet\Unmanaged\AssimpLibrary.cs:line 111
   at Assimp.Unmanaged.AssimpLibrary.LoadLibrary(String lib32Path, String lib64Path) in C:\Users\Nicholas\Documents\Visual Studio 2010\Projects\AssimpNet\AssimpNet\Unmanaged\AssimpLibrary.cs:line 124
   at Assimp.Unmanaged.AssimpLibrary.LoadLibrary() in C:\Users\Nicholas\Documents\Visual Studio 2010\Projects\AssimpNet\AssimpNet\Unmanaged\AssimpLibrary.cs:line 97
   at Assimp.Unmanaged.AssimpLibrary.EnableVerboseLogging(Boolean enable) in C:\Users\Nicholas\Documents\Visual Studio 2010\Projects\AssimpNet\AssimpNet\Unmanaged\AssimpLibrary.cs:line 343
   at Assimp.AssimpImporter.PrepareImport() in C:\Users\Nicholas\Documents\Visual Studio 2010\Projects\AssimpNet\AssimpNet\AssimpImporter.cs:line 930
   at Assimp.AssimpImporter.ImportFile(String file, PostProcessSteps postProcessFlags) in C:\Users\Nicholas\Documents\Visual Studio 2010\Projects\AssimpNet\AssimpNet\AssimpImporter.cs:line 284
   at ModelAnimationPipeline.ModelAnimationImporterFbx.Import(String filename, ContentImporterContext context) in C:\Users\Joshua\Desktop\Work\SneakyPants3DStuff\AndAgain\TheGreatAlienEscape\src\ModelAnimationPipeline\ModelAnimationImporter.cs:line 38
   at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetDirectly(BuildItem item, String importerName)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
   at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, TimestampCache timestampCache, ITaskItem[] sourceAssets, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates, Dictionary`2& dependencyTimestamps, KeyValuePair`2[]& warnings)
    Inner exception: FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)   C:\Users\Joshua\Desktop\Work\SneakyPants3DStuff\AndAgain\TheGreatAlienEscape\src\ProjectSneakyGame\ProjectSneakyGameContent\NPC2.fbx    ProjectSneakyGame

Original issue reported on code.google.com by sorakuka...@hotmail.com on 12 Dec 2013 at 5:55

GoogleCodeExporter commented 9 years ago
Since you're integrating this into the XNA content pipeline, off the top of my 
head this may be an issue with how the task is executed. The default path is 
just the DLL name, which following the DLL search order:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586%28v=vs.85%29.as
px#standard_search_order_for_desktop_applications

Usually means it should be #1, where the application is first loaded. It kind 
of sounds like this is not the case when the XNA content pipeline is in play. 
You can pass in a path to location of the unmanaged DLL by initializing 
"AssimpLibrary" yourself. This is the preferred way to go about things in a 
situation like this.

Original comment by nicholas.woodfield on 12 Dec 2013 at 4:59

GoogleCodeExporter commented 9 years ago

Original comment by nicholas.woodfield on 3 Jul 2014 at 2:48