Bug 6969 - "'OutputPath' property is not set for this project" when using xbuild to build project with a project reference and specifying configuration and platform
Summary: "'OutputPath' property is not set for this project" when using xbuild to buil...
Status: NEW
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-09-06 22:20 UTC by Greg Najda
Modified: 2013-01-21 18:50 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test case (9.14 KB, application/zip)
2012-09-06 22:20 UTC, Greg Najda
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 6969 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Greg Najda 2012-09-06 22:20:18 UTC
Created attachment 2469 [details]
Test case

See attached test case. When building with xbuild and specifying the configuration and platform explicitly, it gives an error even though they are the default configuration and platform.



greg@Kubuntu:~/dev/OutputPathTest/OutputPathTest$ xbuild /p:Configuration=Debug /p:Platform=x86
XBuild Engine Version 2.10.8.1
Mono, Version 2.10.8.1
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.

Build started 9/6/2012 9:59:56 PM.
__________________________________________________
Project "/home/greg/dev/OutputPathTest/OutputPathTest/OutputPathTest.csproj" (default target(s)):
        Target PrepareForBuild:
                Configuration: Debug Platform: x86
        Target ResolveProjectReferences:
                Project "/home/greg/dev/OutputPathTest/Library/Library.csproj" (default target(s)):
                        Target _ValidateEssentialProperties:
/usr/lib/mono/4.0/Microsoft.Common.targets: error : 'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: Debug Platform: x86.
                        Task "Error" execution -- FAILED
                        Done building target "_ValidateEssentialProperties" in project "/home/greg/dev/OutputPathTest/Library/Library.csproj".-- FAILED
                Done building project "/home/greg/dev/OutputPathTest/Library/Library.csproj".-- FAILED
        Task "MSBuild" execution -- FAILED
        Done building target "ResolveProjectReferences" in project "/home/greg/dev/OutputPathTest/OutputPathTest/OutputPathTest.csproj".-- FAILED
Done building project "/home/greg/dev/OutputPathTest/OutputPathTest/OutputPathTest.csproj".-- FAILED

Build FAILED.
Errors:

/home/greg/dev/OutputPathTest/OutputPathTest/OutputPathTest.csproj (default targets) ->
/usr/lib/mono/4.0/Microsoft.Common.targets (ResolveProjectReferences target) ->
/home/greg/dev/OutputPathTest/Library/Library.csproj (default targets) ->
/usr/lib/mono/4.0/Microsoft.Common.targets (_ValidateEssentialProperties target) ->

        /usr/lib/mono/4.0/Microsoft.Common.targets: error : 'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: Debug Platform: x86.

         0 Warning(s)
         1 Error(s)

Time Elapsed 00:00:00.3147650
Comment 1 Alberto León 2013-01-17 17:27:58 UTC
I get he same problem. But only when I add a project reference to the project I want to build.

Construyendo: hola (Debug)

Realizando compilación principal...

Build started 17/01/2013 23:17:01.
__________________________________________________
Project "/home/alberto/MonoSimpleInstall/hola/hola.csproj" (Build target(s)):
	
	Target PrepareForBuild:
		Configuration: Debug Platform: AnyCPU
	
	Target GenerateSatelliteAssemblies:
	No input files were specified for target GenerateSatelliteAssemblies, skipping.
	
	Target CoreCompile:
		Tool /usr/bin/gmcs execution started with arguments: /noconfig /debug:full /debug+ /optimize- /out:obj/Debug/hola.dll MyClass.cs AssemblyInfo.cs /target:library /define:DEBUG /reference:/usr/lib/mono/2.0/System.dll /warn:4
	
	Target DeployOutputFiles:
		Copying file from '/home/alberto/MonoSimpleInstall/hola/obj/Debug/hola.dll.mdb' to '/home/alberto/MonoSimpleInstall/hola/bin/Debug/hola.dll.mdb'
		Copying file from '/home/alberto/MonoSimpleInstall/hola/obj/Debug/hola.dll' to '/home/alberto/MonoSimpleInstall/hola/bin/Debug/hola.dll'
Done building project "/home/alberto/MonoSimpleInstall/hola/hola.csproj".

Build succeeded.
	 0 Warning(s)
	 0 Error(s)

Time Elapsed 00:00:00.6061730
Construcción finalizada -- 0 errores, 0 advertencias

Construyendo: MonoSimpleInstallConsole (Debug|x86)

Realizando compilación principal...

Build started 17/01/2013 23:17:02.
__________________________________________________
Project "/home/alberto/MonoSimpleInstall/MonoSimpleInstallConsole/MonoSimpleInstallConsole.csproj" (Build target(s)):
	
	Target PrepareForBuild:
		Configuration: Debug Platform: x86
	
	Target ResolveProjectReferences:
		Project "/home/alberto/MonoSimpleInstall/hola/hola.csproj" (GetTargetPath target(s)):
			
			Target _ValidateEssentialProperties:
/usr/lib/mono/4.0/Microsoft.Common.targets: error : 'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: Debug Platform: x86.
			Task "Error" execution -- FAILED
			Done building target "_ValidateEssentialProperties" in project "/home/alberto/MonoSimpleInstall/hola/hola.csproj".-- FAILED
			
		Done building project "/home/alberto/MonoSimpleInstall/hola/hola.csproj".-- FAILED
		
	Task "MSBuild" execution -- FAILED
	Done building target "ResolveProjectReferences" in project "/home/alberto/MonoSimpleInstall/MonoSimpleInstallConsole/MonoSimpleInstallConsole.csproj".-- FAILED
	
Done building project "/home/alberto/MonoSimpleInstall/MonoSimpleInstallConsole/MonoSimpleInstallConsole.csproj".-- FAILED

Build FAILED.
Errors:

/home/alberto/MonoSimpleInstall/MonoSimpleInstallConsole/MonoSimpleInstallConsole.csproj (Build) ->
/usr/lib/mono/4.0/Microsoft.Common.targets (ResolveProjectReferences target) ->
/home/alberto/MonoSimpleInstall/hola/hola.csproj (GetTargetPath) ->
/usr/lib/mono/4.0/Microsoft.Common.targets (_ValidateEssentialProperties target) ->

	/usr/lib/mono/4.0/Microsoft.Common.targets: error : 'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: Debug Platform: x86.

	 0 Warning(s)
	 1 Error(s)

Time Elapsed 00:00:00.1621860
Construcción finalizada -- 1 error, 0 advertencias

---------------------- Hecho ---------------------

Construcción: 1 error, 0 advertencias
Comment 2 Alberto León 2013-01-21 18:50:37 UTC
I has builded the project using xbuild from console, and all was right.

After this, MonoDevelop can build as expected.