System.BadImageFormatException Error on VS Code Startup - c#

I am in the process of getting everything I need to start learning C# and I've run into an issue. I am trying to use VS code as my editor but the IntelliSense isn't working. I think it's because OmniSharp cannot start up. When it tries to it run into this error: System.BadImageFormatException. I'm doing this on a brand new project, literally, all I've done is run the command dotnet new console and then OmniSharp cannot open. If it's relevant I'm using Mac and have the latest updates installed. Any idea what's causing this error and how I can fix it?
Thank you for any and all help!

Ok, so after some trial and error I realized I was using the wrong sdk. So, if anyone else is having this problem make sure you have the right one! I ended up needing the Arm one and not the normal one.

Related

Unable to find mono. How can I change my Environment's PATH Variable?

I am currently learning AR Development by using Unity and Visual Studio Code on MacOS. I understand that part of the process is downloading the Mono.Framework in order to be able to use the autocompletion feature. That's what I did, but VS Code is throwing me an error: Unable to find Mono. Ensure that Mono's '/bin' folder is added to your environment's PATH variable.
Right now, I'm trying to edit my PATH variable which is
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands. I want to remove "/Commands" folder and replace it with the "/bin" folder.
So far, I've tried to re-start my computer, and when I open Unity and then a C# Script via Unity, it would work fine. I'd get the autocompletion to work with no problems. But when I close the Script and try to re-open it, I'd start getting the aforementioned error.
I tried to uninstall and reinstall Mono twice.
Also I t have tried is to add export PATH=/Library/Frameworks/Mono.framework/Versions/Current/bin:$PATH on my .bash_profile
The Expected Result result is this one:
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/bin
but the Result I get is this:
/Library/Frameworks/Mono.framework/Versions/Current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
How can I change the "/Commands" folder and replace it with the "/bin" folder?
P.D. That is what I think is the best course of action in order to solve the error, but I'm totally open to be corrected in case I'm wrong.
More info:
MacOS - 12.1
Unity - 2021.1.9f1
VS Code - 1.56.2 (Universal)
Mono - 6.12.0.122

Monodevelop not recompiling changes

Un Unity3d, I am having an issue where changes to Code (C#, Monodevelop) is not picked up, until I reload the Project or Reimport all assets.
The (Intermittent) problem seems to start when I write something with a compile time error. After that point, any changes to the file are ignored (the old error still appears when you try to Build again). Even commenting out the line, or adding other errors on purpose.
It seems to happen once or twice an hour.
Unity 5.5.0f3 64 bit on Mac.
Does anyone know a fix?
Can anyone suggest next steps to debug the compilation process?
I had this, upgrading to 5.5.1 once released fixes the problem.

Compiled exe does nothing

After fighting for quite some hours now, I think it's time to ask for some help. I'm quite new on C# development and Visual Studio environment so maybe it's something really stupid I have missed. I also searched for some answers and try some solutions (install SDK, change some thing on VS) but nothing helped. Anyway here is the problem...
I developed a small WPF application that is working great in Visual Studio. No errors, nothing. Compilation? Same. No error. Publishing? No error. When I try to launch the .exe file generated... Well nothing happens. I see my mouse cursor with the waiting cursor. The exe file is visible in my task manager and stay there until I restart my computer. When I try to kill it using the task manager, I have an error saying that I can't. When I try by using taskkill command line, it says the process does not exist...
As I expected something wrong with my app, I just created a blank WPF app, saved it and built it. So we can't make easier. And same problem. So I guess the problem is coming from some configuration in Visual Studio or something like that...
If anybody has an idea or some tips to debug the compiled app (there must be some error thrown somewhere I guess) I'll be so grateful.
Regards.
Edit
Some notes:
Even the simple WPF application that only displays an empty WPF form has the problem.
Output Type is "Windows Application"
I try to use the compiled app on the same machine as I developed it.

xnaliveproxy cannot find xlive.dll

I know that this is a common problem, but xnaliveproxy cannot find xlive.dll on my computer. This message pops up when I debug my program. The weird thing is that it only popped up after I typed this line of code:
Components.Add(new GamerServicesComponent(this));
and if I take that line away again, it debugs the program fine.
I have been told that I should not download the xlive.dll file, but rather re-install the program that needs it, But I cannot find xnaliveproxy uninstall or re-install on my pc.
How would I resolve this problem?
I just downloaded windows xna framework 4.0 refresh. Fixed the problem.

VS2008: "Error whilst trying to run project:Unable to start program. The debugger's protocol is incompatibile with the debugee"

I think i know roughly why i'm getting this message. I opened a VS2008 project in VS2010, realised my code wont work with .NET 4, so i re opened it in VS2008 but now it wont build.
Can someone advise me how i can get this back to executing? I deleted the debug folder and built again but nothing has changed. I also cleaned the project and solution.
Please help

Categories