WPF 프로젝트가 있고 MainView가 정상적으로로드됩니다. 내보기에 아무 문제없이 컨트롤을 추가 할 수 있습니다. 내 컨트롤 중 하나에서이 프로젝트에서 참조되는 외부 프로젝트에서 컨트롤을 참조하고 해당 컨트롤을 XAML에 추가하면 XAML에서 올바른 항목을 봅니다. 이 컨트롤은 WPF Custom Controls Library에 있습니다. 그러나, 나는 그것을 실행할 때마다이 오류가 발생합니다.WPF, 다른 프로젝트의 사용자 컨트롤을 사용하면 오류가 발생합니다.
'xxxControl, PublicKeyToken = null'또는 해당 종속성 중 하나를로드 할 수 없습니다. 시스템이 지정된 파일을 파일 할 수 없습니다.
나는 이것을 과거에 해내 었으므로이 점을 잃어 버렸습니다. 프로젝트는 x64이고 컨트롤 x64도 만들었습니다.
<UserControl x:Class="Project.Views.LayoutViews.ColorScaleItem"
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:testC="clr-namespace:TestControl;assembly=TestControl"**
xmlns:local="clr-namespace:Project.Views.LayoutViews"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MaxWidth="20"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<testC:TestControl1 Grid.Row="1" Grid.Column="1"></testC:TestControl1>
</Grid>
</UserControl>
컨트롤이 다른 어셈블리에 종속되어 있습니까? 그것들은 Debug/Release 디렉토리에 존재하지 않을 수도 있습니다. –
나는 그것을 추가하는 컨트롤이 더 이상 사각형을 포함하는 UserControl 인 기본 레벨로 가져갔습니다 ... – yllams