C#/ XAML编译错误 - 各种错误(该名称与QUOT; LayoutAwarePage"不存在") [英] C#/XAML Compile Error - Various Errors (The name "LayoutAwarePage" does not exist")
问题描述
修改
下面是该代码的pastebins:
编辑2
我已经加入一个MS连接请求在此处:
I have added a MS Connect ticket here:
右键一个摸不到头脑,我很希望其他人经验丰富,知道如何解决因为我对整个事件有点心灰意冷。
Right a head scratcher which I'm hoping others have experienced and know how to resolved as I'm a little disheartened by the whole affair.
问题
我一直用C#/ XAML的时间熟悉工作在Windows Store应用。所花时间的学习后,我决定开始自己的应用程序,这是罚款。问题是,加入了一些看法等等,我开始我的XAML文件中出现以下错误(全部)后:
I have been working on a Windows Store App using C#/XAML to learn the ropes. After hours spent learning I decided to start my own App, which is fine. The issue is, after adding a few Views etc, I started getting the following error within my XAML files (All of them):
错误5LayoutAwarePage的名字没有出现在命名空间
:Accountable.Common使用的存在。 G:\Coding Projects\Visual工作室
2012\SAVED\Accountable\Accountable\BasicPage1.xaml 1问责
Error 5 The name "LayoutAwarePage" does not exist in the namespace "using:Accountable.Common". G:\Coding Projects\Visual Studio 2012\SAVED\Accountable\Accountable\BasicPage1.xaml 1 1 Accountable
这很奇怪,因为在 Accountable.Common 与XAML文件中声明:
Which is strange because the Accountable.Common is declared within the XAML file:
<common:LayoutAwarePage
x:Name="pageRoot"
x:Class="Accountable.BasicPage1"
DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Accountable"
xmlns:common="using:Accountable.Common"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
所以,我读的这里,关闭XAML文件下来,结束的Visual Studio 2012 并重新开放,加上大厦,解决了这个问题。它没有。现在导致当你第一次创建新的模板创建的公共文件中出现以下错误:
So i read here that closing the XAML files down and closing Visual Studio 2012 and re-opening, plus Building, resolves this issue. It didnt. It now causes the following errors within the Common files created when you first create new templates:
错误1'Accountable.Common.BooleanNegationConverter'呢没有
实现接口成员
'Windows.UI.Xaml.Data.IValueConverter.ConvertBack(对象的System.Type,
对象,字符串)G:\Coding Projects\Visual工作室
2012\SAVED\Accountable\Accountable\Common\BooleanNegationConverter.cs 9月25日负责任
Error 1 'Accountable.Common.BooleanNegationConverter' does not implement interface member 'Windows.UI.Xaml.Data.IValueConverter.ConvertBack(object, System.Type, object, string)' G:\Coding Projects\Visual Studio 2012\SAVED\Accountable\Accountable\Common\BooleanNegationConverter.cs 9 25 Accountable
错误2'Accountable.Common.BooleanNegationConverter'呢没有
实现接口成员
'Windows.UI.Xaml.Data.IValueConverter.Convert(对象的System.Type,
对象,字符串)G:\Coding Projects\Visual工作室
2012\SAVED\Accountable\Accountable\Common\BooleanNegationConverter.cs 9月25日负责任
Error 2 'Accountable.Common.BooleanNegationConverter' does not implement interface member 'Windows.UI.Xaml.Data.IValueConverter.Convert(object, System.Type, object, string)' G:\Coding Projects\Visual Studio 2012\SAVED\Accountable\Accountable\Common\BooleanNegationConverter.cs 9 25 Accountable
错误3'Accountable.Common.BooleanToVisibilityConverter'呢没有
实现接口成员
'Windows.UI.Xaml.Data.IValueConverter.ConvertBack(对象的System.Type,
对象,字符串)G:\Coding Projects\Visual工作室
2012\SAVED\Accountable\Accountable\Common\BooleanToVisibilityConverter.cs 20 25问责
Error 3 'Accountable.Common.BooleanToVisibilityConverter' does not implement interface member 'Windows.UI.Xaml.Data.IValueConverter.ConvertBack(object, System.Type, object, string)' G:\Coding Projects\Visual Studio 2012\SAVED\Accountable\Accountable\Common\BooleanToVisibilityConverter.cs 20 25 Accountable
错误4'Accountable.Common.BooleanToVisibilityConverter'呢没有
实现接口成员
'Windows.UI.Xaml.Data.IValueConverter.Convert(对象的System.Type,
对象,字符串)G:\Coding Projects\Visual工作室
2012\SAVED\Accountable\Accountable\Common\BooleanToVisibilityConverter.cs 20 25问责
Error 4 'Accountable.Common.BooleanToVisibilityConverter' does not implement interface member 'Windows.UI.Xaml.Data.IValueConverter.Convert(object, System.Type, object, string)' G:\Coding Projects\Visual Studio 2012\SAVED\Accountable\Accountable\Common\BooleanToVisibilityConverter.cs 20 25 Accountable
我的避风港'T改变的 BooleanNegationConverter.cs 或 BooleanToVisibility.cs 。我做了什么,试图解决这个问题:
I haven't changed BooleanNegationConverter.cs or BooleanToVisibility.cs. What have i done to try and resolved the issue:
- 的考察其他SO帖子,无果
- 删除解决方案SUO没有运气文件LI>
- 打消了我的XAML文件,类(模型和的ViewModels),并删除通用类并创建了一个新的基本页面。这将导致项目再次加载的类。同样的问题。
- 删除提及的 Syncfusion控件的WinRT XAML 这是我使用自定义的DatePicker控件。还是同样的问题
- 修复的Visual Studio 2012 - 。什么都没有发生还是同样的问题
- Investigated other SO Posts, to no avail
- Deleted the Solution SUO File with no luck
- Removed my XAML Files, Classes (Models and ViewModels) and deleted Common Classes and created a new Basic Page. This causes the Project to load the classes again. The same problem.
- Removed the reference to Syncfusion Controls for WinRT XAML which i used for custom DatePicker controls. Still the same issue.
- Repaired Visual Studio 2012 - Nothing happened still the same problems.
我不知所措完全是。我创建了一个新的项目,这个问题不存在。 !我真的想重新开始我的项目
I'm completely at a loss. I have created a new Project and the problem doesn't exist. I dont really want to start my Project again!
仅供参考 - LayoutPageAware.cs包含在项目:
FYI - LayoutPageAware.cs is included in the Project:
推荐答案
我相信 LayoutAwarePage
在公共文件夹的定义,并自动生成第一次创建的基本页
I believe that the LayoutAwarePage
is defined in the Common folder, and is automatically generated the first time you create a Basic Page
- 右键点击您的prject
- 单击添加
- 点击新建项目
- 单击基本页
- 单击添加。
- Right Click on your prject
- Click Add
- Click "New Item"
- click "Basic Page"
- click add.
您可能会得到一个对话框,说:
You might get a dialog saying
这除了取决于从项目丢失的文件。如果没有这些文件,您必须解决手动公共空间的依赖。自动添加缺少的文件吗?
点击是
,然后再次尝试建立
这篇关于C#/ XAML编译错误 - 各种错误(该名称与QUOT; LayoutAwarePage"不存在")的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!