atul
atul

Reputation: 143

Build fails while running AppManifestCleanupUtil executable for Service Fabric App

As part of my service fabric application, my ApplicationManifest.xml is under source control with the rest of my code.When the build runs on the build server, it fails with the below exception.This occurs during the execution of AppManifestCleanupUtil while updating the ApplicationManifest. It works just fine on my machine. Am i missing something here ? -

Unhandled Exception: System.UnauthorizedAccessException: Access to the path 'C:\MyProject\ApplicationManifest.xml' is denied.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Microsoft.ServiceFabric.Services.Common.ExclusiveFileStream.Acquire(String path, FileMode fileMode, FileShare fileShare) at AppManifestCleanupUtil.AppManifestCleanupUtil.LoadExistingAppManifest(String appManifestPath) at AppManifestCleanupUtil.AppManifestCleanupUtil.CleanUp(String appManifestPath, List1 serviceManifestPaths, List1 appParamFilePaths) at AppManifestCleanupUtil.Program.Main(String[] args)

Upvotes: 0

Views: 830

Answers (1)

Matt Thalman
Matt Thalman

Reputation: 3965

Be sure to build locally on your development machine prior to submitting to source control. That will ensure the ApplicationManifest.xml file is up-to-date with your application project state. If it is not up-to-date and the file is read-only, you'll get this error.

Upvotes: 1

Related Questions