You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GenerateBindingRedirects is always executed due to SuggestedBindingRedirects not being a file.
This doesn't work well with GeneratePackageOnBuild since this target is called again during Pack and changing .config file timestamp.
GenerateBindingRedirects is run a second time during Pack step:
The .config file is being written a second time in the obj folder after having it's been copied from obj the bin folder during the previous Build step. This results in wrong timestamps for next build/fast-up-to-date check.
It can't even be skipped because the GenerateBindingRedirects target contains SuggestedBindingRedirects in its list of Target.Inputs, and those items are assemblynames instead of files. As a result, the target Inputs/Outputs check will always fail.
GenerateBindingRedirects is run a second time during Pack step:
This seems like the heart of the immediate problem. Not sure if the fix is here or in dotnet/sdk; we'll investigate.
It can't even be skipped because the GenerateBindingRedirects target contains SuggestedBindingRedirects in its list of Target.Inputs, and those items are assemblynames instead of files. As a result, the target Inputs/Outputs check will always fail.
This also seems completely bogus. Let's see if we can figure out why that was (to make sure it wasn't a good idea for some reason) and then fix it.
GenerateBindingRedirects
is always executed due toSuggestedBindingRedirects
not being a file.This doesn't work well with
GeneratePackageOnBuild
since this target is called again duringPack
and changing.config
file timestamp.Steps to reproduce
Project file
Run build in VS multiple times.
UpToDate check fails with:
Investigation
GenerateBindingRedirects
is run a second time during Pack step:The
.config
file is being written a second time in theobj
folder after having it's been copied fromobj
thebin
folder during the previousBuild
step. This results in wrong timestamps for next build/fast-up-to-date check.It can't even be skipped because the
GenerateBindingRedirects
target containsSuggestedBindingRedirects
in its list ofTarget.Inputs
, and those items are assemblynames instead of files. As a result, the target Inputs/Outputs check will always fail.https://github.com/microsoft/msbuild/blob/dc485bce3427e9d2b020ce61c2400e7b5a76062c/src/Tasks/Microsoft.Common.CurrentVersion.targets#L2194
Expected behavior
FastUpToDate check work and build is skipped
Actual behavior
FastUpToDate check doesn't work
Environment data
msbuild /version
output:OS info: Windows 10
If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc):
Visual Studio 16.6.0
The text was updated successfully, but these errors were encountered: