“the outputpath property is not set for this project” error

前端 未结 27 2560
野趣味
野趣味 2020-12-07 20:29

I have a multi project solution in Visual Studio 2008. I just added a new Configuration called Release-VersionIncrement to the solution, specifying \"use release\" configura

27条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-07 20:52

    I was adding the x64 platform to my solution today, when I ran into this issue.

    In my case, the error read:

    Built $/ProjectDirectory/ProjectName.csproj for default targets. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets (484): The OutputPath property is not set for project ProjectName.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='x64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.

    I knew the OutputPath should be fine, since this was an existing, working VS solution. So I moved to the next hint--"a valid combination of Configuration and Platform".

    Aha! Visual Studio is trying to build Configuration='Debug', Platform='x64'. Looking at my project file, I realized that x64 was not listed as one of the possible platforms. In other words, I had the below entries (shortened):

      
          x86
          bin\x86\Debug\  
          . . .  
      
      
          x86
          bin\x86\Release\    
          . . .
      
    

    Easy fix then: just add x64 entries!

    I copy/paste'd the x86 entries, and changed them to use x64. Notice I also modified the paths so these don't overwrite x86 builds:

      
          x64
          bin\x64\Debug\    
          . . .
      
      
          x64
          bin\x64\Release\    
          . . .
      
    

提交回复
热议问题