如何定义一个解决方案文件项目OutputPath? (或者如何指定在一个解决方案文件自定义的项目属性?)

StackOverflow https://stackoverflow.com/questions/986456

  •  13-09-2019
  •  | 
  •  

我怎样才能在一个解决方案文件中定义项目OutputPath?

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugUse|AnyCPU' ">
  <DebugSymbols>true</DebugSymbols>
  <OutputPath>bin\Debug\</OutputPath> <!-- this -->
  <DefineConstants>DEBUG;TRACE</DefineConstants>
  <DebugType>full</DebugType>
  <PlatformTarget>AnyCPU</PlatformTarget>
  <ErrorReport>prompt</ErrorReport>
</PropertyGroup>

另外,我想我可以使用自定义的项目属性。

<OutputPath>$(SolutionOutputPath)\Debug\</OutputPath>

但我不知道如何在一个解决方案文件定义自定义项目属性。我是想是这样的:

Project(...) = ...
    ProjectSection(ProjectProperties) = preProject
        OutputPath = "C:\Test\Bin"
    EndProjectSection
EndProject
有帮助吗?

解决方案

我相当肯定这是不可能的。将溶液文件刚刚引用的项目文件,因此,所有特定于项目的选项,如输出路径等,必须包含所引用的项目文件中。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top