Build/Test Issues

Build fails: Could not load file or assembly Microsoft.CodeAnalysis

Started by marhoily on 11,589 views

Hello! I submitted bug report with the same name as this topic a few seconds ago.

Do you have any workaround for it for now?

The output is:

..\..\..\..\Program Files (x86)\MSBuild\14.0\bin\Microsoft.CSharp.Core.targets (67, 5): Unexpected exception:
..\..\..\..\Program Files (x86)\MSBuild\14.0\bin\Microsoft.CSharp.Core.targets (67, 5): System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
..\..\..\..\Program Files (x86)\MSBuild\14.0\bin\Microsoft.CSharp.Core.targets (67, 5): File name: 'Microsoft.CodeAnalysis, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
..\..\..\..\Program Files (x86)\MSBuild\14.0\bin\Microsoft.CSharp.Core.targets (67, 5): at Microsoft.CodeAnalysis.BuildTasks.ManagedCompiler.GetArguments(String commandLineCommands, String responseFileCommands)
..\..\..\..\Program Files (x86)\MSBuild\14.0\bin\Microsoft.CSharp.Core.targets (67, 5): at Microsoft.CodeAnalysis.BuildTasks.ManagedCompiler.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands)
..\..\..\..\Program Files (x86)\MSBuild\14.0\bin\Microsoft.CSharp.Core.targets (67, 5): WRN: Assembly binding logging is turned OFF.
..\..\..\..\Program Files (x86)\MSBuild\14.0\bin\Microsoft.CSharp.Core.targets (67, 5): To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
..\..\..\..\Program Files (x86)\MSBuild\14.0\bin\Microsoft.CSharp.Core.targets (67, 5): Note: There is some performance penalty associated with assembly bind failure logging.
..\..\..\..\Program Files (x86)\MSBuild\14.0\bin\Microsoft.CSharp.Core.targets (67, 5): To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Maybe it worth including as a suggestion to the output window of the ncrunch then? Because googling didn't helped me in this instance
Sorry. The actual solution for this is to have NCrunch automatically try to detect the Nuget dependency and include its files automatically. This is coming in the 2.17 release.

The previous line on this has been to allow people to include the files themselves, to prevent workspace bloat .. but for some reason the number of Nuget packages that use build targets has massively increased in the last two months, so an automated solution now seems like the best option.

Post a reply

Log in to reply.