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

Notification

Icon
Error

Build for project with XML documentation generation fails
BettigM
#1 Posted : Wednesday, July 23, 2014 11:53:08 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/23/2014(UTC)
Posts: 5
Location: Germany

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Hello everyone,

Recently I've begun using NCrunch at work and I'm loving it so far!

At work we have a policy to enable XML documentation generation for all our C# projects.
And it seems that this option causes problems running Visual Studio 2010 with NCrunch.

At first it works fine, but after a certain amount of time working with NCrunch on a solution (about 30 minutes the last time the error occured, but it varies), building a project produces the following error message in the "NCrunch Test" window:

CSC (0): Error generating XML documentation file 'C:\Foo\Bar.xml' ('Access denied ')

Building the project manually with Visual Studio after that produces the same error.

Only after I close the current solution and open it again is the project able to build again.

Has anyone noticed such a problem before? Is there anything I can do to solve this problem?

Thanks in advance & Best regards
Markus
Remco
#2 Posted : Wednesday, July 23, 2014 10:20:45 PM(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 Markus,

Thanks for posting!

Is the error consistently reporting the XML file using an absolute path to your C drive as you've shown above? Or is it referencing inside the NCrunch workspaces directory? If the XML file is being referenced absolutely, then probably it's a point of crossover between NCrunch and your foreground solution. This is a bad thing as it means that NCrunch is unable to generate or work with these XML files in isolation - you'll get interference between processes along with file locking and data related errors.

If this is indeed the case, the solution is to change the way the XML files are being generated and referenced so that this happens only using a relative file path. NCrunch workspaces are arranged entirely using relative paths, so doing this means that NCrunch will have its own separate copies of the XML files and there won't be any interference with your foreground solution.

If this documentation is only being generated and it isn't being used by your test code, you could also disable the build step using conditional build behaviour. This would likely improve your NCrunch performance too.

1 user thanked Remco for this useful post.
BettigM on 7/24/2014(UTC)
BettigM
#3 Posted : Thursday, July 24, 2014 6:28:47 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/23/2014(UTC)
Posts: 5
Location: Germany

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Hi Remco, thanks for your quick response.

The XML file was indeed specified in the project file using an absolute path.

I have now changed it to use a relative path instead.

I'll let you know how it performs at work today, but I think that was probably it, thanks.
1 user thanked BettigM for this useful post.
Remco on 7/24/2014(UTC)
BettigM
#4 Posted : Thursday, July 24, 2014 7:53:26 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/23/2014(UTC)
Posts: 5
Location: Germany

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Works fine now, thanks for your help. :-)
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.033 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download