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

Losmi97 1 Reputation point
2021-03-02T21:26:23.623+00:00

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?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,766 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,013 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 28,666 Reputation points Microsoft Vendor
    2021-03-03T07:00:21.117+00:00

    Hi @Losmi97 ,

    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.
    0 comments No comments

  2. Losmi97 1 Reputation point
    2021-03-03T08:34:26.157+00:00

    Hi @Tianyu Sun-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