I am totally new to NCrunch. I am trying to make it work with one of our projects and I am failing miserably. So basically I enabled NCrunch, went through the wizard and right after thatI got a failed build (in NCrunch, building normally works like a charm). The exact text I get on the project that fails is:
[09:29:20.5445-BuildTask-28] ERROR (Compilation): PluginProductManager: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFX.targets (269): Unknown build error, 'ReflectionOnlyAssemblyResolve handlers must return Assemblies loaded for reflection only.'
I do not directly use anything related to ReflectionOnlyAssemblyResolve methods in the code of this assembly. And I have no idea where to look for / how to make NCrunch work.
System.ComponentModel.Composition - I use MEF to load plugins into main app (the project that is failing is a plugin). On the other hand lots of other plugins use this DLL.
ICSharpCode.AvalonEdit - this is the AvalonEdit control (text editor with code highlighting). This is a free component available at http://wiki.sharpdevelop.net/AvalonEdit.ashx. I can try removing this ref, but it is not an option in the long run.
Anyway - does anyone have any ideas where can this error come from?
Alright, after spending some time playing around with this issue I found a way to "solve" it - if I remove all the XAML files from the project then it compiles. This is not caused by a specific XAML file though - only after deleting ALL of them the build succeeds.
Frankly I have no idea why this was there and when it appeared, but after setting it to "true" (or completely removing it) the project started building without any problems. So... I guess my issue is resolved now.
UPDATE:
Just in case - found a thread about this flag here: link. There is an important point there in the comments:
Blend 3 likes to default this to False as well...
Our project was also created in Blend 3 at some point, so I guess that this is where that flag came from. At the moment we are using Blend 4 and it does not set this flag in WPF/WPF lib projects by default (just checked).
I'm glad you managed to find the cause of this issue. Because NCrunch runs builds via the command line tooling, it wouldn't be injecting an override for this property in the same way that Visual Studio does. I'll see what I can do about introducing an override for this in NCrunch builds so that other people won't get hit with this problem in future versions of NCrunch.
Well, I do not know if this should necessarily be implemented in the NCrunch itself. But this issue could be added to "Troubleshooting build issues" page in the wiki.