I recently installed Visual Studio 2022 17.5.5 on my Windows 11 machine and have been trying to run a C# program. I installed Mingw64 (version 12.2.0) to see if it would solve my problem, but I'm still getting the same error message.
I tried to run the following C# code in Visual Studio 2022 on Windows 11 with Mingw64 installed:
Problem with Visual Studio:
Code:
using System;
namespace Beecrowd
{
class Problem1044
{
static void Main(string[] args)
{
String[] input = Console.ReadLine().Split(' ');
int a = int.Parse(input[0]);
int b = int.Parse(input[1]);
if (a % b == 0 || b % a == 0)
{
Console.WriteLine("Sao Multiplos");
}
else
{
Console.WriteLine("Nao sao Multiplos");
}
}
}
}
However, I received the following error message:
Unable to start program "C:\Users\Lord\Kaminski\Documents\Codes\C#\Projects\App\bin\Debug\net6.0\App.dll'.
C:\Users\Lord\Kaminski\Documents\Codes\C#\Projects\App\bin\Debug\net6.0\App.dll is not a valid Win32 application.
I installed Mingw64 (version 12.2.0) to see if it would solve the problem, but the error persists. I'm hoping someone can help me troubleshoot and resolve this error. Thank you.