【问题标题】:Build error : Trust reason : "NotTrusted" Error构建错误:信任原因:“NotTrusted”错误
【发布时间】:2020-01-22 12:41:03
【问题描述】:

我将 Visual Studio 2019 用于 asp.net MVC 5,并将我的项目部署到 Web 服务器。我收到以下错误消息,请告知如何修复错误消息。

Trust reason :'NotTrusted' Error: 'System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\AppCapabilitiesTCH\TCH.csproj'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.GetAttributes(String path)
at Microsoft.VisualStudio.Shell.Connected.Packages.PathTrustVerifier.PathTrustVerifierService.<>c__DisplayClass35_0.<<CheckPathAsync>b__0>d.MoveNext()'

【问题讨论】:

  • 邮件的其余部分详细描述出了什么问题。它找不到您的 .csproj 文件。
  • 该文件应位于 C:\Code\TCH\TCH\TCH.csproj。您能告诉我如何解决这个问题吗?

标签: asp.net-mvc-5.2


【解决方案1】:

作为临时解决方案,我已将项目路径添加到可信路径列表中。

  1. 在 VS 中转到 工具 > 选项 > 环境 > 信任设置并点击配置信任设置
  2. 将您的项目根文件夹添加到可信路径列表中。
  3. 重启VS。

【讨论】:

    猜你喜欢
    • 2015-11-01
    • 1970-01-01
    • 2017-05-22
    • 2016-02-26
    • 2015-08-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多