Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Msbuild 如何在解决方案文件中定义项目输出路径?(或者如何在解决方案文件中指定自定义项目属性?)_Msbuild_Projects And Solutions - Fatal编程技术网

Msbuild 如何在解决方案文件中定义项目输出路径?(或者如何在解决方案文件中指定自定义项目属性?)

Msbuild 如何在解决方案文件中定义项目输出路径?(或者如何在解决方案文件中指定自定义项目属性?),msbuild,projects-and-solutions,Msbuild,Projects And Solutions,如何在解决方案文件中定义项目输出路径 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugUse|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\Debug\</OutputPath> <!-- this --> <DefineConstants>

如何在解决方案文件中定义项目输出路径

<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>

我相当肯定这是不可能的。解决方案文件仅引用项目文件,因此所有特定于项目的选项(如输出路径等)都必须包含在引用的项目文件中。

您可以在解决方案文件中指定网站属性:ProjectSection(WebsiteProperties)=preProject Debug.AspNetCompiler.VirtualPath=“/web”Debug.AspNetCompiler.PhysicalPath=“src\web\”。。。因此,可以指定其他项目属性。在反映MSBuild如何解析解决方案文件后。我发现这是不可能的。在WebsiteProperties部分有一点不错,但就我所见,与构建系统的其他部分相比,这有点反常。
<OutputPath>$(SolutionOutputPath)\Debug\</OutputPath>
Project(...) = ...
    ProjectSection(ProjectProperties) = preProject
        OutputPath = "C:\Test\Bin"
    EndProjectSection
EndProject