I have an application that replaces the AutoCAD tooltips with my own custom tooltips. Recently in AutoCAD the application will crash when trying to create the wpf user control. Basically, the user control is an empty container that I am populating at runtime, however the control crashes AutoCAD when I new it up with this line. (Sorry its an old application and in VB.NET)
Dim worxBoxToolTip = New WorxBoxToolTip()
The usercontrol itself has an empty constructor and in fact an empty class.
Public Class WorxBoxToolTip
End Class
The xml for the control is :
<UserControl x:Class="WorxBoxToolTip"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid x:Name="RootGrid" HorizontalAlignment="Left" VerticalAlignment="Top">
<TextBlock x:Name="ViewName" TextWrapping="Wrap" Text="View Name" Margin ="10,10,10,10" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Top"></TextBlock>
<DockPanel x:Name="LineContainer" HorizontalAlignment="Left" Margin="10,30,10,10" VerticalAlignment="Top">
<StackPanel x:Name="StackPanelName" Orientation="Vertical" VerticalAlignment="Top" MaxWidth="290" />
<WrapPanel x:Name="StackPanelValue" Orientation="Vertical" VerticalAlignment="Top" />
</DockPanel>
</Grid>
</UserControl>
When the code tries to new up the control it throws the following error:
System.IO.FileNotFoundException: 'Could not load file or assembly 'VIEWWorx, Version=2019.2.259.1223, Culture=neutral' or one of its dependencies. The system cannot find the file specified.'
Now obviously it can find the dll as it is the one currently loaded. What is crazy is the version of the dll is incorrect. The current version loaded is 2020.x.x.x. There is no way i could reference an earlier version as it would be a circular reference.
Any ideas?