'Teigha.Core.GlobalsPINVOKE' threw an exception in deployed application but not in debug mode.

Hello, 

I am getting an error in my deployed Winform application but not when I run in debug mode. When I try to export a dwg file in deployed application, this error pops up.

The details of the exception is 


devDept.EyeshotException: The type initializer for 'Teigha.Core.GlobalsPINVOKE' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'Teigha.Core.GlobalsPINVOKE' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
 ---> System.DllNotFoundException: Unable to load DLL 'TD_SwigCore_23.11_14.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)
   at Teigha.Core.GlobalsPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_Globals(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate)
   at Teigha.Core.GlobalsPINVOKE.SWIGExceptionHelper..cctor()
   --- End of inner exception stack trace ---
   at Teigha.Core.GlobalsPINVOKE.SWIGExceptionHelper..ctor()
   at Teigha.Core.GlobalsPINVOKE..cctor()
   --- End of inner exception stack trace ---
   at Teigha.Core.GlobalsPINVOKE.new_RxSystemServicesImpl()
   at Teigha.Core.RxSystemServicesImpl..ctor()
   at devDept.Eyeshot.Translators.Autodesk.#=z46VVP5JCbzjUu9plAg==..ctor()
   at devDept.Eyeshot.Translators.Autodesk.InitializeServices()
   at devDept.Eyeshot.Translators.WriteAutodesk.PrepareForWriting(String xRefName, Dictionary`2 savedXRefPaths, IList`1 myEntities, LayerKeyedCollection myLayers, BlockKeyedCollection myBlocks, TextStyleKeyedCollection myTextStyles, LineTypeKeyedCollection myLineTypes, MaterialKeyedCollection myMaterials, LayerKeyedCollection& layersToSave, TextStyleKeyedCollection& textStylesToSave, LineTypeKeyedCollection& lineTypesToSave, MaterialKeyedCollection& materialsToSave, Dictionary`2& mapLayersOldNew, Dictionary`2& currXRefPaths, BlockKeyedCollection& blocksToSave)
   at devDept.Eyeshot.Translators.WriteAutodesk.#=zBWoRJoPiC3x2B6S1$g==(Dictionary`2 #=zY6oVDKdKP5Ei, String #=zxdhLeFhCdMXX, IList`1 #=z355UqdM3vN0G, LayerKeyedCollection #=zDAY8TgEkTv2U, BlockKeyedCollection #=zQIVc92FM5lcu, TextStyleKeyedCollection #=zjJ3hm$_hDKC4, LineTypeKeyedCollection #=zTciDncqjMPiw, MaterialKeyedCollection #=zWn2OkGxVirl1vP7v_g==, linearUnitsType #=zrHT5szmvOiwU, attributeReferenceVisibilityType #=zkZJ7azU1E0ys, BackgroundWorker #=zh6eyLYc=, DoWorkEventArgs #=z2wAgN41KKKWm)
   --- End of inner exception stack trace ---
   at devDept.Eyeshot.Translators.WriteAutodesk.#=zBWoRJoPiC3x2B6S1$g==(Dictionary`2 #=zY6oVDKdKP5Ei, String #=zxdhLeFhCdMXX, IList`1 #=z355UqdM3vN0G, LayerKeyedCollection #=zDAY8TgEkTv2U, BlockKeyedCollection #=zQIVc92FM5lcu, TextStyleKeyedCollection #=zjJ3hm$_hDKC4, LineTypeKeyedCollection #=zTciDncqjMPiw, MaterialKeyedCollection #=zWn2OkGxVirl1vP7v_g==, linearUnitsType #=zrHT5szmvOiwU, attributeReferenceVisibilityType #=zkZJ7azU1E0ys, BackgroundWorker #=zh6eyLYc=, DoWorkEventArgs #=z2wAgN41KKKWm)
   at devDept.Eyeshot.Translators.WriteAutodesk.DoWork(BackgroundWorker worker, DoWorkEventArgs doWorkEventArgs)
   at devDept.WorkUnit.DoWork()
   at Batimat.Classes.ExportFile.export(DesignDocument design1)
   at Batimat.BendEqualPart.Export_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)

I am not sure what can raise the issue as `TD_SwigCore_23.11_14.dll` is present in publish folder also. And as it is not getting raised in debug mode, it is getting difficult to understand what could be the reason for this issue.

Version:
Visual Studio 2022

.Net 6.0 Winform

devDept 2023

0

Comments

1 comment
Date Votes
  • Hello Dhananjay,
     
    We sincerely apologize for the inconvenience you've experienced. The issue you've encountered is a known limitation associated with the NuGet package structure of Eyeshot 2023.
    We're pleased to inform you that this has been addressed in the latest Eyeshot 2024 release. 
     
    However, to resolve this for Eyeshot 2023, a manual step is required. Please follow the instructions below to ensure your application functions correctly:
     

    1. Navigate to the NuGet cache folder located at %userprofile%\.nuget\packages\devdept.eyeshot.x64(x86)\2023.x.xxx.
       
    2. From there, you will need to manually copy:
      - All files within the content subfolder.
      - All DLL files contained in the lib\net6.0 subfolder.
       
    3. Paste these files into the output folder of your published application.

     
    These steps will circumvent the current limitation and allow your application to operate as intended.

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post