2016-09-22 8 views
0

나는 VSIX 플러그인을 작성하고 그냥이 같은 WPF 컨트롤 추가 해요 : 내가 프로젝트 I를 컴파일 할 때VSIX CS0426 t 유형 이름 뷰 유형에 존재하지 않는 'ABC'

<UserControl x:Class="ABC.Views.Configuration.MyControl" 
      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:local="clr-namespace:ABC.Views.Configuration" 
      mc:Ignorable="d" 
      Loaded="UserControl_Loaded" 
      d:DesignHeight="300" d:DesignWidth="300"> 
    <Grid> 
    </Grid> 
</UserControl> 

을 오류가 발생했습니다 : CS0426 유형 이름보기가 'ABC'유형에 존재하지 않습니다.

프로젝트의 기본 네임 스페이스 및 기타 관련 구성을 점검했는데 모든 것이 좋게 보입니다. 사실, 나는 같은 디렉터리에 다른 사용자 정의 컨트롤을 가지고 있어도 괜찮습니다.

내가 뭘 잘못하고 있니? VSIX는 XAML에서 이벤트를 배선 좋아하지 않는 몇 가지 이유를 들어

Loaded="UserControl_Loaded" 

:

답변

0

이 문제의 근본 원인은 위의 XAML에서이 줄을이었다. 간단히이 코드를 제거하고 코드 숨김 코드로 묶었습니다