I having kind of absurd situation and I will glad to hear how exactly you guys handling it:
I have a Hybrid App project, Visual Studio 2015 Cordova Tools. Inside it,
Check if the folder is Read Only, if it is - uncheck the "Read Only" property on the folder and select "Apply changes to this folder, subfolders and files"
I get the same exception when I use TFS with Cordova.
When I'm committing the folder become Read Only, that's a very annoying bug...
For me, the directory that the error message pointed to was just plain missing. Same IDE, same type of app.
It was looking for \GitHub...\myProjectName\platforms\windows\www
I manually added the dir (www) back in and the project ran fine. The IDE deletes that dir at the beginning of the build then throws the EPERM exception. Sure looks like a bug to me.
I thought I'd chime in here with what I've done. The problem is that "platforms" is not checked into source, but it is still being marked as Read-Only. So the first time it builds it works and subsequent builds fail unless you do a clean solution.
What I've done is I remove the Read-Only flag before build.
Right click project, Unload Project. Right click, edit project file. At the top, add a target named BeforeBuild
for example:
<Project ToolsVersion="14.0" DefaultTargets="BeforeBuild;Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Then at the bottom of the file where the targets go you can add a target like this:
<Target Name="BeforeBuild">
<Exec Command="attrib -R "$(SolutionDir)YourProjectName\platforms\*.*" /S" IgnoreExitCode="true" />
</Target>