0

According to output information omnisharp starts but cant load projects on ubuntu. this is the error message

[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, System.String path, System.Boolean isDirectory, System.Func`2[T,TResult] errorRewriter) [0x0000a] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at Interop.CheckIo (System.Int32 result, System.String path, System.Boolean isDirectory, System.Func`2[T,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 

right before that it also outputs this warning message:

[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, System.String path, System.Boolean isDirectory, System.Func`2[T,TResult] errorRewriter) [0x00014] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at Interop.CheckIo (System.Int64 result, System.String path, System.Boolean isDirectory, System.Func`2[T,TResult] errorRewriter) [0x0000a] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at Interop.CheckIo (System.Int32 result, System.String path, System.Boolean isDirectory, System.Func`2[T,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 
bigpod
  • 1
  • 1
    Quick fix : running ``` chmod -R 644 /usr/share/dotnet/sdk/5.0.102/Sdks ``` should do the trick – mbshambharkar Feb 23 '21 at 04:19
  • thanks so i guess standard dotnet package from microsofts repository has permissions that do not agree with omnisharp i probably should have guessed that. will use your fix as soon as i wake up in the morning – bigpod Feb 23 '21 at 04:24

0 Answers0