Boring vs2005 problem

Posts   
 
    
stefcl
User
Posts: 210
Joined: 23-Jun-2007
# Posted on: 26-Aug-2007 11:22:10   

Hello, I'm working on a solution which contains an llblgen project (adapter) and a winform application. Everytime I start vs2005, I can build and run my winform app 2-3 times and then the solution fails to build with an error saying that vs2005 is unable to delete DAL.dll because it is in use. I have to restart vs2005 ( closing and reopening the solution doesn't work).

Any idea how I could fix/work around this?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39797
Joined: 17-Aug-2003
# Posted on: 26-Aug-2007 11:39:32   

Check your virusscanner. It might be that it reads the bin folder, and locks the dll. Exclude the folder. (This is a general vs.net problem, so it's not related particular to llblgen pro). Also, install SP1 for vs.net 2005 (if you haven't done so), as it solves some file lock crap.

Though this issue is pretty rare for winforms apps, it was plaguing webform apps though.

Frans Bouma | Lead developer LLBLGen Pro
stefcl
User
Posts: 210
Joined: 23-Jun-2007
# Posted on: 26-Aug-2007 16:03:50   

Thanks,

I don't think that it's related to llblgen pro, that's why I posted in the General forum. I have tried to disable my virus scanner, it still doesn't work. It looks like the files are locked by vs2005 itself.

That's veerrrryyyy annoying.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39797
Joined: 17-Aug-2003
# Posted on: 26-Aug-2007 16:25:25   

Could you check with process explorer from sysinternals.com which process actually locks it?

Also, you could check this: if you have a couple of projects you could disable copy local on the runtime lib references for many projects in the solution, just enable it ONCE for the DQE and for the ORM support classes (e.g. in the .exe project).

Frans Bouma | Lead developer LLBLGen Pro
mihies avatar
mihies
User
Posts: 800
Joined: 29-Jan-2006
# Posted on: 26-Aug-2007 18:43:20   

stefcl wrote:

Hello, I'm working on a solution which contains an llblgen project (adapter) and a winform application. Everytime I start vs2005, I can build and run my winform app 2-3 times and then the solution fails to build with an error saying that vs2005 is unable to delete DAL.dll because it is in use. I have to restart vs2005 ( closing and reopening the solution doesn't work).

Any idea how I could fix/work around this?

Is it possible that you use (create objects or something) dal.dll at design time? Perhaps in some form's constructor or something? Do you have VS2005SP1?

stefcl
User
Posts: 210
Joined: 23-Jun-2007
# Posted on: 28-Aug-2007 10:37:50   

Thanks, My vs2005 is up to date, when I run process explorer, it tells me that "devenv.exe" has open handles on "DAL.dll" and "ORMSupportClasses".

I have tried disabling "copy local", it looks like it doesn't help. I instantiate objects from the locked dll's in my forms, do you think it can be that bad?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39797
Joined: 17-Aug-2003
# Posted on: 28-Aug-2007 11:17:09   

stefcl wrote:

Thanks, My vs2005 is up to date, when I run process explorer, it tells me that "devenv.exe" has open handles on "DAL.dll" and "ORMSupportClasses".

I have tried disabling "copy local", it looks like it doesn't help. I instantiate objects from the locked dll's in my forms, do you think it can be that bad?

It's odd though. Several of my unit-test solutions contain 6-8 projects, with forms and other stuff and I never experience a lock.

So in your UI/exe project, there you set copy local on ORMSupportClasses to TRUE, everywhere else, you set it to false. Did you do that?

Frans Bouma | Lead developer LLBLGen Pro
stefcl
User
Posts: 210
Joined: 23-Jun-2007
# Posted on: 29-Aug-2007 20:14:32   

Thanks, I'm unsure that I did it exactly the way you describe. The weird thing is that I haven't encountered the problem since yesterday.