Why does VS have to rebuild ALL of my projects every time I hit “Play”?

后端 未结 6 1927
迷失自我
迷失自我 2021-02-05 15:45

Do I have some weird setting that is making this happen? I only want to change the text of a message box (and no other assemblies depend on that one) yet VS rebuilds all of my

6条回答
  •  南笙
    南笙 (楼主)
    2021-02-05 16:11

    You can find out what is causing Visual Studio to think each project is out of date, and then address the issue directly.

    1. Select Tools → Options → Projects and Solutions → Build and Run.
    2. For the setting "MSBuild project build output verbosity:" select "Diagnostic".
    3. Build.

    You will get a huge amount of output in the output window detailing exactly what the build is doing. Before building each project it will print out why it thinks it is out of date. An example of such output is:

    Project 'Foo' is not up to date. Input file 'c:\Bar.cs' is modified after output file
    

    These "not up to date" messages should point you to the real cause of the unnecessary builds, which you can then fix.

提交回复
热议问题