environment = Win 8 pro x64, VS pro 2013 upd 4, .net fw 4.5.51641 and ACAD 2015 latest release.
Whenever I run a debug session in VS I see the error below, HOWEVER I do not see this error if I run ACAD normally (outside of VS)!
Can anyone explain why I am having this issue?
If you need more info please contact me.
NOTE: I looked at a previous post about this error which relates it to the video card.
If that is the case then way does it only happen in the debug environment of VS?
Application does not support just-in-time (JIT)
debugging. See the end of this message for details.
************** Exception Text **************
System.InvalidCastException: Unable to cast object of type 'Autodesk.AutoCAD.LivePreview.PreviewRuleProvider' to type 'Autodesk.AutoCAD.Internal.IPreviewContextProvider'.
at Autodesk.AutoCAD.LivePreview.PreviewContextService.LoadContext()
at Autodesk.AutoCAD.LivePreview.PreviewContextService.get_ContextProvider()
at Autodesk.AutoCAD.LivePreview.PreviewContextManager.OnIdleInitialize(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at Autodesk.AutoCAD.ApplicationServices.Core.Application.OnIdle()
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34014 built by: FX45W81RTMGDR
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
Acdbmgd
Assembly Version: 20.0.0.0
Win32 Version: 20.0.210.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202015/AcdbMgd.DLL
----------------------------------------
adui20
Assembly Version: 0.0.0.0
Win32 Version: 20.0.51.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202015/adui20.DLL
----------------------------------------
AdUiPalettes
Assembly Version: 20.0.0.0
Win32 Version: 20.0.51.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202015/AdUiPalettes.DLL
----------------------------------------
WindowsBase
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34004 built by: FX45W81RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34239 built by: FX452RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
PresentationFramework
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34004
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
----------------------------------------
PresentationCore
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34004 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.34230 built by: FX452RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
AdApplicationFrame
Assembly Version: 0.0.0.0
Win32 Version: 5.2.8.100
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202015/AdApplicationFrame.DLL
----------------------------------------
AdWindows
Assembly Version: 5.2.10.200
Win32 Version: 5.2.10.200
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202015/AdWindows.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: 20.0.0.0
Win32 Version: 20.0.210.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202015/accoremgd.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
----------------------------------------
Acmgd
Assembly Version: 20.0.0.0
Win32 Version: 20.0.210.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202015/Acmgd.DLL
----------------------------------------
AcWindows
Assembly Version: 20.0.0.0
Win32 Version: 20.0.210.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202015/AcWindows.DLL
----------------------------------------
AcCui
Assembly Version: 20.0.0.0
Win32 Version: 20.0.51.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202015/AcCui.DLL
----------------------------------------
AcWindows.resources
Assembly Version: 0.0.0.0
Win32 Version: 20.0.51.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202015/en-US/AcWindows.resources.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.34004 built by: FX45W81RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsFormsIntegration/v4.0_4.0.0.0__31bf3856ad364e35/WindowsFormsIntegration.dll
----------------------------------------
Acmgd
Assembly Version: 20.0.0.0
Win32 Version: 20.0.210.0.0
CodeBase: file:///C:/Users/Johan.EBCORP/Documents/Visual%20Studio%202013/CAD/Earthbound.ACAD.Plugin/Earthbound.ACAD.Plugin/bin/Debug/acmgd.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
----------------------------------------
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
----------------------------------------
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
----------------------------------------
accoremgd
Assembly Version: 20.0.0.0
Win32 Version: 20.0.210.0.0
CodeBase: file:///C:/Users/Johan.EBCORP/Documents/Visual%20Studio%202013/CAD/Earthbound.ACAD.Plugin/Earthbound.ACAD.Plugin/bin/Debug/accoremgd.dll
----------------------------------------
FeaturedAppsPlugin
Assembly Version: 20.0.0.0
Win32 Version: 20.0.46.0.0
CodeBase: file:///C:/ProgramData/Autodesk/ApplicationPlugins/Autodesk%20FeaturedApps.bundle/Contents/Windows/2015/Win64/FeaturedAppsPlugin.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
----------------------------------------
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
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
Assembly Version: 0.0.0.0
Win32 Version: 4.0.30319.34014 built by: FX45W81RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
ContextualTabSelectorRules
Assembly Version: 0.0.0.0
Win32 Version: 20.0.210.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202015/AcWindows.dll
----------------------------------------
Microsoft.Expression.Interactions
Assembly Version: 4.0.0.0
Win32 Version: 2.0.20520.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202015/Microsoft.Expression.Interactions.DLL
----------------------------------------
AcWindows
Assembly Version: 20.0.0.0
Win32 Version: 20.0.210.0.0
CodeBase: file:///C:/Users/Johan.EBCORP/Documents/Visual%20Studio%202013/CAD/Earthbound.ACAD.Plugin/Earthbound.ACAD.Plugin/bin/Debug/AcWindows.dll
----------------------------------------
AcLivePreviewContext
Assembly Version: 0.0.0.0
Win32 Version: 20.0.210.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202015/AcWindows.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
----------------------------------------
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
AcLivePreviewContext
Assembly Version: 0.0.0.0
Win32 Version: 20.0.210.0.0
CodeBase: file:///C:/Users/Johan.EBCORP/Documents/Visual%20Studio%202013/CAD/Earthbound.ACAD.Plugin/Earthbound.ACAD.Plugin/bin/Debug/AcWindows.dll
----------------------------------------
************** JIT Debugging **************
Application does not support Windows Forms just-in-time (JIT)
debugging. Contact the application author for more
information.
I know this is an old post but it happened to me by accident. I had the copy local = true for the autocad dll's and it was causing the issue. Setting the working directory on the debug page to C:\Program Files\Autodesk\AutoCAD 2015 fixed it for me. Alternatively you can do copy local = false.
Can you explain this to me like I'm 10 years old?
I got this same error when testing out the ability to "check out" a DWG file from ProjectWise to edit it. As soon as the AutoCAD drawing opened, I received this error. I clicked continue, but it crashed later from a fatal error when trying to modify a table within the drawing.
Can't find what you're looking for? Ask the community or share your knowledge.