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
Build/Test Issues
Build for project with XML documentation generation fails
Started by BettigM on 9,027 views
Remco NCrunch Developer
#6169
23 Jul 2014 22:20 UTC
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.
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.
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.
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.
Works fine now, thanks for your help. :-)
Post a reply
Log in to reply.