Dendix
Dendix
CC#
Created by Dendix on 10/28/2024 in #help
Error acquiring .NET!
I was opening vscode and got met with this error. Any idea what caused this? This (?) also prevents the lsp from working
2 replies
CC#
Created by Dendix on 10/16/2024 in #help
Attempt to run a program with dll
I'm running this from vscode. The full error is:
c:\\Users\\Admin\\.vscode\\extensions\\ms-dotnettools.csharp-2.50.25-win32-x64\\.debugger\\x86_64\\vsdbg.exe --interpreter=vscode --connection=e8ed18252661403681b3640aca80dbff
Unhandled exception. System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B)
at Naquadic.Miniaudio.Windows.avx2.ma_engine_init(ma_engine_config* pConfig, ma_engine* pEngine)
at Program.Main(String[] args) in C:\Users\Admin\Documents\miniaudio\Test\Program.cs:line 13
c:\\Users\\Admin\\.vscode\\extensions\\ms-dotnettools.csharp-2.50.25-win32-x64\\.debugger\\x86_64\\vsdbg.exe --interpreter=vscode --connection=e8ed18252661403681b3640aca80dbff
Unhandled exception. System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B)
at Naquadic.Miniaudio.Windows.avx2.ma_engine_init(ma_engine_config* pConfig, ma_engine* pEngine)
at Program.Main(String[] args) in C:\Users\Admin\Documents\miniaudio\Test\Program.cs:line 13
And the console project Main file:
using Naquadic;
using Naquadic.Miniaudio.Windows;

class Program
{
static void Main(string[] args)
{
unsafe
{
ma_result result;
ma_engine engine;

result = avx2.ma_engine_init(null, &engine);
if (result != ma_result.MA_SUCCESS)
{
Console.WriteLine(result);
}
}
}
}
using Naquadic;
using Naquadic.Miniaudio.Windows;

class Program
{
static void Main(string[] args)
{
unsafe
{
ma_result result;
ma_engine engine;

result = avx2.ma_engine_init(null, &engine);
if (result != ma_result.MA_SUCCESS)
{
Console.WriteLine(result);
}
}
}
}
Naquadic is a reference to another project which exposes miniaudio structs, funcs, etc. I look up this error and it seems that the project and the dll is compiled in different architectures? Though I have no idea how to fix it since when I run it by clicking the little play icon at the top right, the command it uses to build always include /p:Platform="AnyCPU" and i don't know how to configure that. Any help is obv very much appreciated
10 replies