The ASPSmith's Blog

Some rants about ASP.NET by Steven Smith

"unexpected error creating debug information"

I keep running into this issue in my multi-project VS.NET solutions.  For some reason, something is locking the dll(s) in the /obj/ folder of library components.  The fix that I have at the moment is as follows:

  1. Shut down VS.NET
  2. Browse to the project in windows explorer
  3. Delete the /obj/ folder.
  4. Delete the project outputs (.dll and .pdb) from /bin (not sure this step is necessary)
  5. (can't hurt, might help) -- delete the project outputs from any other project /bin folders in the solution that is having issues.
  6. Restart VS.NET
  7. Rebuild
  8. Laugh the next time you hear that DLL Hell is no more in .NET...

Update: Just deleting /obj/ after closing VS.NET does it.  Ambrose pointed me to prcview.exe and that demonstrated that it is in fact devenv.exe locking the file, so it's VS.NET's own fault, not Index Server or anything else that is to blame.

Listening to: Disturbed - Remember

Comments

Paschall said:

Steven it's probably also the same problem I had few days ago. Check Index Server, and see if it's running.

If you don't need it turn off the services, otherwise add some exclusion directories, the .Net temporary folders for a starter
# August 12, 2003 10:36 AM

Addy Santo said:

The problem can be caused by virtually anything which runs in the background and is triggered by file activity. Index server is one example, also anti-virus scanners tend to do the same.

I get this occasionally in VB/C# but much more often with managed C++ projects. I'm not sure why...
# August 12, 2003 11:09 AM

Jamie Cansdale said:

I always keep the SysInternals Process Explorer [1] at hand to remove .pdb and .dll files from the grips of Visual Studio. You'll find you can release the file handle without shutting down Visual Studio. I also find this hardly ever happens with VS.NET 2003.

[1] http://www.sysinternals.com/ntw2k/utilities.shtml
# August 12, 2003 5:08 PM

Steven Smith said:

For the record, I am using VS.NET 2003. The one that keeps getting locked is a C# project (class library) in a solution with 4 other VB projects (3 class libs and a web). I'm wondering if the IDE real-time compiling of VB's IDE is hitting the PDF/DLL from the C# project and not cleaning them up.

Using prcview, it's clear that only that one project's file are being referenced from the My Documents/Visual Studio Projects/ProjectName/obj/ folder. The rest (the other dlls and pdbs being locked/referenced by devenv.exe) are going to the shadow copy under Application Data/.

Thanks for the link to Process Explorer - I'll check it out.
# August 12, 2003 6:15 PM

Denis Bauer said:

I've made some good experience to switch from "Debug" to "Release" and back to solve this problem.
But it isn't working all the time.
# August 13, 2003 4:10 AM

Steven Smith said:

Tried switching from Debug to Release, and it worked! Easier than shutting down, to be sure. Thanks for the tip, Denis!
# August 13, 2003 11:18 AM

Charles McEvoy said:

I've had this problem to, tis VERY annoying!
# August 29, 2003 9:32 AM

Abraham Rodriguez said:

Just curious, has anyone had problems like these (and others) arising from having the project files too deep into a directory's hierarchy? like if I have debug .exe in a place say c:\documents and settings\me\my documents\visual studio projects\asp.net\controls\myapp\bin\debug\myapp.exe I get all kinds of errors, including the error with the file locks.. once I moved root of the project to be directly under visual studio projects, the problem was solved forever.. I don't know if it's related, but worth noting perhaps?
# September 15, 2003 1:39 PM

TrackBack said:

# October 30, 2003 7:15 AM

Steve Hampton said:

Solution in this blog was extremely helpful to me as I've spent most of today trying to figure it out!!! Thanks guys!
# February 12, 2004 1:32 PM

Michael said:

Good info. I have tried all of it and I still can't compile. Also, no one mentioned bind failures (FUSLOGVW.exe). I get these also. The ide is having trouble finding/loading the assembly.

Any other help ??? Thanks!!
# February 12, 2004 4:35 PM

John said:

Dont know if it really help but I heard about checking the option 'Launch folder windows in separate process' on Windows explorer
# March 2, 2004 1:49 PM

Rob said:

Most likely, you have an ASPX file open in VS.NET that has embedded your control. The ASPX project opens the control DLL and keeps it open. If you just don't open the ASPX while in VS.NET, you will be able to compile your solution. Once you open it, you will likely have to restart VS.NET, since it obviously seems to cache these controls when rendering them in the WYSIWYG design-time viewer.
# April 12, 2004 1:20 PM

Dave said:

I have had similar problems. I have 75 c# projects all in 1 solution. The problem occurs mostly with user controls. Another (i think) related problem is in the following link: This has been a killer for me and has some interesting related info:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=4fe7c9e8.0403311729.470cd405%40posting.google.com&rnum=2&prev=/groups%3Fq%3Dchakachimp%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den
# April 23, 2004 1:27 AM

Dave said:

I have had similar problems. I have 75 c# projects all in 1 solution. The problem occurs mostly with user controls. Another (i think) related problem is in the following link: This has been a killer for me and has some interesting related info:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=4fe7c9e8.0403311729.470cd405%40posting.google.com&rnum=2&prev=/groups%3Fq%3Dchakachimp%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den
# April 23, 2004 1:28 AM

Patrick said:

If you run Build->Clean Solution this will take care of the issue as well.

# August 3, 2007 2:18 PM

DhanaSekaran. R said:

Hi buddy,

Thanks a lot man. It helped me a lot and I have fixed the issue successfully.

Thanks a lot once again.

# August 4, 2007 2:28 AM

Siva said:

This post was very useful and informative. Thanks.

# April 17, 2009 1:24 AM

burak said:

delete only .pdb files about your project in obj and bin/debug folder and everything work fine..

# May 29, 2009 8:12 PM

cosh said:

Thanks my friend its working:)

