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

Notification

Icon
Error

Build fails when Output folder contains drive letter
bluesky
#1 Posted : Friday, January 31, 2014 10:33:16 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/15/2012(UTC)
Posts: 2
Location: Germany

Thanks: 1 times
Hi,

i have a similar issue as already stated in this post:
http://forum.ncrunch.net/yaf_postst1140_NCrunch-fails-to-build-when-reference-is-on-another-drive.aspx

but in my case its the output folder which uses a substed drive letter (e.g. R:\Domain), giving the following exception:

ERROR (Internal): System.NullReferenceException: Object reference not set to an instance of an object.
at nCrunch.Common.IO.DirectoryPath.GetNumberOfCommonDirectories(DirectoryPath path1, DirectoryPath path2)

I already submitted a bug report from within VS for the issue.

Thanks for your help!

Remco
#2 Posted : Friday, January 31, 2014 11:07:35 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,986

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for sharing this issue! I saw the bug report come through a couple of hours ago and noticed the output path was the problem.

It's interesting that this worked for you in V1. I imagine it must have been quite unstable, as the output path pointing at an absolute path would have messed up NCrunch's workspace isolation.

I've made a note to improve NCrunch's handling of this situation. Probably the fix will work by automatically overriding the OutputPath to be a path relative to the project file when NCrunch is building the project.

To work around this issue, I suggest making the <OutputPath> build property conditional on the project not being built by NCrunch, for example:

<PropertyGroup>
<OutputPath Condition="$(NCrunch) != '1'">R:\Domain</OutputPath>
</PropertyGroup>

.. in this way, the output will always be contained within the workspace and the engine won't bug out.


Cheers,

Remco
1 user thanked Remco for this useful post.
bluesky on 1/31/2014(UTC)
bluesky
#3 Posted : Friday, January 31, 2014 11:57:09 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/15/2012(UTC)
Posts: 2
Location: Germany

Thanks: 1 times
Hi Remco,

thanks for the quick reply and the workaround. I will try that.

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