MsBuild incremental build does not consider referenced assembly file changes
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 139
Description
Given a project A.csproj references a library B.dll
And library B is in a static relative path "....\packages\A\lib\net45\B.dll"
When library B.dll is updated to a new version without modifying its relative path
When project A.csproj is built using a MsBuild task with ToolsVersion=4.0, 12.0 or 14.0
Then project A is not rebuilt leading to a potential runtime failure of not finding dependency B
I have created a small project here to repro the problem with the library Autofac:
https://github.com/Vilmir/IncrementalBuildCheckWithPaket
Repro steps:
- Open Developper Command Prompt for VS 2015
- msbuild.exe build.proj
- Run bin/Debug/IncrementalBuildCheck.exe it works
- ".paket/paket.exe" update nuget Autofac version 3.5.2
- msbuild.exe build.proj
- Run bin/Debug/IncrementalBuildCheck.exe, you shall see an exception:
```
System.IO.FileLoadException: Could not load file or assembly 'Autofac, Version=3.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da' or
one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131
040)
File name: 'Autofac, Version=3.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da'
at IncrementalBuildCheck.Program.TestLibrary()
at IncrementalBuildCheck.Program.Main(String[] args) in C:\Users\11mvazquez\Desktop\IncrementalBuildCheckWithPaket\Program.cs:line 12
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.