构建错误:信任原因:“未信任”错误

问题描述 投票:1回答:1

我将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()'
asp.net-mvc-5.2
1个回答
0
投票

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

  1. 在VS中,转到工具> 选项> 环境> 信任设置,然后单击配置信任设置
  2. 将您的项目根文件夹添加到受信任的路径列表中。
  3. 重新启动VS。
© www.soinside.com 2019 - 2024. All rights reserved.