you are perfect!!

# August 11, 2009 3:36 AM

Derek said:

Thanks, fixed my issues!

# August 21, 2009 1:07 AM

Walter said:

Thanks dude! Your solution works

C-ya!

# January 11, 2010 1:12 PM

Suchi_Richa said:

Thanks, fixed my problem

# April 30, 2010 9:53 AM

Mintyboi said:

Yup it sure worked. Thanks much

# July 1, 2010 11:47 PM

Marios said:

Awesome Post fixed my issue!

I had to Kill a process from Task Management

# July 27, 2010 11:52 AM

Claudio Cussuol said:

I had the same problema. Here the culprit was the Microsoft Live Sync which i used to use to make realtime backups of my source folders.

Just disabled it and the problem is gone.

# August 25, 2010 11:58 AM

Whitny Pingtown said:

Damn, rather interesting topic. Where will I get your RSS?

Whitny  Pingtown

<a href="www.wirelesscameradetectors.com/">rf sweep</a>

# November 15, 2010 6:33 AM

dc comics ipad app said:

you can make it through the rain. you stand up once again on my own.

-----------------------------------

# December 18, 2010 9:13 AM

Ahmed said:

many many thanx it goes great

# June 9, 2011 8:06 PM

Jess Salmon said:

Thanks for the recommendations shared in your blog. One extra thing I would like to convey is that weight loss isn't about going on a celebrity diet and attempting to lessen as significantly weight that you'll be able to in a couple of days. One of the most effective way to burn fat is by making use of it slowly and gradually and ideal following some simple recommendations which can allow you to make essentially the most from a attempt to lose weight. You might recognize and be following a couple of of these recommendations, nevertheless reinforcing info by no means affects.

# July 1, 2011 8:54 PM

Weston Pulfer said:

Rather beneficial posting Excited for additional content articles in your web-site.

# July 5, 2011 2:14 PM

resale chanel handbags thrift store said:

<a href="www.topbagshop.org/.../Chanel-fashion-handbags-bronze-with-golden-chain-30226_21.htm">resale chanel handbags thrift store</a>, you have been looking for?

# August 27, 2011 3:35 AM

nonfinite said:

That did the trick, thanks a bunch!  My build must've bugged out as my laptop died from battery drain, deleting and rebuilding worked perfectly.

# September 29, 2011 8:50 PM

Moogewillia said:

check <a href=guccioutletsale.weebly.com/>gucci outlet sale</a>  at my estore   , just clicks away

# December 26, 2011 12:26 AM

ugg outlet said:

With that under consideration,uggs outlet, we've looked at everything from hypnosis software to mp3s, downloads of hypnosis scripts and videoswww.officialluggsoutletsmall.com ugg boots outlet

# December 30, 2011 1:57 AM

beedomelida said:

check this link, <a href=chanelflapbag.livejournal.com/>chanel flap bag price 2010</a>   to get new coupon   for more

# January 5, 2012 6:48 PM

Fankdouglass said:

check   with confident <a href=www.audiforums.com/.../a>  online shopping

# January 17, 2012 7:30 AM

vodschristel said:

look at   for gift <a href=tamilpond.com/index.php  for more

# January 19, 2012 5:57 AM

biamslajuana said:

look at <a href=convert-dvd-to-archos.weebly.com/>convert dvd to archos</a>  , for special offer    for promotion code

# January 24, 2012 12:32 PM

Feextmof said:

check this link, <a href=chanelhandbagy.livejournal.com/>chanel handbag 2010</a>  , just clicks away

# January 30, 2012 2:33 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)