views:

308

answers:

4

Hi all. I've got a nant build script (.86 beta) and it is telling me this:

BUILD FAILED

Failed to initialize the 'Microsoft .Net Framework 2.0' target framework.

The process cannot access the file 'C:\Users\cconway\AppData\Local\Temp\tmp25E3.tmp' because it is being used by another process.

This file does not even exist on my machine. Does anyone know the cause of this? Rebooting seems to allow me to run the script once successfully, but every time after that I get this message (though the name of the tmp file changes per reboot).

Thanks!

+1  A: 

Are there any third-party tasks which might leave temp files open or keep running in the background, thus leaving file locked?

Anton Gogolev
A: 

Maybe try sysinternals process monitor which will allow you to see the process which has the handle on this file.

Andy Whitfield
A: 

Also, make sure that you have all the right versions of .Net installed and they are the correct ones (SDK vs Runtime). If you open the config file for nant you can see where it expects the .net version to be go check to make sure it's there and that you can see hte compiler methods (csc, vbc, etc). So it could have something that is trying to find it but it's not there or the pathing is off.

It is beta so there could even be a typo in the config file.

Joshua Cauble
A: 

The answer is my anti-virus. I should have tried disabling that first! Once I disabled it, everything worked like a charm.

Hope this helps someone.

Chris Conway