I have asp.net mvc project. I am updating some JavaScript files in the post-build event. It has the next format - "helperApp /sourceFolder /destinationFolder". It works great. But when I try to build it on TFS build server I have received the error (255 cant open file). It was happened because "C:\Build\.." folder and files inside are read only. So I can't update my JavaScript files.

I had similar issue when used WebDeploy from developer machine (files in destinationFolder were locked) but I fix this by using command "Check out for edit" from VS (It makes them writable).

My question: How is it possible to get access helperApp to project's files in post-build event during TFC build?

有帮助吗?

解决方案

First question is why are you editing source-controlled files as part of the build? Do you intend to check-in the changes as part of the build also?

You will need to update the build (either the TFS Workflow, or your MSBuild Targets) to Check-Out the files from TFS before attempting to modify them (or simply turn-off the Read-Only flag), then either Check-In when done modifying them or Undo Checkout on them.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top