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

Notification

Icon
Error

Build issue against OpenWrap'd solution
Peter Mounce
#1 Posted : Friday, January 20, 2012 11:05:41 AM(UTC)
Rank: Member

Groups: Registered
Joined: 1/18/2012(UTC)
Posts: 15
Location: London, UK

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
I have a solution that I'm using OpenWrap v2 beta to integrate against. It builds fine in Visual Studio and `o build-wrap`. It follows this structure:

Quote:

/Foo.sln
/src
--/Foo.csproj
--/Foo.cs
/testing
--/Foo.Tests.csproj
--/FooFacts.cs
/wraps
--/_cache
----/DependencyLibrary
------/bin-net20
--------/DependencyLibrary.dll
--/openwrap
----/<all the openwrap stuff - msbuild targets, tasks, etc>


I have set AdditionalFilesToInclude to
Quote:

..\..\wraps\openwrap\**.*
..\..\wraps\_cache\**.*

(the forum has used pipes, but I used backslashes)
per the build-issues wiki page, but I still get an error when ncrunch attempts to build & run.
Quote:

........\AppData\Local\NCrunch\9296\18\wraps\openwrap\build\OpenWrap.CSharp.targets (41): The "InitializeOpenWrap" task failed unexpectedly.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at OpenWrap.Build.BuildInitializer.Initialize(String projectFile, String currentDirectory) in c:\src\openwrap\src\OpenWrap\Build\BuildInitializer.cs:line 23
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at OpenWrap.Build.InitializeOpenWrap.Execute() in c:\src\openwrap\src\OpenWrap.Build.Bootstrap\InitializeOpenWrap.cs:line 41
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)


I was just wondering whether anyone else had solved this problem?

By the way, when fiddling with the project settings, I found:
* it was confusing that the property editor allowed me to expand the AdditionalFilesToInclude node-tree and edit each string, but not reflect that in the actual setting
* it was difficult to know whether ncrunch had saved my property change and re-tried the build - the only feedback I could see was the path that it tried at increment a number
* on right-click rebuild in the ncrunch tests window, I couldn't tell whether ncrunch had actually rebuilt (I have a _fast_ computer, and the library I'm trying to crunch is tiny) - perhaps a timestamp on the output window?
Remco
#2 Posted : Friday, January 20, 2012 11:08:32 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi Peter,

Thanks for posting with this issue. I'm afraid I can only be of very limited use in troubleshooting OpenWrap issues due to the level of build customisation involved in it. I did manage to get an earlier version of OpenWrap working with NCrunch by ensuring that all OpenWrap resources were included in the NCrunch workspace (using AdditionalFilesToInclude), though I understand that OpenWrap v2 does a large amount of dynamic work - so I'm not 100% sure if this is still possible.

A useful way to troubleshoot issues like this one is to right click the failing project in the Tests Window, then choose the' Browse to last used workspace' option. This will allow you to inspect the workspace used by NCrunch as part of its build process, and you can run msbuild against the generated project file using the command line. By comparing this workspace against the project in its original location on your disk, you may be able to see which files are missing and still need to be included.

Also thanks for highlighting these usability issues. The AdditionalFilesToInclude config option is due for a bit of a dress up (the multi line text box is error prone and tacky). I'll have a look at the idea of adding a timestamp into the build to see if there's a clean way to do this. Note that NCrunch will automatically rebuild any project that has had a configuration change.


Cheers,

Remco
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.034 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download