VS22 报错MSB6003

严重性 代码 说明 项目 文件 行 禁止显示状态 工具 错误 MSB6003 指定的任务可执行文件“link.exe”未能运行。System.UnauthorizedAccessException: 对路径“*********\*********\************\x64\Debug\navigati.e0027839.tlog\link.read.2.tlog”的访问被拒绝。 在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 在 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) 在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 在 System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) 在 System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) 在 System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost) 在 Microsoft.Build.Utilities.CanonicalTrackedInputFiles.SaveTlog(DependencyFilter includeInTLog) 在 Microsoft.Build.CPPTasks.TrackedVCToolTask.ComputeOutOfDateSources() 在 Microsoft.Build.CPPTasks.Link.ComputeOutOfDateSources() 在 Microsoft.Build.Utilities.ToolTask.Execute() navigation_VSstudio_V1 D:\Program Files (x86)\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets 1094 Link

错误信息表明编译过程中 link.exe 无法运行,原因是对路径的访问被拒绝。

可尝试删除缓存文件:

  • 删除以下路径中的文件:
    ****\*******\*******\x64\Debug\ 
  • 然后重新生成项目。

 然后清理解决方案:

  1. 在 Visual Studio 中,依次点击 生成 -> 清理解决方案
  2. 然后重新编译。

 问题解决。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值