Xamarin Studio: Rebuild project error with error : The "DebugType" parameter is not supported by the "XamlCTask" task

Xamarin Studio: Rebuild project error with error : The "DebugType" parameter is not supported by the "XamlCTask" task

我已通过删除下面 xml 文件中的行 DebugType = "$(DebugType)" 来重建项目。这条线到底做了什么,为什么它可以解决我的问题。我有错误,因为我从源代码树中提取新代码。

<Target Name="XamlC">
    <XamlCTask
        Assembly = "$(IntermediateOutputPath)$(TargetFileName)"
        ReferencePath = "@(ReferencePath)"
        Verbosity = "2"
        OptimizeIL = "true"
        DebugSymbols = "$(DebugSymbols)"
        />
</Target>

我通过简单地重新启动 Visual Studio 并在解决方案中重建来解决了这个问题。

我什么都没做,项目成功了。

根据这个想法,对于您的情况,重新启动 Xamarin Studio 应该可以解决。

按照此处的说明为我修复了它:https://forums.xamarin.com/discussion/95724/xamarin-forms-2-3-4-247-update-project-wont-build

我不得不关闭 Visual Studio,删除所有项目中的所有 bin/ 和 obj/ 目录,然后重新启动。简单地清理或删除单个项目中的目录而不重新启动是行不通的。

不确定是否与此有关,但似乎是在重命名程序集后开始的。 iOS没遇到过这个问题。