Error Generating Xml Documentation File Access Is Denied Visual Studio
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Build fails because of xml documentation error up vote 7 down vote favorite I am trying to build a ASP.NET MVC 2 project that uses Lucene.Net. I make a standard build definition in TFS 2010. When I queue a new build, it fails on this error: CSC: Error generating XML documentation file 'xxx\xxx\Lucene.Net.xml' ('Access is denied. ') But in my project properties for Lucene, I don't have xml comments checked. How can I get this to build correctly? I don't care about xml document files! tfs2010 tfsbuild share|improve this question asked Sep 1 '10 at 20:08 Rick Ratayczak 1,25611126 add a comment| 2 Answers 2 active oldest votes up vote 14 down vote I had the same problem. In my case it was caused by having bin\Release\[Assembly Name].xml in project Source Control. In build Sources location the [Assembly Name].xml was marked as readonly and CSC cannot override it. Solution is to remove [Assembly Name].xml file from Source Control, or set Cloak in Workspace option of Build definition. share|improve this answer answered Jan 17 '11 at 14:30 HolaJan 459411 add a comment| up vote 3 down vote accepted Got it. Unchecked it on release build config, and all is fine. share|improve this answer answered Sep 1 '10 at 20:53 Rick Ratayczak 1,25611126 can you maybe add a little more detail with your answer? It's not very clear to other people who might be doing the same thing. –Matt Mar 4 '15 at 20:31 1 I unchecked the xml documentation checkbox in the project properties. –Rick Ratayczak Mar 4 '15 at 20:34 In my case, I switched to "Debug" mode
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How can I prevent Visual Studio from locking the xml documentation files in the bin directory? up vote 17 down vote favorite 5 My visual studio solution includes a web application http://stackoverflow.com/questions/3621761/build-fails-because-of-xml-documentation-error and a unit test application. My web application uses log4net. I want to be able to use msbuild from the command-line to build my solution. However, whenever I build the solution from the command-line, I get build errors because it can't copy log4net.xml to the test project's bin directory. The error message is: "Unable to copy file '\bin\log4net.xml' to 'bin\Debug\log4net.xml'. Access to the path '\bin\log4net.xml' is denied." It looks like Visual Studio is locking this file, but I can't http://stackoverflow.com/questions/1167608/how-can-i-prevent-visual-studio-from-locking-the-xml-documentation-files-in-the figure out why it would need to. Is there a way to prevent VS from locking the XML documentation files in a project that it has loaded? msbuild locking xml-documentation share|improve this question asked Jul 22 '09 at 19:25 SteveBering 54711030 add a comment| 5 Answers 5 active oldest votes up vote 1 down vote accepted I've had this problem with Visual Studio, too. We use NAnt instead of MSBuild, but the problem is the same. I was able to work around it by modifying the build file to ignore failures when copying xml documentation. Note that this doesn't actually solve the original problem since the xml files are still locked, but this workaround was good enough for us since the actual content of our xml documentation doesn't change very often. share|improve this answer edited Nov 14 '09 at 2:40 answered Nov 14 '09 at 2:32 Kevin Kibler 7,70862656 add a comment| up vote 8 down vote I've found the following solution: In VS postbuild event or in NAnt/MSbuild script execute the cmd script handle.exe -p devenv [Path to the folder with locked files] > handles.txt FOR /F "skip=5 tokens=3,4 delims=: " %%i IN (handles.txt) DO handle -p %%i -c %%j -y handle.exe is available here http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx first line of the script dumps to handles.txt all handles for files locked by VS second line reads handle ids from the file and kills the handl
Issues » Build for project with XML documentation generation fails Build for project with XML documentation generation fails Options Previous Topic Next Topic BettigM #1 Posted : Wednesday, July 23, 2014 11:53:08 AM(UTC) Rank: NewbieGroups: Registered Joined: 7/23/2014(UTC)Posts: 4Location: GermanyThanks: 1 timesWas thanked: 2 http://forum.ncrunch.net/yaf_postst1331_Build-for-project-with-XML-documentation-generation-fails.aspx 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 error generating 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 error generating xml can do to solve this problem?Thanks in advance & Best regardsMarkus Back to top User ProfileView All Posts by UserView Thanks Remco #2 Posted : Wednesday, July 23, 2014 10:20:45 PM(UTC) Rank: NCrunch DeveloperGroups: Administrators Joined: 4/16/2011(UTC)Posts: 3,951Thanks: 522 timesWas thanked: 575 time(s) in 556 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