I have a project that imports a certain targets file from a Nuget package. Even though I use PackageReferences I am forced to import this file manually.
(See my other question for details - How are we supposed to execute package build targets in the new world where nuget packages are consumed through msbuild PackageReference?)
This targets file injects chromedriver.exe
into the Content
item group with CopyToOutputDirectory = PreserveNewest
.
I observe a situation where chromedriver.exe
is not copied to the bin folder when running msbuild /t:"Restore;Build"
, but it is copied when running the two targets separately - msbuild /t:Restore; msbuild /t:Build
.
Can anyone explain how this happens?
(I killed a good portion of the day learning the difference on my skin, want to know how come?)