Access to the path ‘D:\Builds…nuspec’ is denied.
System.UnauthorizedAccessException: Access to the path '‘D:\Builds…nuspec’ is denied.
Thanks for reaching out.
We’re gonna need more info to be able to help here. Please send over the full TFS Build log (attached in a file) so we can check what is going on.
Most likely the problem is that the account under which the TFS agent is running doesn’t have access to that path. Please make sure that account read/write access to [D:\Builds*].
We also had such problem in case when OctoPackEnforceAddingFiles is set. It’s caused by fact that each file under TFS source control is read-only.
As workaround we check-out file in custom build step before build and perform undo later.
However, it’d be great if Octopus will use a copy of nuspec file to build a package to support such common case.