While trying to build a Visual Studio 2013 C# solution with MSBuild, the following error is displayed and the build is aborted.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(268,9): e
rror MC1000: Unknown build error, 'Could not load file or assembly 'file:///C:\
Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5
.2\Facades\System.Threading.Timer.dll' or one of its dependencies. The module w
as expected to contain an assembly manifest.' [*.csproj]
I've tried updating and reinstalling .NET v4.5.2, but it hasn't helped.
What's strange is that renaming System.Threading.Timer.dll makes the project buildable, but then other parts of the solution complain that it's missing.
Your project file where the assemblies are referenced might be corrupted. Try this.
Clear the
\binfolder of your projectClear the temp folder in
C:\Users\your_username\AppData\Local\Temp\Temporary ASP.NET Files