C# 团队构建期间设置的wixtool获取light.exe System.UnauthorizedAccessException:访问路径

C# 团队构建期间设置的wixtool获取light.exe System.UnauthorizedAccessException:访问路径,c#,tfs,tfsbuild,wix3.8,C#,Tfs,Tfsbuild,Wix3.8,我有一个使用wixtoolset3.8的安装程序项目。该项目已经建设了2-3年,没有任何问题。在过去的6个月中,当TFS团队构建时,大约70%的时间会出现此错误。生成帐户是计算机上的管理员 UNHANDLED EXCEPTIONS FROM PROCESS 1832: 8/20/2018 7:37:54 AM System.Reflection.TargetInvocationException: Exception has been thrown by the target of an inv

我有一个使用wixtoolset3.8的安装程序项目。该项目已经建设了2-3年,没有任何问题。在过去的6个月中,当TFS团队构建时,大约70%的时间会出现此错误。生成帐户是计算机上的管理员

UNHANDLED EXCEPTIONS FROM PROCESS 1832:
8/20/2018 7:37:54 AM
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Access to the path 'C:\Users\svc-TFSBLD-ARGO\AppData\Local\Temp\ssvduzbf\bundle-attached.cab' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.SetAttributes(String path, FileAttributes fileAttributes)
at Microsoft.Tools.WindowsInstallerXml.Common.RecursiveFileAttributes(String path, FileAttributes fileAttribute, Boolean markAttribute)
at Microsoft.Tools.WindowsInstallerXml.Common.DeleteTempFiles(String path, IMessageHandler messageHandler)
at Microsoft.Tools.WindowsInstallerXml.WixBinder.DeleteTempFiles()
at Microsoft.Tools.WindowsInstallerXml.Binder.DeleteTempFiles()
at Microsoft.Tools.WindowsInstallerXml.Binder.Cleanup(Boolean tidy)
at Microsoft.Tools.WindowsInstallerXml.Tools.Light.Run(String[] args)
at Microsoft.Tools.WindowsInstallerXml.Tools.Light.Main(String[] args)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Tools.WindowsInstallerXml.Build.Tasks.WixToolTask.ExecuteToolThread(Object parameters)
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)

根据错误消息,这应该是一个授权问题

检查以下事项:

  • 确认生成服务帐户具有访问的权限 路径将生成服务帐户添加到上的本地管理员组 构建服务器
  • 确认文件
    C:\Users\svc-TFSBLD-ARGO\AppData\Local\Temp\ssvduzbf\bundle-attached.cab
    在那里是存在的
  • 禁用生成服务器上的任何反病毒或反垃圾邮件软件。 (
    McAfee:实时扫描
  • 参考以排除其他问题

您也可以尝试使用管理员用户作为构建代理服务帐户,然后检查是否有效。

嘿,那么您的问题是什么?是什么导致了这种情况?我们已经看过麦卡菲了。我们已确保生成帐户是管理员。