<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Error MSB3021 and Team Build</title><link>http://blogs.msdn.com/aaronhallberg/archive/2007/10/22/error-msb3021-and-team-build.aspx</link><description>The error message " error MSB3021: Unable to copy file "&amp;lt;filename&amp;gt;" to "&amp;lt;output location&amp;gt;". Access to the path '&amp;lt;output location&amp;gt;' is denied " occurs when the MSBuild Copy task cannot overwrite an existing read-only file. Typically in</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>target  &amp;raquo; Blog Archive   &amp;raquo; Error MSB3021 and Team Build</title><link>http://blogs.msdn.com/aaronhallberg/archive/2007/10/22/error-msb3021-and-team-build.aspx#5617612</link><pubDate>Tue, 23 Oct 2007 09:01:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5617612</guid><dc:creator>target  » Blog Archive   » Error MSB3021 and Team Build</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://target.wpbloggers.com/?p=3469"&gt;http://target.wpbloggers.com/?p=3469&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>VSTS Links - 10/24/2007</title><link>http://blogs.msdn.com/aaronhallberg/archive/2007/10/22/error-msb3021-and-team-build.aspx#5651166</link><pubDate>Wed, 24 Oct 2007 17:53:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5651166</guid><dc:creator>Team System News</dc:creator><description>&lt;p&gt;Brian Harry on TFS plugin compatibility between TFS 2005 and TFS 2008. Ian Ceicys on NUnit Conversion...&lt;/p&gt;
</description></item><item><title>re: Error MSB3021 and Team Build</title><link>http://blogs.msdn.com/aaronhallberg/archive/2007/10/22/error-msb3021-and-team-build.aspx#9005726</link><pubDate>Sun, 19 Oct 2008 03:33:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9005726</guid><dc:creator>JHarris24</dc:creator><description>&lt;p&gt;Aaron- I am having a problem when attempting to publish my click once app using your recommendation above. &amp;nbsp;I'm using TFS08/3.5, and have the following code in my TFSBuild.proj file:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;SolutionToBuild Include=&amp;quot;$(BuildProjectFolderPath)/../../Dev/DeskIT/DeskIT.sln&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Targets&amp;gt;&amp;lt;/Targets&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Properties&amp;gt;&amp;lt;/Properties&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/SolutionToBuild&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;SolutionToPublish Include=&amp;quot;$(BuildProjectFolderPath)/../../Dev/DeskIT/DeskIT.sln&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Targets&amp;gt;&amp;lt;/Targets&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Properties&amp;gt;OverwriteReadOnlyFiles=true&amp;lt;/Properties&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/SolutionToPublish&amp;gt;&lt;/p&gt;
&lt;p&gt;I also added the target overload:&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;Target Name=&amp;quot;AfterGet&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Exec Command=&amp;quot;attrib -r *.* /S&amp;quot; WorkingDirectory=&amp;quot;$(SolutionRoot)&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/Target&amp;gt;&lt;/p&gt;
&lt;p&gt;Nothing seems to fix the access denied error when MSBuild is attemping to publish my project, this is the error from the buildlog.txt:&lt;/p&gt;
&lt;p&gt;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(3253,9): error MSB3021: Unable to copy file &amp;quot;D:\TeamBuilds\DeskIT\DeskIT Dev\Binaries\Debug\DeskITShell.exe.manifest&amp;quot; to &amp;quot;\DeskITShell.exe.manifest&amp;quot;. Access to the path '\DeskITShell.exe.manifest' is denied.&lt;/p&gt;
&lt;p&gt;The publish location defined in the project is a network share, and the TFS service account has full control to both the share and the folder. &amp;nbsp;Any ideas? &amp;nbsp;Thanks in advance for any help.&lt;/p&gt;
&lt;p&gt;-Josh&lt;/p&gt;
</description></item><item><title>re: Error MSB3021 and Team Build</title><link>http://blogs.msdn.com/aaronhallberg/archive/2007/10/22/error-msb3021-and-team-build.aspx#9012809</link><pubDate>Thu, 23 Oct 2008 13:53:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9012809</guid><dc:creator>aaronhallberg</dc:creator><description>&lt;p&gt;Based on the path in the error message, it looks like your publish location is not being respected and the copy is attempting to place the manifest file into the root directory of your build machine's D: drive. &amp;nbsp;My guess would be that there is already a read-only copy of the file there which is giving the access denied error. &amp;nbsp;The real issue would seem to be fixing that path!&lt;/p&gt;
</description></item></channel></rss>