我对运行速度缓慢的PC拥有Visual Studio 2017感到有点厌倦。因此,在恢复了正确构建的依赖关系后,我将Mac的代码转移到了装有Visual Studio 2017 for Mac的地方,但是在运行时,出现了以下异常:
Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvException has been thrown
error -13 EACCES permission denied
因此,我尝试从终端运行dotnet来查找此错误的根本原因:
dotnet run
现在,我抛出如下异常:
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider [48]
An error occurred while reading the key ring.
System.UnauthorizedAccessException: Access to the path '/Users/apple/.aspnet/DataProtection-Keys/42cb81a7-89b6-4a29-86ae-76d3acca3076.tmp' is denied. ---> System.IO.IOException: Permission denied
因此,这是需要权限才能访问此路径的错误,因此我尝试了以下操作:
sudo dotnet run
哪个运行完美。
现在的问题是,如何在Visual Studio Mac中运行它?我需要多次调试和遍历代码。
在终端中运行以下命令:这将以Admin特权打开Visual Studio,其工作方式类似于charm。
sudo /Applications/Visual\ Studio.app/Contents/MacOS/VisualStudio
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句