.csproj からすべてのプロジェクト参照を取得するために msbuild コマンドで使用できる変数またはプロパティはありますか?
NSwag.exe webapi2swagger /assembly:@(GimmeAllReferencies?) /controller:Namespace.MyController /output:SwaggerFiles/MyControllerSwagger.json
編集: 不正確で申し訳ありません。プロジェクト B、C、D へのプロジェクト参照を持つプロジェクト A があります。知っておく必要があるのは、アフタービルド タスクで使用するために、このプロジェクトの dll がどこにあるかです。ここに私が今持っているものがあります:
<Target Name="AfterBuild">
<MSBuild Projects="@(ProjectReference)" Targets="Build" BuildInParallel="true">
<Output TaskParameter="TargetOutputs" ItemName="OutputAssemblies" />
</MSBuild>
<Exec Command="$(SolutionDir)Packages\NSwag.4.0.0\NSwag.exe webapi2swagger /assembly:@(OutputAssemblies,','),$(TargetPath) /controller:Controller1 /output:Swagger1.json" />
<Exec Command="$(SolutionDir)Packages\NSwag.4.0.0\NSwag.exe webapi2swagger /assembly:@(OutputAssemblies,','),$(TargetPath) /controller:Controller2 /output:Swagger2.json" />
<Exec Command="$(SolutionDir)Packages\NSwag.4.0.0\NSwag.exe webapi2swagger /assembly:@(OutputAssemblies,','),$(TargetPath) /controller:Conotrller3 /output:Swagger3.json" /></Target>
(@(ProjectReference) は、プロジェクト A のすべてのプロジェクト参照 (B、C、D) を収集します。)
($(TargetPath) はプロジェクト A の dll へのパスです)
私の質問は次のとおりです。このソリューションはこれらの dll を再度ビルドしますか、それとも既にビルドされているためビルド プロセスをスキップしますか?