.NET

Reply
Member
darpz
Posts: 4
Registered: ‎02-26-2012
Message 1 of 4 (1,847 Views)
Accepted Solution

2012 to 2013 XamlParseException

1847 Views, 3 Replies
04-05-2012 07:47 AM

Hi all, i'm working on a .net plugin writed in c#.

Today i tried to run the debug into Autocad 2013 version...

When Autocad Starts (before i load the plugin witn NELOAD) i get an exception.

 

Tried to clean and rebuild;

Changed all references to the new path;

 

Any ideas?

 

thank you very much.

 

Dario.

 

 

System.Windows.Markup.XamlParseException was unhandled
Message=Provide value on 'System.Windows.Markup.StaticExtension' threw an exception.
Source=PresentationFramework
LineNumber=0
LinePosition=0
StackTrace:
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.ResourceDictionary.CreateObject(KeyRecord key)
at System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache)
at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.InitQATMenus()
at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.RestoreItems()
at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.Initialize()
at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.LoadQuickAccessToolbar()
InnerException: System.Reflection.TargetInvocationException
Message=Exception has been thrown by the target of an invocation.
Source=mscorlib
StackTrace:
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
at System.Windows.Markup.StaticExtension.GetFieldOrPropertyValue(Type type, String name, Object& value)
at System.Windows.Markup.StaticExtension.ProvideValue(IServiceProvider serviceProvider)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider)
InnerException: System.InvalidProgramException
Message=Common Language Runtime detected an invalid program.
Source=Acmgd
StackTrace:
at Autodesk.AutoCAD.ApplicationServices.Application.get_UIBindings()
InnerException:

Hi Dario,

 

I know your question is already some days old, but maybe still helpful??:

I've had the exact same problem as you (except that it was for AutoCAD2012), so I found your entry here - but unfortunately: no answer or solution. Other google hits didn't help.

Now, after spending some hours, I've figured it out myself: In the references of my project I had the properties for acmgd.dll and acdbmgd.dll not set to 'copy local: false'. After I changed this, the exception didn't occur anymore and I'm able to debug once again... :smileyhappy:

(Only by the way: the exception can be easily reproduced using one of the ObjectARX2012 sample projects 'Prompts', change target to .net4 (not sure if this is really necessary), change 'copy local' of acmgd.dll and acdbmgd.dll to true, select acad.exe for 'start external program', start debugging)

 

Hope this helps,

Silke

 

 

 

 

 

 

New Member
silke.foernzler
Posts: 1
Registered: ‎05-31-2012
Message 2 of 4 (1,713 Views)

Re: 2012 to 2013 XamlParseException

05-31-2012 01:13 AM in reply to: darpz

Hi Dario,

 

I know your question is already some days old, but maybe still helpful??:

I've had the exact same problem as you (except that it was for AutoCAD2012), so I found your entry here - but unfortunately: no answer or solution. Other google hits didn't help.

Now, after spending some hours, I've figured it out myself: In the references of my project I had the properties for acmgd.dll and acdbmgd.dll not set to 'copy local: false'. After I changed this, the exception didn't occur anymore and I'm able to debug once again... :smileyhappy:

(Only by the way: the exception can be easily reproduced using one of the ObjectARX2012 sample projects 'Prompts', change target to .net4 (not sure if this is really necessary), change 'copy local' of acmgd.dll and acdbmgd.dll to true, select acad.exe for 'start external program', start debugging)

 

Hope this helps,

Silke

 

 

 

 

 

 

Active Contributor
C-Hoppen
Posts: 45
Registered: ‎04-25-2002
Message 3 of 4 (424 Views)

Re: 2012 to 2013 XamlParseException

04-28-2014 04:03 AM in reply to: darpz

...and don't forget to delete any "local copies"! After setting "local copy" to false I still ran into this error.

I'm still wondering why "local copy" turned to true. Propably a Visual Studio Bug?

 

New Member
bikim
Posts: 1
Registered: ‎09-10-2013
Message 4 of 4 (321 Views)

Re: 2012 to 2013 XamlParseException

06-03-2014 08:54 PM in reply to: darpz

Thanks a lot. I've solved same problem in AutoCAD 2012.

I also set AcDbMgd and AcMgd to local copy:false.

Thanks again.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.