J'essaie de configurer certaines propriétés que j'utilise plusieurs fois dans mon script MSBuild. J'ai la section de propriété suivante:Erreur lors de l'utilisation des jetons MSBuild dans PropertyGroup
<PropertyGroup>
<BuildDependsOn>$(BuildDependsOn); MyAfterBuild </BuildDependsOn>
<SubstitutionsFilePath>$(ProjectDir)app.config.substitutions.xml </SubstitutionsFilePath>
<AppConfig>$(TargetPath).config</AppConfig>
<HostConfig>$(TargetDir)$(TargetName).vshost.exe.config</HostConfig>
</PropertyGroup>
Quand je lance ce que je reçois l'erreur suivante:
The expression "@(TargetPath).config" cannot be used in this context. Item lists cannot be concatenated with other strings where an item list is expected. Use a semicolon to separate multiple item lists.
Je ne comprends pas cette erreur, comme l'utilisation du $(BuildDependsOn)
et $(ProjectDir)
excellent travail. Et je sais que les valeurs $(TargetXXX)
génèrent correctement car quand je les mets directement dans la section Tâches ci-dessous, elles fonctionnent bien.