Whenever I run this script:
using System;namespace learningCSharp{ class Program{ static void Main(string[] args){ Console.WriteLine("Hello world!"); } }}
It throws this error at me:
Unhandled exception: System.ComponentModel.Win32Exception (13): An error occurred trying to start process '/media/emerson-rexroth/BRYCESTUFF/code/learningC#/bin/Debug/net8.0/learningC#' with working directory '/media/emerson-rexroth/BRYCESTUFF/code/learningC#'. Permission denied
at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at Microsoft.DotNet.Cli.Utils.Command.Execute(Action`1 processStarted)
at Microsoft.DotNet.Tools.Run.RunCommand.Execute()
at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult parseResult)
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
I run the script using the vscode terminal using dotnet run. I downloaded .net using the microsoft tutorial for Ubuntu 20.04, but not through WSL(Im new to Ubuntu/Linux). Any help is appreciated!
I have Uninstalled .net and reinstalled it. I expected the script to run like when I used to use windows, but now this is happening.