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

Notification

Icon
Error

NCrunch File Permissions
AlanLTF
#1 Posted : Thursday, March 26, 2015 5:54:56 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/26/2015(UTC)
Posts: 3
Location: United States of America

I am using the Winnovative HTML to PDF library and am finding that NCrunch is throwing the error below when executing tests that call out to this library. The tests run without error in Visual Studio's test runner. Is there a special permission I need to add?

Code:
System.Exception: Could not start conversion. WinApi error code 2. Check 'wnvinternal.dat' file has execute permissions and that it exists near wnvhtmltopdf.dll or set the WnvInternalFileName property with the full path of the file
   at Winnovative.HtmlToImageConverter.ᜀ(String A_0, ᜱ& A_1, Hashtable& A_2)
   at Winnovative.HtmlToPdfConverter.ᜀ(String A_0, String A_1, String A_2, String A_3, Boolean A_4)
   at Winnovative.HtmlToPdfConverter.ᜀ(Stream A_0, String A_1, String A_2, String A_3, String A_4, Boolean A_5)
   at Winnovative.HtmlToPdfConverter.ConvertUrlToStream(String url, Stream outPdfStream)
Remco
#2 Posted : Thursday, March 26, 2015 10:32:37 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, thanks for sharing this issue.

This is most likely due to the file not landing in its expected place inside the NCrunch workspace. Have a look at implicit file dependencies - this gives a summary of the problem and suggests a few ways of solving it. If it doesn't turn out to be a file missing from the NCrunch workspace, check back with me and we'll dig a bit deeper.
AlanLTF
#3 Posted : Friday, March 27, 2015 1:28:04 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/26/2015(UTC)
Posts: 3
Location: United States of America

I was able to get it working by enabling "Copy referenced assemblies to workspace" and disabling "Include static references in workspace". I tried making it work using the additional files to include setting but that did not work. I do not like the idea of specifically adding a file in the project just to make ncrunch work.
Remco
#4 Posted : Friday, March 27, 2015 10:30:07 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)
For the 'Copy referenced assemblies to workspace' setting to have solved the problem, the file must be built from another project in your solution or be a resource associated with another project. In either case, the 'Additional files to include' wouldn't be the right solution.

It may be worth looking at how your code resolves the file. If the code can be changed to search for the file adjacent to the assembly it is directly associated with (instead of just in the current directory or the application domain base directory), you may be able to work with this without the 'Copy referenced assemblies to workspace', which can have some impact on build performance.
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.031 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download