[wix-users] TFS 2017 Build MakeSfxCA.exe Sometimes throws System.UnauthorizedAccessException

Hoover, Jacob Jacob.Hoover at greenheck.com
Wed Feb 15 09:03:01 PST 2017


You could ask the creators of WixSharp...

For the Wix parts, is it using the latest version of WiX?  Are you able to reproduce this issue only using the Wix toolset?

Odds are it's either something WixSharp is doing, an AV software on the build machine that has an open handle to the file, or possibly an older version of WiX.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of G mbh
Sent: Wednesday, February 15, 2017 8:43 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] TFS 2017 Build MakeSfxCA.exe Sometimes throws System.UnauthorizedAccessException

Hey,

we are using WixSharp for creating an InstallerCreator.
This InstallerCreator is used during a build defined in the TFS which creates a MSI in the end.
We have a problem during the MakeSfxCA step.
Sometimes (around 1/4th to 1/5th of all attempts) the creation of the build fails during the MakeSfxCA step with a System.UnauthorizedAccessException.
Example Stacktrace:

Error: System.UnauthorizedAccessException: Acces to path "C:\Users\tfsbuild\AppData\Local\Temp\tmpC32E.tmp" was denied.
2017-02-15T10:35:03.0075079Z    at System.IO.__Error.WinIOError(Int32
errorCode, String maybeFullPath)
2017-02-15T10:35:03.0075079Z    at System.IO.File.InternalDelete(String
path, Boolean checkHost)
2017-02-15T10:35:03.0075079Z    at System.IO.File.Delete(String path)
2017-02-15T10:35:03.0075079Z    at
Microsoft.Deployment.Compression.Cab.CabPacker.CabDeleteFile(String path, Int32& err, IntPtr pv)
2017-02-15T10:35:03.0075079Z    at
Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.FlushFolder(Handle
hfci, PFNGETNEXTCABINET pfnfcignc, PFNSTATUS pfnfcis)
2017-02-15T10:35:03.0075079Z    at
Microsoft.Deployment.Compression.Cab.CabPacker.FlushFolder()
2017-02-15T10:35:03.0075079Z    at
Microsoft.Deployment.Compression.Cab.CabPacker.Pack(IPackStreamContext
streamContext, IEnumerable`1 files, Int64 maxArchiveSize)
2017-02-15T10:35:03.0075079Z    at
Microsoft.Deployment.Compression.Cab.CabEngine.Pack(IPackStreamContext
streamContext, IEnumerable`1 files, Int64 maxArchiveSize)
2017-02-15T10:35:03.0075079Z    at
Microsoft.Deployment.Compression.CompressionEngine.Pack(IPackStreamContext
streamContext, IEnumerable`1 files)
2017-02-15T10:35:03.0075079Z    at
Microsoft.Deployment.Compression.ArchiveInfo.PackFileSet(String
sourceDirectory, IDictionary`2 fileNames, CompressionLevel compLevel,
EventHandler`1 progressHandler)
2017-02-15T10:35:03.0075079Z    at
Microsoft.Deployment.Tools.MakeSfxCA.MakeSfxCA.PackInputFiles(String
outputFile, IDictionary`2 fileMap)
2017-02-15T10:35:03.0075079Z    at
Microsoft.Deployment.Tools.MakeSfxCA.MakeSfxCA.Build(String output, String sfxdll, IList`1 inputs, TextWriter log)
2017-02-15T10:35:03.0075079Z    at
Microsoft.Deployment.Tools.MakeSfxCA.MakeSfxCA.Main(String[] args)


The build is executed by a build agent on a Windows server. The build agent is logged in as a separate user.
It happens seemingly random and so far we could not determine a cause. We checked permissions of course, the "tfsbuild" user has permissions for his own TMP folder and most of the time it works.
The real problem is, that even if the exception is thrown the MSI gets created, but it is faulty. We do not notice, unless we check the log or try to run the MSI.
Does somebody had a similar problem or knows something which might help?

Thanks!

P.S. :As the InstallerCreator is calling the necessary WIX Toolset binaries I am posting this on this mailing list.

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list