environment = Win 8 pro x64, VS 2013 pro upd 4, ACAD 2015.
This error is thrown everytime I start my plugin in debug mode, however when I run ACAD outside of the debugger no issues. Can anyone tell me why this is happening?
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.
Solved! Go to Solution.
Solved by EBCorp. Go to Solution.
Solved by Jeff_M. Go to Solution.
Jeff_M. Could you give some more details as to where I change the CopyLocal property. I am using Autocad LT and experiencing the same problem.
Thanks
You can set the CopyLocal of a reference in Visual Studio by selecting the reference in the Solution Explorer to open ist Property window where you can find the CopyLocal.
Anyway, assuming you're using AutoCAD LT, your real problem is that AutoCAD LT does not support any programmation. You have to use a full version to be able to run .NET plugins (as well as LISP, VBA or ObjectARX applications).
Thanks Gile. Unfortunately I am just a user of the plugin not the programmer. I was hoping this would be a setting I could change in Autocad LT.