【发布时间】:2017-03-18 19:24:48
【问题描述】:
作为我的服务结构应用程序的一部分,我的 ApplicationManifest.xml 与我的其余代码处于源代码控制之下。当构建在构建服务器上运行时,它失败并出现以下异常。这发生在 AppManifestCleanupUtil 的执行期间更新应用程序清单。它在我的机器上运行良好。我在这里错过了什么吗? -
Unhandled Exception: System.UnauthorizedAccessException: Access to the path 'C:\MyProject\ApplicationManifest.xml' is denied.
在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
在 System.IO.FileStream.Init(字符串路径、FileMode 模式、FileAccess 访问、Int32 权限、Boolean useRights、FileShare 共享、Int32 bufferSize、FileOptions 选项、SECURITY_ATTRIBUTES secAttrs、String msgPath、Boolean bFromProxy、Boolean useLongPath、Boolean checkHost)
在 System.IO.FileStream..ctor(字符串路径、FileMode 模式、FileAccess 访问、FileShare 共享)
在 Microsoft.ServiceFabric.Services.Common.ExclusiveFileStream.Acquire(字符串路径、文件模式文件模式、文件共享文件共享)
在 AppManifestCleanupUtil.AppManifestCleanupUtil.LoadExistingAppManifest(字符串 appManifestPath)
在 AppManifestCleanupUtil.AppManifestCleanupUtil.CleanUp(字符串 appManifestPath,List1 serviceManifestPaths, List1 appParamFilePaths)
在 AppManifestCleanupUtil.Program.Main(String[] args)
【问题讨论】: