The OutputPath property is not set for project

前端 未结 15 1117
无人及你
无人及你 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

    Just had the issue for some service fabric stuff in MSBuild.

    First step was right clicking each affected project and pulling up their Properties, selecting the Build tab, then setting the platform target to x64.

    Second step was to go into the configuration manager and set each project to also use x64 for Debug and Release.

    This was for a VS2017 project.

    0 讨论(0)
  • 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

    0 讨论(0)
  • 2021-02-01 00:39

    I got this error only when I was publishing my web project. I had mistakenly selected the wrong build configuration when setting up the publish profile.

    0 讨论(0)
  • 2021-02-01 00:44

    I had same issue. I have updated my windows platform by using command line. Currently i got updated to windows@5.0.0 version. Then you need to search for file name "SQLite3.UWP.vcxproj". Try to change "v141" to "v140". Currently I am using Visual Studio 2015 professional. If it's Visual Studio 2017, then there is no need to change version in SQLite3.UWP.vcxproj file.

    0 讨论(0)
  • 2021-02-01 00:47

    As mentioned by perlyking, rather than editing the csproj XML The following worked for me. Here are the steps I used.

    1. Open the Project Properties.
    2. Select the Build Tab.
    3. Under the Output section, Check that an output path is set. (if not set one, save the project and it should work).
    4. If it is set, click on the "Browse..." button of the output path.
    5. When the folder selection dialog opens, Navigate up one level in the file browser and then re-select the output folder and click the "Select Folder" button.
    6. Save the project properties and it should work.
    0 讨论(0)
  • 2021-02-01 00:49

    I have figured out how it works (without changing sln/csproj properties in VS2013/2015).

    1. if you want to build .sln file:
      1. /p:ConfigurationPlatforms=Release /p:Platform="Any CPU"
    2. if you want to build .csproj file:
      1. /p:Configuration=Release /p:Platform=AnyCPU
        1. notice the "Any CPU" vs AnyCPU
    3. check the code analysis, fxcop, test coverage(NCover) targets, as well as the MSBUILD should be located properly. In my case its:
      1. C:\Windows\Microsoft.NET\Framework64\v4.0.30319 but it can be different as you can see microsoft has given 6 cmd options to build code base::AMD (with cross plt, x86 & x64 options) and Windows(cross, x86, x64) and that also when code development happened with default JIT (it can be PreJIT ngen.exe, econoJIT)

    I think more than this troubleshooting can be handle using power shell + msbuild. May be helpful for someone ...

    0 讨论(0)
提交回复
热议问题