0

When building a setup project I get a message:

Error with setup build: Error 27 Could not create the file 'C:\Users\MyName\AppData\Local\Temp\VSI1E1A.tmp' 'Access is denied.'

I have tried the following (from http://support.microsoft.com/kb/329214/EN-US)

regsvr32 "C:\Program Files (x86)\Common Files\Microsoft Shared\MSI Tools\mergemod.dll" 

The DLL registers but this does not fix my problem. Also, I tried a Clean build, deleting the temp folder, ran VS2008 as administratror, restart my PC but it occurs every time. I have no anti-virus software running and running on Windows 7 64-bit. This operation worked fine until recently. I have read many other users see this but found no solution.

The only half solution I found was to edit setup properties and switch to Package files as Loose uncompressed files. This works but is not ideal as I need a full installer.

Mister Cook
  • 1,552
  • 1
  • 13
  • 26

3 Answers3

5

Its just a protective feature of the Anti Virus u might be using. Had the same problem while using Kaspersky. Paused the "Real Time Protection" temporarily, and the build, rebuild, everything worked perfectly. Then resumed the AV services for sanity to prevail. Hope this helps. (I dunno WHY this happened, but the step simply solved the problem)

Zuhair
  • 51
  • 2
2

No, that error message is unique. Not being able to create files in your own TEMP directory is not good news. At least verify the security settings for that folder, you definitely want to run a thorough disk scan.

A band aid is to move the TEMP directory elsewhere. Control Panel, System, Advanced, Environment variables and create the TEMP and TMP variables and set them to, say, c:\temp. Ask more questions about this at superuser.com

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • I can create temp files in that directory and I can see them being created in that folder by VS2008 during the build of the setup, it just seems to fail at the end of the build. – Mister Cook Dec 02 '10 at 13:29
  • Try SysInternals' ProcMon utility. Maybe you can diagnose this problem from the trace it produces. Like some kind of program messing with that .tmp file. Somebody at superuser.com would have told you this. – Hans Passant Dec 02 '10 at 14:01
0

I have seen this exact problem on my Studio 2008 x64 install. It seems to be some sort of race condition as it happens 99% but not 100% of the time.

I haven't found a fix- but I have found a useful workaround which solves the problem-

Run up ProcMon (the SysInternals tool) and set it going, then do your build. ProcMon seems to slow everything down and thus somehow resolve the race condition. Its an ugly hack but it does work!

tgallard
  • 381
  • 3
  • 9