如何制作视觉工作室.exe win98兼容? [英] How do I make a visual studio .exe win98 compatible?

查看:112
本文介绍了如何制作视觉工作室.exe win98兼容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为工作应用程序构建了一个小型计算器。我们的控制PC在Windows98中是硬盘。计算器需要3个数字输入,做一些光算术,并输出数字答案,或者如果输出低于下限或高于某个范围的上限,则输出两个文本响应。非常简单。



我是在运行Visual Studio 2017的Windows XP 7机器上写的。我习惯使用Excel VBA,所以我对VS很新。当我尝试执行程序时,它说应用程序需要更新版本的Windows。我已导航到资源管理器中的.exe文件,并调整了与Win98的兼容性,但没有成功。还有什么我可以尝试让它兼容吗?



我尝试了什么:



资源管理器> Program.exe>属性>兼容性>



- 在Windows 98的兼容模式下运行此程序

- 以256色运行

- 禁用视觉主题



Dave K的建议

- 我将应用程序更改为目标.NET 2.0

I built a tiny calculator for a work application. Our control PCs are hardstuck in Windows98. The calculator takes 3 numerical inputs, does some light arithmetic, and outputs either a numerical answer, or two text responses if the output is below the low limit or above the high limit of a certain range. Very simple.

I wrote it on a Windows XP 7 machine running Visual Studio 2017. I customarily use Excel VBA so I am quite new to VS. When I try to execute the program it says the application expects a newer version of windows. I have navigated to the .exe file in the explorer and adjusted the compatibility to Win98 with no success. Is there anything else I can try to get it compatible?

What I have tried:

Explorer>Program.exe>Properties>Compatibility>

--"Run this program in compatibility mode for Windows 98"
--"Run in 256 colors"
--"Disable visual themes"

At Dave K's suggestion
--I changed the app to target .NET 2.0

推荐答案

Windows 98上支持的.NET Framework的最新版本是2.0,没有服务包。 .NET 2.0 SP1及更高版本在Windows 98上不起作用。



此外,您的项目必须以.NET 2.0为目标。如果您针对新版本的框架编写了应用程序,则必须进入Project Properties,Application选项卡,并将目标框架更改为.NET Framework 2.0。



之后,重新编译项目。您可能必须对代码进行更改才能使应用程序再次运行。您将从更高级版本的框架转变为更原始的版本,不支持新版本的所有功能。



接下来,您安装应用程序的机器必须安装.NET Framework 2.0 Redistributable,否则您的应用程序将无法启动。
The last version of the .NET Framework that was supported on Windows 98 was 2.0, with NO SERVICE PACK. .NET 2.0 SP1 and above do not work on Windows 98.

Also, your project has to target .NET 2.0. If you wrote the app against a new version of the framework, you're going to have to go into your Project Properties, Application tab, and change the targeted framework to ".NET Framework 2.0".

After that, recompile the project. You MAY have to make changes to the code to get the app to work again. You're going from a more advanced version of the framework to a more primitive version that doesn't support all of the stuff the newer versions do.

Next, the machines you install your app on MUST have the .NET Framework 2.0 Redistributable installed otherwise your app will not launch.


这篇关于如何制作视觉工作室.exe win98兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