exception error in autocad 2013 .net api with visual studio

exception error in autocad 2013 .net api with visual studio

Anonymous
Not applicable
796 Views
1 Reply
Message 1 of 2

exception error in autocad 2013 .net api with visual studio

Anonymous
Not applicable

hi there , i'm having this exception when attemp to test a  visual studio class library . in this class i'm using autocad 2013 c# API ,  the error is as following  ..

 

Application does not support just-in-time (JIT)
debugging. See the end of this message for details.

************** Exception Text **************
System.TypeInitializationException: The type initializer for 'Xbim.IO.Memory.MemoryModel' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a' or one of its dependencies. The system cannot find the file specified.
at Xbim.IO.Memory.MemoryModel..cctor()
--- End of inner exception stack trace ---
at Xbim.IO.Memory.MemoryModel.GetFileHeader(String fileName)
at Xbim.Ifc.IfcStore.GetIfcSchemaVersion(String path, String& schemaIdentifier) in C:\BuildAgent\work\77d7b8e93613846d\Xbim.Ifc\IfcStore.cs:line 378
at Xbim.Ifc.IfcStore.Open(String path, XbimEditorCredentials editorDetails, Nullable`1 ifcDatabaseSizeThreshHold, ReportProgressDelegate progDelegate, XbimDBAccess accessMode) in C:\BuildAgent\work\77d7b8e93613846d\Xbim.Ifc\IfcStore.cs:line 285
at CadLibrary.Class1.DrawModel() in c:\Users\lenovo\Desktop\CadLibrary\CadLibrary\Class1.cs:line 267
at Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorker(MethodInfo mi, Object commandObject, Boolean bLispFunction)
at Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorkerWithExceptionFilter(MethodInfo mi, Object commandObject, Boolean bLispFunction)
at Autodesk.AutoCAD.Runtime.CommandClass.CommandThunk.Invoke()


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34011 built by: FX45W81RTMGDR
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
Acdbmgd
Assembly Version: 19.0.0.0
Win32 Version: 19.0.55.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/AcdbMgd.DLL
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34003 built by: FX45W81RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
AdApplicationFrame
Assembly Version: 0.0.0.0
Win32 Version: 3.5.19.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/AdApplicationFrame.DLL
----------------------------------------
AdWindows
Assembly Version: 3.5.21.0
Win32 Version: 3.5.21.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/AdWindows.DLL
----------------------------------------
PresentationFramework
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34003
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
----------------------------------------
WindowsBase
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34003 built by: FX45W81RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
PresentationCore
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34003 built by: FX45W81RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
----------------------------------------
System.Xaml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
PresentationFramework.Aero2
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero2/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero2.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
accoremgd
Assembly Version: 19.0.0.0
Win32 Version: 19.0.55.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/accoremgd.DLL
----------------------------------------
Acmgd
Assembly Version: 19.0.0.0
Win32 Version: 19.0.55.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/Acmgd.DLL
----------------------------------------
AcWindows
Assembly Version: 19.0.0.0
Win32 Version: 19.0.55.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/AcWindows.DLL
----------------------------------------
AcCui
Assembly Version: 19.0.0.0
Win32 Version: 19.0.55.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/AcCui.DLL
----------------------------------------
PresentationFramework-SystemXml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemXml/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemXml.dll
----------------------------------------
PresentationFramework.Aero
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero.dll
----------------------------------------
WindowsFormsIntegration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34003 built by: FX45W81RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsFormsIntegration/v4.0_4.0.0.0__31bf3856ad364e35/WindowsFormsIntegration.dll
----------------------------------------
AcWindows.resources
Assembly Version: 19.0.0.0
Win32 Version: 19.0.55.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/en-US/AcWindows.resources.DLL
----------------------------------------
PresentationUI
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationUI/v4.0_4.0.0.0__31bf3856ad364e35/PresentationUI.dll
----------------------------------------
System.Xml.Linq
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
PresentationFramework-SystemXmlLinq
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemXmlLinq/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemXmlLinq.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
RibbonSample
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/ProgramData/Autodesk/ApplicationPlugins/myApp.bundle/Application/RibbonSample.dll
----------------------------------------
ContextualTabSelectorRules
Assembly Version: 0.0.0.0
Win32 Version: 19.0.55.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/AcWindows.dll
----------------------------------------
ManagedMC3
Assembly Version: 6.4.0.0
Win32 Version: 6.4.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/ManagedMC3.DLL
----------------------------------------
PresentationFramework-SystemCore
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemCore/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemCore.dll
----------------------------------------
UIAutomationTypes
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/UIAutomationTypes/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationTypes.dll
----------------------------------------
AcLivePreviewContext
Assembly Version: 0.0.0.0
Win32 Version: 19.0.55.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/AcWindows.dll
----------------------------------------
AcLayer
Assembly Version: 19.0.0.0
Win32 Version: 19.0.55.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/AcLayer.DLL
----------------------------------------
AcLayer.resources
Assembly Version: 19.0.0.0
Win32 Version: 19.0.55.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/en-US/AcLayer.resources.DLL
----------------------------------------
PresentationFramework.Luna
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Luna/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Luna.dll
----------------------------------------
UIAutomationProvider
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/UIAutomationProvider/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationProvider.dll
----------------------------------------
CadLibrary
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/lenovo/Desktop/CadLibrary/CadLibrary/bin/Debug/CadLibrary.dll
----------------------------------------
AcMrUi
Assembly Version: 19.0.0.0
Win32 Version: 19.0.55.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/AcMrUI.DLL
----------------------------------------
AcMrUi.resources
Assembly Version: 19.0.0.0
Win32 Version: 19.0.55.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202013/en-US/AcMrUi.resources.DLL
----------------------------------------
Xbim.Ifc
Assembly Version: 4.0.0.0
Win32 Version: 4.0.1701.17250
CodeBase: file:///C:/Users/lenovo/Desktop/CadLibrary/CadLibrary/bin/Debug/Xbim.Ifc.DLL
----------------------------------------
Xbim.Common
Assembly Version: 4.0.0.0
Win32 Version: 4.0.1701.17250
CodeBase: file:///C:/Users/lenovo/Desktop/CadLibrary/CadLibrary/bin/Debug/Xbim.Common.DLL
----------------------------------------
Xbim.Ifc4
Assembly Version: 4.0.0.0
Win32 Version: 4.0.1701.17250
CodeBase: file:///C:/Users/lenovo/Desktop/CadLibrary/CadLibrary/bin/Debug/Xbim.Ifc4.DLL
----------------------------------------
Xbim.IO
Assembly Version: 4.0.0.0
Win32 Version: 4.0.1701.17250
CodeBase: file:///C:/Users/lenovo/Desktop/CadLibrary/CadLibrary/bin/Debug/Xbim.IO.DLL
----------------------------------------
ICSharpCode.SharpZipLib
Assembly Version: 0.86.0.518
Win32 Version: 0.86.0.518
CodeBase: file:///C:/Users/lenovo/Desktop/CadLibrary/CadLibrary/bin/Debug/ICSharpCode.SharpZipLib.DLL
----------------------------------------
Xbim.Ifc2x3
Assembly Version: 4.0.0.0
Win32 Version: 4.0.1701.17250
CodeBase: file:///C:/Users/lenovo/Desktop/CadLibrary/CadLibrary/bin/Debug/Xbim.Ifc2x3.DLL
----------------------------------------

************** JIT Debugging **************
Application does not support Windows Forms just-in-time (JIT)
debugging. Contact the application author for more
information.

 

 

 

 

=================== and here is my code ===============================

using (Transaction trans = acDb.TransactionManager.StartTransaction())
{

BlockTable BlkTbl;
BlkTbl = trans.GetObject(acDb.BlockTableId, OpenMode.ForRead) as BlockTable;

BlockTableRecord BlkTblRec;
BlkTblRec = trans.GetObject(BlkTbl[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;


using (var model = IfcStore.Open("model.ifc"))
{

//some logic 

}

 trans.Commit();

}

0 Likes
797 Views
1 Reply
Reply (1)
Message 2 of 2

ActivistInvestor
Mentor
Mentor
The exception says that the runtime cannot find an assembly:

System.IO.FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.15.0,
0 Likes