错误MSB4014:由于内部故障,构建中止

时间:2012-05-20 18:05:29

标签: msbuild xamarin.android

我安装了Monodroid,创建了一个新项目并点击了build(使用Sharpdevelop)然后我收到了错误。这是一个Win7 64位系统,VS 2008 Pro也安装了 - 附加是正常的日志:

Bereinige: test (Debug)

Build started 20.05.2012 20:04:44.
__________________________________________________
Build succeeded.
     0 Warning(s)
     0 Error(s)

Time Elapsed 00:00:00.0220013

test (Debug) wird erzeugt

Build started 20.05.2012 20:04:44.
__________________________________________________
Project "c:\temp\test\test\test.csproj" (Build target(s)):

    Target _GenerateAndroidAssetsDir:
    Skipping target "_GenerateAndroidAssetsDir" because it has no outputs.

    Target _ComputeAndroidResourcePaths:
        Creating directory "obj\Debug\res\".

    Target _GenerateAndroidResourceDir:
        Creating directory "c:\temp\test\test\obj\Debug\res\layout".
        Copying file from "Resources\layout\Main.axml" to "c:\temp\test\test\obj\Debug\res\layout\main.axml".
        Creating directory "c:\temp\test\test\obj\Debug\res\values".
        Copying file from "Resources\values\Strings.xml" to "c:\temp\test\test\obj\Debug\res\values\strings.xml".
        Creating directory "c:\temp\test\test\obj\Debug\res\drawable".
        Copying file from "Resources\drawable\Icon.png" to "c:\temp\test\test\obj\Debug\res\drawable\icon.png".

    Target _ResolveMonoAndroidSdks:
        MonoAndroid Tools: C:\Program Files (x86)\MSBuild\Novell\
        MonoAndroid Framework: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v4.0.3\;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\
        MonoAndroid Binaries: C:\Program Files (x86)\MSBuild\Novell\
        Android SDK: C:\Program Files (x86)\android-sdk-windows\
        Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_22\

    Target _ValidateAndroidPackageProperties:
        GetAndroidPackageName Task
          ManifestFile: 
          AssemblyName: test
          PackageName: test.test

    Target _ExtractLibraryProjectImports:
          Assemblies: 
            C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v4.0.3\Mono.Android.dll
            C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll
            C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll
            C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll

    Target _UpdateAndroidResgen:
    Skipping target "_UpdateAndroidResgen" because all output files are up-to-date with respect to the input files.

    Target CoreCompile:
    Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.

    Target CopyFilesToOutputDirectory:
        test -> c:\temp\test\test\bin\Debug\test.dll
Done building project "c:\temp\test\test\test.csproj".-- FAILED

c:\temp\test\test\test.csproj: error MSB4014: The build was aborted because of an internal failure.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Build.BuildEngine.Expander.ExpandPropertiesLeaveTypedAndEscaped(String expression, XmlNode expressionNode)
   at Microsoft.Build.BuildEngine.Expander.ExpandAllIntoStringLeaveEscaped(String expression, XmlNode expressionNode)
   at Microsoft.Build.BuildEngine.Target.Build(ProjectBuildState buildContext)
   at Microsoft.Build.BuildEngine.Project.ExecuteNextActionForProjectContext(ProjectBuildState buildContext, Boolean initialCall)
   at Microsoft.Build.BuildEngine.Project.CalculateNextActionForProjectContext(ProjectBuildState buildContext)
   at Microsoft.Build.BuildEngine.Project.ContinueBuild(ProjectBuildState buildContext, TaskExecutionContext taskExecutionContext)
   at Microsoft.Build.BuildEngine.Project.BuildInternal(BuildRequest buildRequest)
   at Microsoft.Build.BuildEngine.Engine.BuildProjectInternalInitial(BuildRequest buildRequest, Project project)
   at Microsoft.Build.BuildEngine.Engine.BuildProjectInternal(BuildRequest buildRequest, ProjectBuildState buildContext, TaskExecutionContext taskExecutionContext, Boolean initialCall)
   at Microsoft.Build.BuildEngine.Engine.EngineBuildLoop(BuildRequest terminatingBuildRequest)
   at Microsoft.Build.BuildEngine.Engine.PostProjectEvaluationRequests(Project project, String[] projectFiles, String[][] targetNames, BuildPropertyGroup[] globalPropertiesPerProject, IDictionary[] targetOutputsPerProject, BuildSettings buildFlags, String[] toolVersions)

--------------------- Fertig ---------------------

Erzeugung erfolgreich.
Erstellen fehlgeschlagen. MSBuild operation failed

2 个答案:

答案 0 :(得分:1)

我解决了这个问题,感谢

http://connect.microsoft.com/VisualStudio/feedback/details/665199/nullreferenceexception-in-msbuild

我必须删除(卸载)“代码合同(devlabs_TS)1.4.40314.1 for .NET”...

答案 1 :(得分:0)

用于编译的MsBuild版本是什么?尝试使用更高版本。