CompileXaml 意外失败

CompileXaml failed unexpectedly(CompileXaml 意外失败)

本文介绍了CompileXaml 意外失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个 Windows 8 应用程序的新项目.我想用 c#/xaml 创建它.我正在创建项目,然后按 F5,我得到了

I`ve created a new project of a windows 8 application. I want to create it with c#/xaml. I'm creating project and than I press F5 and I get

CompileXaml"任务意外失败.
System.NullReferenceException:对象引用未设置为对象的实例.
在 Microsoft.Windows.UI.Xaml.Build.Tasks.CompileXaml.CheckForDesignTimeBuildMode()
在 Microsoft.Windows.UI.Xaml.Build.Tasks.CompileXaml.Execute()
在 Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
在 Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext()

The "CompileXaml" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Windows.UI.Xaml.Build.Tasks.CompileXaml.CheckForDesignTimeBuildMode()
at Microsoft.Windows.UI.Xaml.Build.Tasks.CompileXaml.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext()

我没有改变任何东西.当我选择 BlankTemplate、SplitTemplate、GridTemplate 时也会发生同样的情况.

I didn`t change anything. Same thing happens when I chose BlankTemplate, SplitTemplate, GridTemplate.

不知道怎么办

推荐答案

将您的 Visual Studio 2013 从更新 2 升级到更新 4.当您构建项目时,它会给出有关 Hyper-V 网络适配器的错误.要解决此问题,请通过单击提示中的重试"按钮来更改 Hyper -V 网络适配器设置.(您也可以将Window phone SDK升级到8.1以获得更好的体验.可选,无需解决此错误.)

Upgrade your Visual Studio 2013 from Update 2 to Update 4. When you Build your project it gives and error about Hyper - V Network adapter. To Solve that, allow to change in Hyper -V Network Adapter settings by click on "Retry" button in prompt. ( You can also upgrade Window phone SDK to 8.1 for better experience. It is optional not necessary to solve this error.)

这篇关于CompileXaml 意外失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:CompileXaml 意外失败

基础教程推荐