We have a solution with several projects in it, and we need to run the tool for our compiled code after all our code has been compiled. The tool should accept as input all the DLL files and .exe files created from the solution (so that for incremental assembly it is not enough to give it only restored binary files), and all these binary files must be up to date.
Now we do this using the MSBuild.proj file, which we run from the command line, which includes all projects, and uses the MSBuild output element to find binary paths in the solution.
This has two problems that make this solution not entirely suitable for us. The tool does not have to run in all projects, only some of them. And that required us to build from Visual Studio.
It seems to me that in the .csproj project files of some projects you can define something that says “run the tool on me”, collect these project paths and run the tool in this path collection.
But I do not see how to do it. It seems that when I create Visual Studio, I can’t split the state between the builds of the projects, and it seems that after the build of the solution there is no need.
The command line is up to. *. sln.targets and after. *. sln.targets, but they do not work from Visual Studio.
It seems that I want, it's just funny, I just want the tool to automatically look at the binary files of the solutions after the build, so I don't think this should be impossible. But I can’t figure out how to do this from the documentation. I'm new to MSBuild, so I probably don't see anything obvious.
source
share