07-06-2021 09:56 AM
Hello,
when starting (debugging) our Application with Visual Studio 2019 with AnyCPU we receive a System.NullReferenceException at NationalInstruments.Internal.SlcpHelper.d(). See Error_01.png and Error_02.png.
When we set "prefer 32-bit" in the project-settings (see App-Settings.png) it start without Exception.
.NET-Framework 4.7.2 and 4.8
Where is our Error?
Do you need more Informations?
<UserControl x:Class="CMO.Common.Controls.NI.Graph.MixedGraphBindable"
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"
xmlns:ni="http://schemas.ni.com/controls/2009/xaml/presentation"
xmlns:niPrimitives="http://schemas.ni.com/controls/2009/xaml/presentation/primitives"
xmlns:niData="clr-namespace:CMO.Common.Controls.NI.Example"
xmlns:local="clr-namespace:CMO.Common.Controls.NI.Graph"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance {x:Type niData:DataholderGraphWpf}, IsDesignTimeCreatable=True}"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!--<ni:GraphThumbnail Grid.Column="0" Grid.Row="0" GraphAdapter="{Binding ElementName=niGraph}" MaxHeight="50" />-->
<ni:Graph x:Name="niGraph" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="1" Grid.RowSpan="2"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
DataSource="{Binding Data}" FontWeight="Bold" FontSize="15"
local:GraphExtensions.AxesSource="{Binding Axes}" local:GraphExtensions.PlotsSource="{Binding Plots}"
niPrimitives:GraphConfiguration.ProcessAllAsynchronousUpdates="False"
niPrimitives:GraphConfiguration.UseBackgroundProcessing="True"
niPrimitives:GraphConfiguration.UseBackgroundRendering="False"
Interactions="ZoomHorizontal, PanHorizontal">
</ni:Graph>
<Expander Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" ExpandDirection="Left" IsExpanded="False"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Header="{Binding}">
<Expander.HeaderTemplate>
<DataTemplate>
<Grid VerticalAlignment="{Binding VerticalAlignment, RelativeSource={RelativeSource AncestorType=ContentPresenter}, Mode=OneWayToSource}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ni:GraphInteractionPalette Grid.Row="2" Graph="{Binding ElementName=niGraph}"
Orientation="Vertical" />
<!--<TextBlock Grid.Row="1" Text="T" />-->
<TextBlock Grid.Row="0" Text="Legende" HorizontalAlignment="Center">
<TextBlock.LayoutTransform>
<TransformGroup>
<RotateTransform Angle="-90"/>
</TransformGroup>
</TextBlock.LayoutTransform>
</TextBlock>
</Grid>
</DataTemplate>
</Expander.HeaderTemplate>
<Expander.Content>
<ni:Legend ItemsSource="{Binding ElementName=niGraph, Path=Plots}"/>
</Expander.Content>
</Expander>
<CheckBox x:Name="chkRefresh" Grid.Row="2" Grid.Column="2" IsChecked="{Binding UseAutomaticRefresh}"
ToolTip="Automatische Aktualisierung aktiv?" HorizontalAlignment="Center" />
</Grid>
</UserControl>
Measurement Studio 2019
Edition: Enterprise
Integration Version: 19.0.4.49154