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

Notification

Icon
Error

NCrunch not running and not showing bulbs with Azure project
danmdinu
#1 Posted : Thursday, June 9, 2016 7:58:49 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/9/2016(UTC)
Posts: 3
Location: Czech Republic


Hi,

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...]

Works fine with another non-Azure project.
Remco
#2 Posted : Thursday, June 9, 2016 10:38:27 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi,

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.
danmdinu
#3 Posted : Friday, June 10, 2016 1:24:31 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/9/2016(UTC)
Posts: 3
Location: Czech Republic

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.
Remco
#4 Posted : Friday, June 10, 2016 11:19:10 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
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.

If you'd like NCrunch to add support for Azure projects, you're welcome to request this on uservoice.
danmdinu
#5 Posted : Monday, June 13, 2016 12:50:02 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/9/2016(UTC)
Posts: 3
Location: Czech Republic

Remco;8836 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.

If you'd like NCrunch to add support for Azure projects, you're welcome to request this on uservoice.


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.
Remco
#6 Posted : Monday, June 13, 2016 11:33:35 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
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.
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.049 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download