Is there any variable or property which i could use in msbuild command to get all project references from .csproj?
NSwag.exe webapi2swagger /assembly:@(GimmeAllReferencies?) /controller:Namespace.MyController /output:SwaggerFiles/MyControllerSwagger.json
EDIT: Sorry for my imprecisions. I have project A which has project references to project B, C, D. What I need to know is where are dlls to this project to use them in my afterbuild task. Here is what i've got for now:
<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) gather all project references (B,C,D) in project A.)
($(TargetPath) is path to the dll with project A)
My question is: Is this solution will build these dll again or it'll skip build process because they were already build?