1
我的WPF應用程序工作正常。但是,由於我試圖使用'MaskedTextBox'控制(Extended.Wpf.Toolkit.Plus.2.1.0),我得到以下生成錯誤:WPF應用程序使用擴展WPF Toolkit Plus v2.1.0時生成錯誤
«名稱空間中找不到類型或命名空間名稱'Controls' 'Microsoft.Windows'(是否缺少using指令或程序集引用?)»文件: 'MasterMenu.g.cs'
的窗口申報(XAML)如下:
<Window x:Class="myProject.Presentation.MainModule.MasterMenu"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:my="clr-namespace:CustomControls;assembly=MyGroupBox"
Title="myApplication-Démonstration"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
Loaded="Window_Loaded_1"
Closed="Window_Closed">
而且源文件'MasterMenu.cs'中的'使用'指令是:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Winlease.CrossCutting.Logging;
using CustomControls;
using UITools;
而在生成的文件 'MasterMenu.g.cs' 的使用是:
using CustomControls;
using Microsoft.Windows.Controls;
using Microsoft.Windows.Controls.Primitives;
using RootLibrary.WPF.Localization;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms.Integration;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
的錯誤
using Microsoft.Windows.Controls;
using Microsoft.Windows.Controls.Primitives;
我刪除斌的2個responsibles,OBJ目錄和我清理解決方案多次,我重建,但錯誤仍然存在。
預先感謝您。