C# wpf UserControl xaml的标记无效

C# wpf UserControl xaml的标记无效,c#,wpf,xaml,user-controls,C#,Wpf,Xaml,User Controls,今天,当我启动项目时,所有包含UserControl的视图都有:无效标记错误 <UserControl x:Class="ProjectName.View.LeftMenuControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/

今天,当我启动项目时,所有包含
UserControl
的视图都有:
无效标记
错误

   <UserControl x:Class="ProjectName.View.LeftMenuControl"
                 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:RaceFlightConfigurator.View"
                 xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
                 xmlns:UserControl="clr-namespace:ProjectName.View"
                 mc:Ignorable="d" 
                 d:DesignHeight="300" d:DesignWidth="300">
<UserControl:ConnectControl Margin="4"></UserControl:ConnectControl>

</UserControl>

我试图
重建解决方案
,从设计器中删除
卷影缓存
文件夹等,但没有任何帮助


项目运行良好。

我找到了解决方案。我在Mac上使用Parallels,我的项目在
/Mac/Username/Document
s等上。当我将项目移动到
C:
path时,所有工作都正常。

我找到了解决方案。我在Mac上使用Parallels,我的项目在
/Mac/Username/Document
s等上。当我将项目移动到
C:
path时,一切正常。

这是设计模式还是运行模式?如果是前者,则可能是您的
ConnectControl
在设计时未正确初始化。在设计模式下。用户控件有代码:
public分部类LeftMenuControl:UserControl{public LeftMenuControl(){DataContext=new LeftMenuViewModel();InitializeComponent();}}
如果它在今天之前工作,那么在
ConnectControl
中有什么变化?现在(例如)需要数据库连接吗?我刚刚测试了empty
UserControl
。没有代码等。当我尝试将其包含到
主窗口
或其他
视图
时,会出现相同的问题。这是在设计模式还是运行模式下?如果是前者,则可能是您的
ConnectControl
在设计时未正确初始化。在设计模式下。用户控件有代码:
public分部类LeftMenuControl:UserControl{public LeftMenuControl(){DataContext=new LeftMenuViewModel();InitializeComponent();}}
如果它在今天之前工作,那么在
ConnectControl
中有什么变化?现在(例如)需要数据库连接吗?我刚刚测试了empty
UserControl
。没有代码等。当我尝试将其包含到
main窗口
或其他
视图
时,会出现同样的问题。