Build/Test Issues

Build fails with VS2015 Analyzers

Started by rlawley on 5,679 views

One of the new features of VS2015, Live Code Analysers, prevents ncrunch from being able to build a project.

Simple test case:

[list=1]
  • File > New > Class Library (I used .NET Framework 4.6)
  • Enable ncrunch (build succeeds)
  • Install-Package Microsoft.AnalyzerPowerPack


  • Build now fails. I presume this is because the ncrunch build engine doesn't understand analysers.

    NCrunch: This project was built on server '(local)'
    CSC (0, 0): Metadata file '..\packages\Microsoft.AnalyzerPowerPack.1.0.0\analyzers\dotnet\cs\Microsoft.AnalyzerPowerPack.Common.dll' could not be found

    Edited

    Hi,

    This looks to be a dependency resolution/implicit dependency issue (see http://www.ncrunch.net/documentation/considerations-and-constraints_implicit-file-dependencies for more details).

    Try adding the AnalyzerPowerPack package directory to the 'Additional files to include' NCrunch project-level or solution-level configuration setting. This will allow NCrunch to include the files in the workspace and your build should operate as normal.
    I can confirm that adding the files in this way does allow the build to function.

    However, as this is one of the new features added in VS2015, I think it'll be something people come up against fairly regularly, so it would be good to have as an enhancement in a future version.

    Post a reply

    Log in to reply.