所以我在两台不同的计算机上处理同一个WPF项目。
我正在使用bitbucket(git)来推送到一个在线存储库。
现在我刚刚在一台新计算机上收集了该项目,并希望运行该程序。但我得到以下错误:
The invocation of the constructor on type 'Henvendelser.MainWindow'
that matches the specified binding constraints threw an exception.'
Line number '5' and line position '9'.
现在这是我的XML:
<Window x:Class="Henvendelser.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:DV="clr-namespace:System.Windows.Controls.DataVisualization;assembly=System.Windows.Controls.DataVisualization.Toolkit"
xmlns:CHART="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
Title="Henvendelser" Height="699" Width="888">
<Grid>
<TabControl
Name="tabControl1"
Margin="0,61,0,0">
<TabItem
Header="Henvendelser"
Name="tabItem1">
<CHART:Chart
Name="Henvendelser"
Background="LightSteelBlue"
Title="Henvendelser"
FlowDirection="RightToLeft"
FontFamily="Calibri"
Visibility="Visible" Height="412">
<CHART:Chart.Series>
<CHART:LineSeries
IndependentValueBinding="{Binding Path=Key}"
DependentValueBinding="{Binding Path=Value}" AnimationSequence="FirstToLast">
</CHART:LineSeries>
<CHART:LineSeries
IndependentValueBinding="{Binding Path=Key}"
DependentValueBinding="{Binding Path=Value}" AnimationSequence="FirstToLast">
</CHART:LineSeries>
</CHART:Chart.Series>
</CHART:Chart>
</TabItem>
</TabControl>
<Button Content="Hent Data" Height="55" HorizontalAlignment="Left" Margin="744,12,0,0" Name="btn_hentData" VerticalAlignment="Top" Width="102"/>
<DataGrid AutoGenerateColumns="False" Height="100" HorizontalAlignment="Left" Margin="119,560,0,0" Name="dataGrid1" VerticalAlignment="Top" Width="727" />
</Grid>
这是第5行:
xmlns:CHART="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit
&#34;
现在起初我认为这是导入所以我试图再次导入所有的DLL文件,但没有结果
这是我的References
任何人都可以告诉我为什么我会得到这个执行以及我如何摆脱它?
**其他信息**
关于这个错误及其位置的有趣之处在于我实际上能够在我的GUI构建器中看到图表区域,即使我的图表导入存在问题。
这是一张图片: