The OutputPath property is not set for project

前端 未结 15 1122
无人及你
无人及你 2021-02-01 00:05

Building my Jenkins/MSBuild solution gives me this error

c:\\WINDOWS\\Microsoft.NET\\Framework\\v4.0.30319\\Microsoft.Common.targets(483,9): error : 
The OutputP         


        
15条回答
  •  鱼传尺愫
    2021-02-01 00:38

    I had this witha slightly unusual SLN/CSPROJ file arrangement:

    I had project files:

    • A.csproj, with configurations "Dev" and "Production"
    • B.csproj, with configurations "Dev" and "Production"
    • C.csproj, a "common" library used by both A and B with configurations "Dev" and "Production"

    And I had SLN files:

    • AC.sln, with configuration "Production" - this is used by jenkins to build project A and the common library
    • BC.sln, with configuration "Production" - this is used by jenkins to build project B and the common library
    • ABC.sln, with configuration "Dev" - this is used by developers in VS to write new code without having to keep opening different solutions (this answer is a simplified view of a 55-project solution)

    I'd made an edit to the common library and introduced a dependency on project A. AC.sln would still build in jenkins but BC.sln gave an error saying:

    The OutputPath property is not set for project 'A.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='AnyCPU'.

    It was initially puzzling because we don't even have a Debug config anywhere in any project; find in files for Debug| turned up 0 hits

    ABC.sln that the human developers use in VS would also build fine. Building BC.sln gave an error that A.dll wasn't found

    When the circular irresolvable problem of C depending on A was removed, everything started working again

提交回复
热议问题