简体   繁体   English

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

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

I want to run my GAMS code via c# by GAMS API.我想通过 GAMS API 通过 c# 运行我的 GAMS 代码。 when I start Visual studio,I recieve this error in当我启动 Visual Studio 时,我收到此错误

GAMSWorkspace ws = new GAMSWorkspace();

error: "Expected GAMS system to be 32 bit but found 64 bit instead. System directory: C:\\GAMS\\win64\\25.1"错误:“预期 GAMS 系统为 32 位,但发现 64 位。系统目录:C:\\GAMS\\win64\\25.1”

GAMS and windows are both 64 bit. GAMS 和 windows 都是 64 位的。

Can anybody help me to solve it?有人可以帮我解决吗?

According to https://forum.gamsworld.org/viewtopic.php?t=7828 Lutz says:根据https://forum.gamsworld.org/viewtopic.php?t=7828 Lutz 说:

Normally this error only occurs if you built your application as a 32bit version explicitly.通常,仅当您将应用程序明确构建为 32 位版本时才会发生此错误。 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?如果您在 Visual Studio 的配置管理器中选择 x64 作为程序的平台,请检查是否仍然出现错误?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我需要 Visual Studio 中 C# 的帮助,当我运行应用程序时,它给了我在 position 0 [暂停] 处没有行 - I need help in C# in Visual Studio, when I run the app it gives me there is no row at position 0 [on hold] 我想访问visual studio命令propmt并使用C#代码运行.bat文件 - I want to access visual studio command propmt and run a .bat file using C# code 为什么在Visual C#项目中使用Measurement Studio .NET控件时,为什么在运行时出现未经许可的程序集错误消息 - Why Do I Get an Unlicensed Assemblies Error Message at Run Time When Using Measurement Studio .NET Controls in a Visual C# Project 为什么这在 Visual Studio 2019 中运行而不是 2022? c#中的方法 - Why does this run in Visual Studio 2019 but not 2022? Method in c# Visual Studio 代码 C# “在不调试的情况下运行”错误 - Visual Studio Code C# "Run Without Debugging" error WinForms - 为什么每次在Visual Studio中打开它时C#表单都会运行SQL? - WinForms - why does C# form run the SQL in it every time I open it in Visual Studio? 我可以在 Visual Studio/Code 中测试/运行 Unity C# 吗? - Can I test/run Unity C# in Visual Studio/Code? MS Visual Studio C#-有人可以向我解释为什么我的代码不起作用以及如何使它起作用吗? - MS Visual Studio C# - Can someone explain to me why my code isn't working and how I can get it to work? 尝试在 Visual Studio Code 中调试 C# 时出现“要执行的应用程序不存在”错误 - 'The application to execute does not exist' error when trying to debug C# in Visual Studio Code C# Visual Studio - 为什么会出现错误“并非所有代码路径都返回值”? - C# Visual Studio - why do I get an error “Not all code paths return a value”?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM