2009-06-12 82 views
2

我怎麼能在一個解決方案文件中定義項目OutputPath?如何在解決方案文件中定義項目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 

回答

1

我很肯定這是不可能的。該解決方案文件只是引用了項目文件,因此,所有具體項目的選項,比如輸出路徑等,必須包含在引用的項目文件中。

+0

你可以指定一個解決方案文件內網站資源: ProjectSection(WebsiteProperties)= preProject Debug.AspNetCompiler.VirtualPath = 「/網絡」 Debug.AspNetCompiler.PhysicalPath = 「SRC \網絡\」 ... EndProjectSection 所以,有可能指定其他項目屬性。 – 2009-06-12 13:06:13

相關問題