Comment définir OutputPath du projet dans un fichier de solution? (Ou comment spécifier les propriétés du projet personnalisé dans un fichier de solution?)

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

  •  13-09-2019
  •  | 
  •  

Question

Comment puis-je définir OutputPath du projet dans un fichier de solution?

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

Sinon, je pense que je pourrais utiliser une propriété de projet personnalisé.

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

Mais je ne sais pas comment définir les propriétés du projet personnalisé dans un fichier de solution. Je cherchais quelque chose comme:

Project(...) = ...
    ProjectSection(ProjectProperties) = preProject
        OutputPath = "C:\Test\Bin"
    EndProjectSection
EndProject
Était-ce utile?

La solution

Je suis assez sûr que cela est impossible. Le fichier de solution juste référence des fichiers projet, donc toutes les options spécifiques au projet tels que les chemins de sortie et ainsi de suite, doit être contenu dans le fichier de projet référencé.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top