HELP ME! assimp error on distribution
#2
(01-28-2022, 12:02 PM)kreativasas Wrote: HI,
i have a very big problem.

I released a program usign assimp (the latest version). compiling the program i need to use only x64 CPU.
In my bin folder I copied assimp64.dll and add a reference for assimpnet.dll
On my pc everything works as well, but whei i install the program on my customer pc i get an error:

It seems the program could not load assimp64.dll but the file exists on bin folder!!

SOMEBODY CAN HELP ME??

  Assimp.AssimpException: Error loading unmanaged library from path: Assimp64.dll, see inner exception for details.
Impossibile trovare il modulo specificato. (Eccezione da HRESULT: 0x8007007E) ---> System.IO.FileNotFoundException: Impossibile trovare il modulo specificato. (Eccezione da HRESULT: 0x8007007E)
   --- Fine della traccia dello stack dell'eccezione interna ---
   in Assimp.Unmanaged.AssimpLibraryWindowsImplementation.NativeLoadLibrary(String path)
   in Assimp.Unmanaged.AssimpLibraryImplementation.LoadAssimpLibrary(String path)
   in Assimp.Unmanaged.AssimpLibrary.LoadLibrary()
   in Assimp.Unmanaged.AssimpLibrary.IsExtensionSupported(String extension)
   in Ab3d.Assimp.AssimpWpfImporter.ReadFileToAssimpScene(String fileName)
   in Ab3d.Assimp.AssimpWpfImporter.ReadModel3D(String fileName, String texturesPath)
   in smart3dalign.Form1.Form1_Shown(Object sender, EventArgs e)
   in System.Windows.Forms.Form.OnLoad(EventArgs e)
   in System.Windows.Forms.Form.OnCreateControl()
   in System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   in System.Windows.Forms.Control.CreateControl()
   in System.Windows.Forms.Control.WmShowWindow(Message& m)
   in System.Windows.Forms.Control.WndProc(Message& m)
   in System.Windows.Forms.Form.WmShowWindow(Message& m)
   in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Hello, not sure if this will help i also use VB.NET and created a Loader class this may help you, i also included Assimp32.dll even though it is 64bit
Code:
#Region "Assimp Loader Class"
    Public Class AssimpLoader

        Public Shared Sub LoadAssimpNativeLibrary()
            Dim assimpLibraryFolder As String = AppDomain.CurrentDomain.BaseDirectory
            LoadAssimpNativeLibrary(assimpLibraryFolder, assimpLibraryFolder)
        End Sub
        Public Shared Sub LoadAssimpNativeLibrary(ByVal assimpLibraryFolder As String)
            LoadAssimpNativeLibrary(assimpLibraryFolder, assimpLibraryFolder)
        End Sub

        Public Shared Sub LoadAssimpNativeLibrary(ByVal assimp32BitLibraryFolder As String, ByVal assimp64BitLibraryFolder As String)
            Try
                AssimpWpfImporter.LoadAssimpNativeLibrary(assimp32BitLibraryFolder, assimp64BitLibraryFolder)
            Catch ex As AssimpException
                MessageBox.Show("Error loading native assimp library! The most common cause of this error is that the Visual C++ Redistributable for Visual Studio 2019 is not installed on the system. Please install it manually or contact support of the application. Error message:" & ex.Message)
                Throw
            End Try
        End Sub



    End Class
#End Region

The other thing i forgot to mention is in your solution explorer show all items right click on assimp64.dll and choose include in project then right click on assimp64.dll choose properties Build Action = Content
and also
Copy to Output Directory = Copy if newer
Kevan Hampson
  


Messages In This Thread
RE: HELP ME! assimp error on distribution - by GraPhiX - 01-28-2022, 12:18 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)