2016-09-22 44 views
0

我创建一个VSIX插件和只是增加了一个WPF控件这样的: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'

我检查了项目的默认命名空间和其他相关配置,一切看起来不错。实际上,我在其他用户控件中编译得很好。

我在做什么错?

回答

0

此问题的根本原因是这条线在上述XAML:

Loaded="UserControl_Loaded" 

出于某种原因VSIX不喜欢在XAML布线事件。我只是将其删除并将其连接到代码隐藏

相关问题