CustomBuild:拒绝访问。 error MSB6006: “cmd.exe” exited with code 1.

发布于 2020-05-05  51 次阅读


问题描述:

环境是VS2010+Qt4.8+WIN7 64位

程序出现过以下错误,发上来记录下

1>Build started 2015/5/8 17:04:04.

1>InitializeBuildStatus:

1>  Touching “ReleasePrint3D.unsuccessfulbuild”.

1>CustomBuild:

1>  拒绝访问。

1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0Microsoft.CppCommon.targets(151,5): error MSB6006: “cmd.exe” exited with code 1.

1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0Microsoft.CppCommon.targets(151,5): error MSB4018: The “CustomBuild” task failed unexpectedly.

1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0Microsoft.CppCommon.targets(151,5): error MSB4018: System.UnauthorizedAccessException: Access to the path ‘C:UsersQYTAppDataLocalTemptmp1f3026b6a61442caafb35697e6416a0c.cmd’ is denied.

1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0Microsoft.CppCommon.targets(151,5): error MSB4018:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0Microsoft.CppCommon.targets(151,5): error MSB4018:    at System.IO.File.InternalDelete(String path, Boolean checkHost)

1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0Microsoft.CppCommon.targets(151,5): error MSB4018:    at System.IO.File.Delete(String path)

1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0Microsoft.CppCommon.targets(151,5): error MSB4018:    at Microsoft.Build.Utilities.ToolTask.Execute()

1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0Microsoft.CppCommon.targets(151,5): error MSB4018:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.Execute()

1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0Microsoft.CppCommon.targets(151,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()

1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0Microsoft.CppCommon.targets(151,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()

1>

1>Build FAILED.

1>

1>Time Elapsed 00:00:00.36


解决方法:

是因为杀毒软件阻止的缘故,因此只要关闭杀毒软件,编译运行即可;再次开启杀毒软件的话,就不会再阻止了


一沙一世界,一花一天堂。君掌盛无边,刹那成永恒。