I'm working on a开发者_如何转开发 pretty simple C# solution with two projects: a class library and an installer for the library. Building the class library itself takes about a second. Building the installer, however, takes an unpredictably/incredibly long time. More interestingly, the CPU appears to be "taking breaks" during compilation, spiking a single core for 5 to 10 seconds and then hitting near-0 for several seconds.
The installer project is pretty simple. It's just the output from the class library (a single DLL, about 2MB) and a few registry keys.
Any ideas what could cause this?!
We had this exact problem and found that the msi build process creates vsi*.tmp files in the c:\Documents and Settings\username\Local Settings\Temp folder which are not cleaned up, and thus build up over time. The more of these files that exist, the longer the msi creation takes. We solved our problem by using a scheduled task to delete any of those files that are > 24 hours old.
Note - for our situation the server was Windows Server 2003 R2 - hence the c:\Documents and Settings prefix. If you are using Windows Vista or Windows 7, you'll probably find the files by searching for vsi*.tmp under c:\Users\username instead.
If anyone stumbles across this question on google and none of the other solutions seem to solve your problem and you like myself had your work on a usb drive ... dont use the usb drive . Although you only then setup one workspace in TFS and then drag the usb around its not worth it. Just create another workspace on your local drive and only use the usb when needed.
After tinkering with things for awhile, I found that changing the Register setting to NOT REGISTER for COM in favor of having the DLL build perform the registration, the installer build became much more reliable (and faster). I'm not sure this constitutes a solution, since COM registration should simply work. But, I've at least been able to work around the issue.
精彩评论