build - Unnecessary project rebuilds when unit testing in Visual Studio -
i know this question (and answers), despite trying suggested options still stuck.
i have solution multiple projects, particular case let's i've got exampleprojecta
, corresponding unit test project exampleprojectatest
. first 1 added reference test project - not via visual studio's "project references"
link dll (something "..\path\$(config)\exampleprojecta.dll"
) - due build server requirements in our company, problem existed when still had "project references"
.
- building , running single unit test works fine
- changing single letter in unit test , letting test run results in rebuild of
exampleprojecta
, though shouldn't necessary - setting (there few) files in
exampleprojecta
"copy always" "copy if newer" in respective properties didn't help - checking checkbox under
tools => options => projects , solutions => build run
(see below) didn't change
to see if there more information available, changed build output settings diagnostic. each time rebuild of exampleprojecta
triggered, first line in output windows is
1>project 'exampleprojectatest' not date. input file 'c:\tfs\mysolution-dev\exampleprojectatest\myfolder\namegeneratortest.cs' modified after output file 'c:\tfs\mysolution-dev\exampleprojectatest\bin\release\exampleprojectatest.pdb'.
the class name written window (e.g. namegeneratortest.cs
) changes according test file change.
not sure why message comes up, next step disable debugging information shown below under project properties => build => advanced => output => debug info => none
:
still same, nothing's changed.
another thing tried check timestamps of files contained in solution folder (as there case user had file future timestamp - see linked post) - no avail.
last thing tried change build settings in configuration manager
different target platform - settings wouldn't let me build solution successfully, other settings did, problem described persisted, no change.
the behaviour similar (not same though) both visual studio test runner , 1 provided resharper.
visual studio test runner
project 'exampleproject' not date. input file 'c:\tfs\mysolution-dev\exampleprojecta\views\shared\someview.cshtml' modified after output file 'c:\tfs\mysolution-dev\exampleprojecta\bin\exampleprojecta.pdb'.
resharper test runner
project 'exampleprojectatest' not date. input file 'c:\tfs\mysolution-dev\exampleprojectatest\myfolder\namegeneratortest.cs' modified after output file 'c:\tfs\mysolution-dev\exampleprojectatest\bin\release\exampleprojectatest.pdb'.
i'm using visual studio 2013 premium edition resharper 8.2 , latest updates, projects in our solution file in c#.
update
to clarify - first line in output window show test project has rebuilt - fine. following lines, however, indicate exampleprojecta
has rebuilt, shouldn't necessary. subsequent messages output window show other projects (referenced exampleprojecta
have rebuilt.
update 2
despite installing update 4, nothing has changed.
for case solution change build action of config file "copy always" "copy if newer". took while find had change build output details details file causing error, e.g.
project 'xyz' not date. project item 'c:\my\path\web.config.dev' has 'copy output directory' attribute set 'copy always'.
from experience can happen different file names shown when building multiple times, make sure have right 1 , / or build again if problem persists.
also have @ this question , answers find more information.
Comments
Post a Comment