One of my test projects (msTest) in solution refuses to be built under NCrunch. Only when I terminate lc.exe processes in task manager and click Rebuild, it rebuilds.
Thanks. Can you share any more details about the build failure? (i.e. error message?). Does the project make use of any additional build steps or frameworks (other than MSTest)?
Absolutely no error messages. Building just stucks and shows no signs of living. The project contains mstest test code and depends on primarily assemblies. I've began to create new control and put it in my primary assemblies. The I've wrote test in test assembly. Everything was fine, but when I've changed control, much of my assemblies needed to be rebuilt, so I've moved my control to tests, hoping to reduce rebuilt time. Now I need only one project to be rebuilt - test project, but it refuses to be rebuilt.
Often the Processing Queue Window can give you more information about unexpected build errors and internal problems. After your build has hung/failed, do you see any information in the Processing Queue Window against the build task?
Also - would you be able to submit a bug report? I may be able to identify the cause of the problem from the log file contained in the report.
- Wait until the build has hung, then terminate lc.exe using task manager
- Click the green 'check' in the NCrunch Tests Window to show the problematic project that's just been built
- Right click on the built project
- Go to Advanced->Browse to workspace
- Find the .proj file within the generated workspace
- Run msbuild.exe against the project file and examine the results
How do the results compare against the behaviour you experience in NCrunch? Does the build hang?
Also - I'm not sure if this is the same issue, but I just thought I'd check to make sure it wasn't affecting you: http://social.msdn.microsoft.com/Forums/sa/tfsbuild/thread/b107892b-6317-41e1-9dc6-59979ea49f6e
Ok - this means that the problem isn't caused by anything to do with the workspacing, which helps narrow things down considerably.
Do you make use of any pre/post build events as part of the build for this project? If so, try turning on the run pre/post build event settings in your NCrunch project-level configuration. Also - try turning on the 'Copy referenced assemblies to workspace' option to see if this makes any difference.
Do you have any .licx files included as items in the problematic project? If so, does removing these files make any difference in your NCrunch build? Would you be able to share the MSBuild XML being used to include them in the project?
Yes. After deleting .licx file, build started successfully. But we have these files in our primary assemblies and they build successfully in either case. May it be because of our primary assemblies target .NET 2.0 and tests target 4.0 Framework?
I think that the issue is related to something in the license compiler that is behaving strangely inside NCrunch's build environment, possibly due to threading issues. I'll make a note to look a bit deeper at this to see if I can reproduce the problem. Meanwhile, you may be able to work around this issue by making the inclusion of the license files conditional on the NCrunch property value, i.e:
I'm not too sure about the syntax used in your project XML to include the .licx file (hence the '???'), but in theory this should allow your build to operate normally, while disabling the license inclusion for NCrunch.