当我想通过 C# 运行 GAMS 代码时,为什么 visual studio 给我错误?

Why does visual studio gives me error when I want to run the GAMS code via C#?

我想通过 GAMS API 通过 c# 运行 我的 GAMS 代码。当我开始 Visual studio 时,我在

中收到此错误
GAMSWorkspace ws = new GAMSWorkspace();

error: "Expected GAMS system to be 32 bit but found 64 bit instead. System directory: C:\GAMS\win64.1"

GAMS 和 windows 都是 64 位的。

有人可以帮我解决吗?

https://forum.gamsworld.org/viewtopic.php?t=7828卢茨说:

Normally this error only occurs if you built your application as a 32bit version explicitly. Could you please check if you still get the error if you select x64 as platform for your program in the configuration manager of Visual Studio?