Bob*_*sky 11 .net c# windows-8 windows-store-apps
我正在学习如何创建Class Library (Windows Store apps)和使用UserControl模板来向其添加用户控件.
然后我Grid在随附的XAML中添加了一个标签.但是,标签用蓝色波浪线加下划线,当我将鼠标悬停在标签上时
Grid is not supported in a Windows Presentation Foundation (WPF) project
Run Code Online (Sandbox Code Playgroud)
工具提示出现了.
该库似乎没有错误地构建.我已将库添加到应用程序并在其代码中使用该控件.该应用程序也建立得很好.但是,当我运行应用程序时,我得到了XamlParseException异常.
我正在使用Visual Studio 2012 RTM.库和应用程序都只引用两个标准程序集(.NET for Windows Store apps和Windows).
我可能做错了什么以及如何修复库?
Ami*_*mir 20
转到"Build> Configuration Manager ..."并为所有项目为x86创建一个新平台.
它不必是活动的,您可以将其保留为任何CPU.
希望它适用于我的......
Dav*_*Caz 16
In my case I switched from Debug to Release, and then back, and the error was gone.
我最近遇到了同样的错误,并在输出窗口中发现了以下内容:
10>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFX.targets(268,9): error MC6000: Project file must include the .NET Framework assembly 'WindowsBase, PresentationCore, PresentationFramework' in the reference list.
我的解决方案是将缺少的引用添加到我的项目中。