Is the .NET Framework usable on Win98?

2020-07-07 01:09发布

问题:

I need to write a little tool for a customer to be run on Windows 98. Since this is a very small project I'd hope that I could avoid having to go native C++ and use C#.

The .net Framework 2.0 download claims to support Windows 98. Are there any caveats or hitches to be aware of when installing or coding?

回答1:

There are a few features that Win98 won't support such as form opacity and balloon tooltips. If you use any P/Invoke, you'll have to make sure to support ANSI versions of functions (use CharSet.Auto) and you'll have to check MSDN to make sure that the API functions you're using are supported on Win98. It will work, but if possible, you should test on Win98 before delivering to the customer.



回答2:

It is usable, but be sure to read the documentation for the classes that you end up using. Some of them are not supported on Win98, like the EventLog mentioned by Nick Baldwin.

Also, it may not be a trivial installation (at least in my experience). If I were you I would have checked to see if the client is able to install .NET 2.0 before starting the project.



回答3:

.NET 2.0 supports Windows 98, but you won't have access to some of the base library classes such as EventLog.



回答4:

I've written several "small tools" that I have personally run on Win98. What I would suggest is that you create a VM and test out your app after every significant build.

The issues I saw was almost completely UI related (things really didn't size correctly).



回答5:

You can target .NET 2.0 with the express editions too. In C# express you can change the framework in the project properties. You must save the project first.