Unnecessary project rebuilds when unit testing in Visual Studio

后端 未结 3 1504
粉色の甜心
粉色の甜心 2020-12-10 02:34

I know about this question (and answers), but despite trying all the suggested options I am still stuck.

I have a solution with multiple projects, but for this parti

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-10 02:56

    For my case the solution was to change the build action of a config file from "Copy always" to "Copy if newer". It took a while to find as I had to change the build output details to get the details about which file was causing the error, e.g.

    Project 'xyz' is not up to date. Project item 'c:\my\path\web.config.dev' has 'Copy to Output Directory' attribute set to 'Copy always'.

    From my experience it can also happen that different file names are shown when building multiple times, so make sure you have the right one and / or build again if the problem persists.

    Also have a look at this question and its answers to find some more information.

提交回复
热议问题