Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Web Site ": Build (web): The file name already in the collection"

I'm working on a web site (not web application) project in Visual Studio 2013 and have intermittent build issues. The build output shows each directory building (e.g. "Building directory '/User/'."). However, more often than not, on different directories, during different build attempts, I receive the following error (note the filename changes):

The file name 'C:\Users\xxxx\AppData\Local\Temp\2\Temporary ASP.NET Files\root\25143ee9\2d39f4f7\yhzrc1w3.pdb' was already in the collection. Parameter name: fileName

And the following build output:

: Build (web): The file name 'C:\Users\xxxx\AppData\Local\Temp\2\Temporary ASP.NET Files\root\25143ee9\2d39f4f7\yhzrc1w3.pdb' was already in the collection.

I have tried deleting everything from the temp directories, restarting visual studio, bypassing Visual Studio (building with aspnet_compiler), and doing a rain dance. However, no matter what I try builds intermittently fail.

Is there any way to see more granular output from the build process in Visual Studio? I've already tried setting the build output to detailed ("Tools"-->"Projects and Solutions"-->"Build and Run"-->"MSBuild project build output verbosity:"). Any ideas would be greatly appreciated!

Thank you!

like image 559
BorgRebel Avatar asked Mar 06 '15 19:03

BorgRebel


1 Answers

I ended up finding out what was causing the problem.

I had upgraded from ReportViewer 10 to ReportViewer 11 and the following line was added to the web.config:

<buildProviders>
   <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</buildProviders>

This was causing the intermittent build failures. I removed the buildProvider tag and it builds and deploys just fine.

like image 55
BorgRebel Avatar answered Oct 13 '22 01:10

BorgRebel