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

Notification

Icon
Error

Metadata file 'Microsoft.Codeanalysis.Analyzers.dll' could not be found
Mangust
#1 Posted : Wednesday, August 19, 2015 2:19:58 PM(UTC)
Rank: Member

Groups: Registered
Joined: 11/16/2012(UTC)
Posts: 25
Location: Norway

Was thanked: 4 time(s) in 4 post(s)
I have a very simple solution with few project that have a nuget reference to 3 rolsyn packages, the solution builds fine but ncrunch says this:

NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/d...ng_project-build-issues
CSC (0, 0): Metadata file '..\packages\Microsoft.CodeAnalysis.Analyzers.1.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll' could not be found
CSC (0, 0): Metadata file '..\packages\Microsoft.CodeAnalysis.Analyzers.1.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll' could not be found

All of the projects with nuget included are not built.
I have just updated to the latest ncrunch 2.16 , but I have not tried to run it on the earlier versions so don't know if they worked.
Is there anything I can do to make it work?
Remco
#2 Posted : Wednesday, August 19, 2015 11:25:25 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,986

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi,

This is a simple file resolution issue, as these analyzers are access indirectly and NCrunch cannot automatically resolve them. The solution is simply to include the analyzers using NCrunch's 'Additional files to include' setting. See http://www.ncrunch.net/documentation/considerations-and-constraints_implicit-file-dependencies for more information.
Mangust
#3 Posted : Thursday, August 20, 2015 7:10:45 AM(UTC)
Rank: Member

Groups: Registered
Joined: 11/16/2012(UTC)
Posts: 25
Location: Norway

Was thanked: 4 time(s) in 4 post(s)
Do you mean that the assemblies that are referenced by my projects are fine, but those assemblies that fail are referenced indirectly via the ones that are included in my project?
In this case isn't it possible to find all the indirectly referenced assemblies and copy them for ncrunch to use? Or that is too hard to implement?

P.S. This did work indeed, thank you for help. But I would still expect that this works explicitly, because this seems like a very common problem. I.e. if those files are found and reported to be unavailable, can't Ncrunch just add them automatically e.g. or analyze references, etc.?
Remco
#4 Posted : Thursday, August 20, 2015 8:25:42 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,986

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Mangust;7646 wrote:
Do you mean that the assemblies that are referenced by my projects are fine, but those assemblies that fail are referenced indirectly via the ones that are included in my project?
In this case isn't it possible to find all the indirectly referenced assemblies and copy them for ncrunch to use? Or that is too hard to implement?


Not exactly. The projects and assemblies referenced by your solution are fine, and NCrunch has detected them. The analyzer assemblies are different as they are referenced by code included inside the build process - they aren't actually 'declared' dependencies.

Mangust;7646 wrote:

P.S. This did work indeed, thank you for help. But I would still expect that this works explicitly, because this seems like a very common problem. I.e. if those files are found and reported to be unavailable, can't Ncrunch just add them automatically e.g. or analyze references, etc.?


A few people have been hit with this, so it does seem to be a common problem with the newly introduced analyzers. The NCrunch approach with undeclared dependencies (such as those deep within build steps) has been to simply try and educate people about implicit dependencies so that they understand how to correct the problem manually.

I guess a good comparison could be something like a VCS. Most VCS software is reliant on the developer to declare which files are actually source code and therefore should be introduced to the VCS. It could be considered possible for VCS software to try and determine this programmatically (for example, by parsing solution and project files or by using wildcards), but this would never be 100%. NCrunch follows the same logic - for the sake of convenience, it does its best to try and determine which files should be in the workspace and which shouldn't. In some ways it's a testament to how well it does this that people hit situations where files haven't been automatically resolved and feel it to be a defect in the product.

I'm looking at ways in which this can be improved for certain Nuget packages, but it's hard to do this reliably without unnecessarily bloating the workspace with unneeded files.
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.040 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download