Running VS15 with a solution containing an Microsoft Azure project.
Ncrunch is enabled however it fails to build one project which I don't even have in the solution: "Microsoft.Cloud.IstrumentationFramework.RuntimeContent". This is a dependency of my project.
I cannot remove this "project" from the NCrunch runner and I think the reason for the bulbs not appearing is this.
Why is this project included, how can I exclude it, how can I see the bulbs?
I have:
[17:45:34.6297-LocalBuildTask-22] ERROR (Build): Microsoft.Cloud.InstrumentationFramework.RuntimeContent: (0): Unable to find built assembly. Checked locations:
[...enumerates locations...]
NCrunch finds projects in two ways:
1. By having the project reported as open by Visual Studio (usually means that it needs to be listed as inside your solution in the solution explorer)
2. By searching in the <ProjectReference> dependencies of each project that has been found
This means that if you have some kind of global project that is being referenced somewhere in the build logic of one of your Azure projects, then NCrunch will include this in its internal solution because the project is required to be part of your build chain and is needed as a dependency.
Note that Azure projects are not currently supported by NCrunch. I hear that some people have managed to get them to build, but as I have no knowledge of how these projects are structured, I am unable to help with this. It may be that you need to find the relevant projectreference or build target import and make it conditional on NCrunch not being used to build the project.
That's really wierd, since Visual Studio finds all references at build time and the entire build is successful. Why would NCrunch not find the files?
I 'm having all sorts of these issues, that NCrunch is not able to find some reference/DLL which is present.
NCrunch changes the build system so that your solution is built in pieces - one project at a time.
This involves considerable dependency management. NCrunch needs to be aware of every reference from a project at the time it loads this project, and it needs to be able to control how these dependencies are found by MSBuild at build time.
When working with a solution using a standard build with all the normal MSBuild targets, there are no problems. However, some frameworks use extensive build customisations or heavily altered logic that NCrunch hasn't been pre-programmed to be aware of. Sometimes the logic still follows the standard model closely enough that NCrunch is able to work with it, but in other cases the results are widely unpredictable. This makes it impossible to warrant how NCrunch will behave on unsupported projects like Azure.
In this particular case, it looks like the project being referenced by your Azure project is not a normal project type. Either it's placing an output DLL somewhere completely unconventional, or there is no actual physical output from the project. NCrunch is expecting to find an EXE or DLL output from this project, but when it looks, there is nothing.
Remco wrote:NCrunch changes the build system so that your solution is built in pieces - one project at a time.
This involves considerable dependency management. NCrunch needs to be aware of every reference from a project at the time it loads this project, and it needs to be able to control how these dependencies are found by MSBuild at build time.
When working with a solution using a standard build with all the normal MSBuild targets, there are no problems. However, some frameworks use extensive build customisations or heavily altered logic that NCrunch hasn't been pre-programmed to be aware of. Sometimes the logic still follows the standard model closely enough that NCrunch is able to work with it, but in other cases the results are widely unpredictable. This makes it impossible to warrant how NCrunch will behave on unsupported projects like Azure.
In this particular case, it looks like the project being referenced by your Azure project is not a normal project type. Either it's placing an output DLL somewhere completely unconventional, or there is no actual physical output from the project. NCrunch is expecting to find an EXE or DLL output from this project, but when it looks, there is nothing.
It's really sad, it's not only about Azure projects.
I had a solution working with NCrunch and suddenly I started to get "An error occurred while analysing this project after it was built: A ReflectionTypeLoadException w" in the NCrunchTests console and again nothing is working.
I think it doesn't even make sense anymore to post messages here. All the time there is something which renders NCrunch unusable. It should be a great tool (if it would work) but it simply doesn't.
I spent too much time trying to make it work and it's really not normal. Looks like we're paid the licenses for nothing. It just doesn't bring any value.
I'm switching it off and going back to DotCover.
I'm sorry to hear that. Let me know if you want any help with troubleshooting the ReflectionTypeLoadException. I'd suggest trying compatibility mode for this to see if it indicates a setting that might help.