Jjagg / MonoGameContentReferenceTest

For testing MonoGame/MonoGame#4997
0 stars 2 forks source link

XBuild error #2

Closed dazinator closed 7 years ago

dazinator commented 7 years ago

So I just installed mono on windows, to give xbuild a go.

When I try and build the csproj using xbuild I get:


**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26228.4
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************

C:\Users\Darrell\Source>cd "C:\Program Files (x86)\Mono\bin"

C:\Program Files (x86)\Mono\bin>xbuild "C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj"
XBuild Engine Version 14.0
Mono, Version 4.8.0.0
Copyright (C) 2005-2013 Various Mono authors

Build started 11/03/2017 16:01:43.
__________________________________________________
C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj: error : C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj: C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj could not import "$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets"
Build FAILED.
Errors:

C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj: error : C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj: C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj could not import "$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets"

         0 Warning(s)
         1 Error(s)

Time Elapsed 00:00:00.1660273

This is the full diagnostic output:


C:\Program Files (x86)\Mono\bin>xbuild "C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj" /verbosity:diagnostic
XBuild Engine Version 14.0
Mono, Version 4.8.0.0
Copyright (C) 2005-2013 Various Mono authors
Loading default tasks for ToolsVersion: 14.0 from C:\Program Files (x86)\Mono\lib\mono\xbuild\14.0\bin\Microsoft.Common.tasks

