[wix-users] TFS 2017 Build MakeSfxCA.exe Sometimes throws System.UnauthorizedAccessException
G mbh
gomelette42 at gmail.com
Wed Feb 15 06:42:51 PST 2017
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.
More information about the wix-users
mailing list