There’s a thread on the Autodesk discussion forums about the ‘error’ messages displayed in the Visual Studio output window when you launch AutoCAD from the debugger. These messages look like this:
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=AutomationName; DataItem='ToolBarCustomizeButton' (HashCode=44123454); target element is 'ToolBarToggleButton' (Name='mCustomizeButton'); target property is 'Name' (type 'String')
The messages are disconcerting because they makesit look like there’s something horribly wrong with your project. Don’t panic – these messages don’t mean you’ve got a problem. They’re just a result of how Microsoft handles WPF behind the scenes, and have been appearing in the output windows of AutoCAD plug-in developers around the world since the AutoCAD 2009 release was launched with a WPF ribbonbar. You can safely ignore them.
If you want to go one step further and remove them, you can edit your acad.exe.config file (located in your AutoCAD installation folder) to add the lines highlighted in yellow below:
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
<!--All assemblies in AutoCAD are fully trusted so there's no point generating publisher evidence-->
<runtime>
<generatePublisherEvidence enabled="false"/>
</runtime>
<system.diagnostics>
<sources>
<source name="System.Windows.Data" switchName="SourceSwitch">
<listeners>
<remove name="Default" />
</listeners>
</source>
</sources>
</system.diagnostics>
</configuration>
While we’re at it, you also don’t have to worry about the ‘First Chance Exception’ errors you also see in the debugger output window when AutoCAD starts. These just indicate an exception has been thrown for some reason or other. An exception being thrown isn’t a big deal – the problem only comes if the are not handled.