Build started 11/03/2017 16:09:12.
__________________________________________________
C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj: Importing project C:\Program Files (x86)\Mono\lib\mono\xbuild\14.0\bin\Microsoft.CSharp.targets from extension path C:\Program Files (x86)\Mono\lib\mono\xbuild
C:\Program Files (x86)\Mono\lib\mono\xbuild\14.0\bin\Microsoft.CSharp.targets: Importing project C:\Program Files (x86)\Mono\lib\mono\xbuild\14.0\bin\Microsoft.Common.targets
C:\Program Files (x86)\Mono\lib\mono\xbuild\14.0\bin\Microsoft.Common.targets: Importing project C:\Program Files (x86)\Mono\lib\mono\xbuild\14.0\Microsoft.Common.props from extension path C:\Program Files (x86)\Mono\lib\mono\xbuild
C:\Program Files (x86)\Mono\lib\mono\xbuild\14.0\Microsoft.Common.props: Importing project C:\Program Files (x86)\Mono\lib\mono\xbuild\14.0\Imports\Microsoft.Common.props\ImportBefore\Microsoft.NuGet.ImportBefore.props from extension path C:\Program Files (x86)\Mono\lib\mono\xbuild
C:\Program Files (x86)\Mono\lib\mono\xbuild\14.0\Imports\Microsoft.Common.props\ImportBefore\Microsoft.NuGet.ImportBefore.props: Importing project C:\Program Files (x86)\Mono\lib\mono\xbuild\Microsoft\NuGet\Microsoft.NuGet.props from extension path C:\Program Files (x86)\Mono\lib\mono\xbuild
C:\Program Files (x86)\Mono\lib\mono\xbuild\14.0\bin\Microsoft.Common.targets: Importing project C:\Program Files (x86)\Mono\lib\mono\xbuild\14.0\Microsoft.Common.targets\ImportAfter\Microsoft.NuGet.ImportAfter.targets from extension path C:\Program Files (x86)\Mono\lib\mono\xbuild
C:\Program Files (x86)\Mono\lib\mono\xbuild\14.0\Microsoft.Common.targets\ImportAfter\Microsoft.NuGet.ImportAfter.targets: Importing project C:\Program Files (x86)\Mono\lib\mono\xbuild\Microsoft\NuGet\Microsoft.NuGet.targets from extension path C:\Program Files (x86)\Mono\lib\mono\xbuild
C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj: error : C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj: C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj could not import "$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets"
C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj: Microsoft.Build.BuildEngine.InvalidProjectFileException: C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj: C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj could not import "$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" ---> Microsoft.Build.BuildEngine.InvalidProjectFileException: C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj could not import "$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets"
  at Microsoft.Build.BuildEngine.Import.ForEachExtensionPathTillFound (System.Xml.XmlElement xmlElement, Microsoft.Build.BuildEngine.Project project, Microsoft.Build.BuildEngine.ImportedProject importingProject, System.Func`3[T1,T2,TResult] func) [0x002f3] in <be39fd865fc6443ba8e0754f0d58cf2f>:0
  at Microsoft.Build.BuildEngine.Project.AddImport (System.Xml.XmlElement xmlElement, Microsoft.Build.BuildEngine.ImportedProject importingProject, System.Boolean evaluate_properties) [0x0007b] in <be39fd865fc6443ba8e0754f0d58cf2f>:0
  at Microsoft.Build.BuildEngine.Project.ProcessElements (System.Xml.XmlElement rootElement, Microsoft.Build.BuildEngine.ImportedProject ip) [0x0017b] in <be39fd865fc6443ba8e0754f0d58cf2f>:0
  at Microsoft.Build.BuildEngine.Project.ProcessXml () [0x000b6] in <be39fd865fc6443ba8e0754f0d58cf2f>:0
  at Microsoft.Build.BuildEngine.Project.DoLoad (System.IO.TextReader textReader) [0x0012c] in <be39fd865fc6443ba8e0754f0d58cf2f>:0
   --- End of inner exception stack trace ---
  at Microsoft.Build.BuildEngine.Project.DoLoad (System.IO.TextReader textReader) [0x00160] in <be39fd865fc6443ba8e0754f0d58cf2f>:0
  at Microsoft.Build.BuildEngine.Project.Load (System.String projectFileName, Microsoft.Build.BuildEngine.ProjectLoadSettings settings) [0x00136] in <be39fd865fc6443ba8e0754f0d58cf2f>:0
  at Microsoft.Build.BuildEngine.Project.Load (System.String projectFileName) [0x00000] in <be39fd865fc6443ba8e0754f0d58cf2f>:0
  at Microsoft.Build.BuildEngine.Engine.BuildProjectFileInternal (System.String projectFile, System.String[] targetNames, Microsoft.Build.BuildEngine.BuildPropertyGroup globalProperties, System.Collections.IDictionary targetOutputs, Microsoft.Build.BuildEngine.BuildSettings buildFlags, System.String toolsVersion) [0x000b9] in <be39fd865fc6443ba8e0754f0d58cf2f>:0
  at Microsoft.Build.BuildEngine.Engine.BuildProjectFile (System.String projectFile, System.String[] targetNames, Microsoft.Build.BuildEngine.BuildPropertyGroup globalProperties, System.Collections.IDictionary targetOutputs, Microsoft.Build.BuildEngine.BuildSettings buildFlags, System.String toolsVersion) [0x00008] in <be39fd865fc6443ba8e0754f0d58cf2f>:0
Target performance summary:

Tasks performance summary:

Build FAILED.
Errors:

C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj: error : C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj: C:\Users\Darrell\Source\Repos\MonoGameContentReferenceTest\TestMgcb\TestMgcb.csproj could not import "$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets"

         0 Warning(s)
         1 Error(s)

Time Elapsed 00:00:00.1711358

C:\Program Files (x86)\Mono\bin>
dazinator commented 7 years ago

Ah think this is because, under xbuild, $(MSBuildExtensionsPath) evaulates to a different location which for me is this: C:\Program Files (x86)\Mono\lib\mono\xbuild

So I'll need to copy the monogame targets there.

Jjagg commented 7 years ago

Ah think this is because, under xbuild, $(MSBuildExtensionsPath) evaulates to a different location which for me is this: C:\Program Files (x86)\Mono\lib\mono\xbuild

I haven't tried using xbuild on Windows, so I can't comment on this.