DeployOnBuild does not update dll with older version
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
When deploying using msbuild and DeployOnBuild parameter, a file (dll) which has a lower version compared to the previously published file does not get updated. Both files have the same size.
### Steps to reproduce
With following sample:
[MSBuildIssue.zip](https://github.com/Microsoft/msbuild/files/2146682/MSBuildIssue.zip)
Use following command line (adjust publishUrl to point to sample "output" folder)
```
msbuild ./Test/WebApp/WebApp.csproj /p:DeployOnBuild=true /p:PublishProfile=FolderProfile /p:publishUrl=C:/MSBuildIssue/output
```
### Expected behavior
Published project has library Common.Logging.Core version 3.3.1.
I would expect the output folder to contain Common.Logging.Core with version 3.3.1 after publish, overwriting the existing Common.Logging.Core file which has version 3.4.1.
### Actual behavior
Publish has kept the existing file Common.Logging.Core version 3.4.1 instead of updating it.
### Environment data
`msbuild /version` output: 15.7.179.6572
OS info: Windows 10
If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc): VS 2017
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.