Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Build fails with VS2015 Analyzers
rlawley
#1 Posted : Tuesday, July 21, 2015 1:18:35 PM(UTC)
Rank: Member

Groups: Registered
Joined: 4/7/2014(UTC)
Posts: 11
Location: United Kingdom

Thanks: 2 times
Was thanked: 4 time(s) in 4 post(s)
One of the new features of VS2015, Live Code Analysers, prevents ncrunch from being able to build a project.

Simple test case:

  1. File > New > Class Library (I used .NET Framework 4.6)
  2. Enable ncrunch (build succeeds)
  3. Install-Package Microsoft.AnalyzerPowerPack


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

Code:
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
Remco
#2 Posted : Tuesday, July 21, 2015 10:16:29 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,000

Thanks: 932 times
Was thanked: 1259 time(s) in 1172 post(s)
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.
rlawley
#3 Posted : Wednesday, July 22, 2015 6:09:59 PM(UTC)
Rank: Member

Groups: Registered
Joined: 4/7/2014(UTC)
Posts: 11
Location: United Kingdom

Thanks: 2 times
Was thanked: 4 time(s) in 4 post(s)
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.
1 user thanked rlawley for this useful post.
Remco on 7/22/2015(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.025 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download