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

Notification

Icon
Error

NCrunch fails to build when reference is on another drive
Mousy
#1 Posted : Friday, January 24, 2014 6:39:25 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/24/2014(UTC)
Posts: 3
Location: Thailand

Thanks: 1 times
I decided to install NCrunch today to evaluate it. However I ran into a problem almost right away. NCrunch does not build the projects in my solution.

I have projects that reference assemblies on a (substed) drive that contains external assemblies. Somehow this causes an exception in NCrunch on build:

System.IO.IOException: File path must be absolute with disk root: F:Some.External.Assembly.dll
at nCrunch.Common.IO.FilePath..ctor(String #==, Boolean #==)
at nCrunch.Common.IO.FilePath.FromAbsolutePath(String absoluteFilePath)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at nCrunch.Common.IO.DirectoryPath.GetFiles(String wildcardSpec)
at nCrunch.Common.IO.FilePath.GetRelatedFiles()
at nCrunch.Client.ComponentLoader.SnapshotComponentFactory.#=(ComponentBuildAnalysisResult #===)
at nCrunch.Client.ComponentLoader.SnapshotComponentFactory.#==(ProcessorArchitecture #==)
at nCrunch.Client.ComponentLoader.SnapshotComponentFactory.CreateSnapshotComponentFromXml(FilePath projectFilePath, BuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, ISnapshotConfig snapshotConfig, VisualStudioVersion vsVersion)

I would expect the file path to be F:\Some.External.Assembly.dll. Can I work around this somehow?

Thanks in advance for your assistance.
Remco
#2 Posted : Friday, January 24, 2014 7:09:12 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting and for giving NCrunch a try!

Would you be able to submit a bug report straight after you've had this happen to you? You can do this from inside the NCrunch menu. The bug report will contain useful information for reproducing and fixing the issue.

To work around the problem, I recommend subst-ing your external assemblies from one level further up - so that the DLLs are not situated in the root directory of F drive. This should allow you to get past the exception.

Cheers,

Remco
Mousy
#3 Posted : Friday, January 24, 2014 8:14:42 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/24/2014(UTC)
Posts: 3
Location: Thailand

Thanks: 1 times
I have made the simplest test case possible: 1 assembly in the root of a drive and one project with a reference to this assembly. The same error occurs. I have submitted a bug report right after this.

I moved the assembly into a sub directory and NCrunch builds just fine. So your assessment seems correct.


Sadly moving all references to a sub directory is not an option for my actual projects. There are hard dependencies on the specific location, and changing all that would be a major headache...
Remco
#4 Posted : Friday, January 24, 2014 9:29:32 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
I saw the bug report come through. This is perfect. Thanks!

This is a high priority fix and it will be in the next build. I'm expecting the next build to be the RTM of V2 which will be out within the next 2 weeks. NCrunch V1 doesn't use the same file path translation system, so you might be able to get your solution working with this version if you're prepared to downgrade for a week or so.

Thanks again for the detailed analysis of this issue.
1 user thanked Remco for this useful post.
Mousy on 1/27/2014(UTC)
Mousy
#5 Posted : Friday, January 31, 2014 7:57:40 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/24/2014(UTC)
Posts: 3
Location: Thailand

Thanks: 1 times
With version 2.4 the build issue is gone. I can now start my evaluation on our actual product.
Remco
#6 Posted : Friday, January 31, 2014 7:58:50 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Great to hear. Thanks for taking the time to report the issue. It was good to get the fix into the RTM.
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.043 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download