微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

linux上的Omnisharp明显启动但无法加载项目并在visual studio代码上输出错误

如何解决linux上的Omnisharp明显启动但无法加载项目并在visual studio代码上输出错误

根据输出信息omnisharp启动但无法在ubuntu上加载项目。这是错误信息

[fail]: OmniSharp.MSBuild.ProjectLoader
        The "CreateAppHost" task Failed unexpectedly.
System.UnauthorizedAccessException: Access to the path is denied. ---> System.IO.IOException: Operacija ni dovoljena (Operation not allowed i think for some reason this part shows in my chosen OS langauge)
   --- End of inner exception stack trace ---
  at Interop.ThrowExceptionForIoErrno (Interop+ErrorInfo errorInfo,System.String path,System.Boolean isDirectory,System.Func`2[T,TResult] errorRewriter) [0x00014] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at Interop.CheckIo (system.int64 result,TResult] errorRewriter) [0x0000a] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at Interop.CheckIo (system.int32 result,TResult] errorRewriter) [0x00000] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at System.IO.FileSystem.copyFile (System.String sourceFullPath,System.String destFullPath,System.Boolean overwrite) [0x0005c] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at System.IO.File.copy (System.String sourceFileName,System.String destFileName,System.Boolean overwrite) [0x00062] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at Microsoft.NET.HostModel.AppHost.BinaryUtils.copyFile (System.String sourcePath,System.String destinationPath) [0x00020] in <ed3b6b71decf41cb8876c183ba6fdd7e>:0 
  at Microsoft.NET.HostModel.AppHost.HostWriter.CreateAppHost (System.String appHostSourceFilePath,System.String appHostDestinationFilePath,System.String appBinaryFilePath,System.Boolean windowsGraphicalUserInterface,System.String assemblyTocopyResorcesFrom) [0x00043] in <ed3b6b71decf41cb8876c183ba6fdd7e>:0 
  at Microsoft.NET.Build.Tasks.CreateAppHost.ExecuteCore () [0x0009f] in <66b08175c8bd43eda1fda46fdebf1641>:0 
  at Microsoft.NET.Build.Tasks.TaskBase.Execute () [0x0002e] in <66b08175c8bd43eda1fda46fdebf1641>:0 
  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <f7274894ce154696afba1f0ffcd06434>:0 
  at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost,Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext,Microsoft.Build.BackEnd.TaskHost taskHost,Microsoft.Build.BackEnd.ItemBucket bucket,Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x002fc] in <f7274894ce154696afba1f0ffcd06434>:0 
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file 

就在此之前,它还会输出此警告消息:

[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file 'path to projectfile'.
path to projectfile
/usr/share/dotnet/sdk/5.0.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(460,5): Error: The "CreateAppHost" task Failed unexpectedly.
System.UnauthorizedAccessException: Access to the path is denied. ---> System.IO.IOException: Operacija ni dovoljena
   --- End of inner exception stack trace ---
  at Interop.ThrowExceptionForIoErrno (Interop+ErrorInfo errorInfo,Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x002fc] in <f7274894ce154696afba1f0ffcd06434>:0 

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。