question

Losmi97-1263 avatar image
0 Votes"
Losmi97-1263 asked ·

Is there an option in Visual Studio 2019 to see how many files are compiled while building one Visual Studio Project?

So, basically, I have a Visual Studio Solution, which consists of several projects and I want to see how many files are being compiled while building one of those projects, is there a way to determine that?

vs-generalvs-msbuild
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TianyuSun-MSFT avatar image
0 Votes"
TianyuSun-MSFT answered ·

Hi @Losmi97-1263 ,

Welcome to Microsoft Q&A forum.

You can check the ItemGroup in proj file(right-click the project > Unload Project > right-click the project again > Edit Project File), the Reference list includes assemblies that will(must) be in place for a successful build, the Compile list includes code files that will(must) be compiled, and the Content list includes resources that will(must) be copied unaltered.

For directly see the files which are being compiled while building one of the projects, you may need to check the Output window. All the information from the build process is displayed in the Output window. You can set Tools > Options > Projects and Solutions > Build And Run > MSBuild project build output verbosity option to Detailed or Diagnostic to filter and see the information from Build process. For example, search Target CoreCompile in the Output window, for C# projects, in Task Csc you will see the compiled files(See the screenshot below).

73666-test1.png

Best Regards,
Tianyu


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



test1.png (16.3 KiB)
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Losmi97-1263 avatar image
0 Votes"
Losmi97-1263 answered ·

Hi @TianyuSun-MSFT,

Thank you for the reply, when it comes to the first option you proposed (ItemGroup), the problem is that in the Reference list I get the names of other Projects, not the names of the files. When it comes to the second option, the Output window, my project has a large number of files so it would be difficult to go trough the Output window and count them.
My solution or my idea is to use "Find And Replace" option, for the symbol which I want to search I can enter whatever and then I need to set "Include external items" and to press "Find All". In the output window I will get the number of files which are searched and that might be my answer.
73689-findd.png


73690-matching.png



findd.png (21.8 KiB)
matching.png (3.2 KiB)
· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Losmi97-1263 , thank you for your feedback.

in the Reference list I get the names of other Projects, not the names of the files.

I think, you can check the Compile list, please see the picture I attached at the end of my comment.

My solution or my idea is to use “Find And Replace” option.

“Find And Replace” option is a good feature to search and find/replace the information we need, and you provide a great solution. Just as a tip, sometimes some included configuration files will also be compiled during the Build process, but, of course it depends on what you want, if you focus on the source files included in your project, it will be very helpful, if you need to know all the files which are used(compiled) during the whole Build process, this feature may “ignore” the files which have been compiled but without symbol(or annotations like //===-----).

![74585-compilelist.png][1]


[1]: /answers/storage/temp/74585-compilelist.png
0 Votes 0 ·
compilelist.png (26.2 KiB)