4
Answers

Can a straight DOS executable be built with C# ??

Administrator

Administrator

22y
1.9k
1
I'm using Visual Studio.net, and I'm trying to build a basic console application which could run at a Windows 95/98 Command prompt? Anyone know if this can even be done? Do I need to fall back to C++ and an old Borland Turbo C++? Thanks! Roger
Answers (4)
1
Administrator

Administrator

Tech Writer 2.2k 1.6m 22y
THis one gets closer, and I think y'all have answered it... I am working on a program that runs before Windows loads, so what I'm hearing sounds like I'm going to need to do it in Turbo C++ (Free now over on Borland's site, yay!) Thanks!! Roger
1
Administrator

Administrator

Tech Writer 2.2k 1.6m 22y
First, you can't use Windows 95. To build your application, do the following: programs -> visual studio.NET -> visual studio.NET tools -> visual studio.NET command prompt. When your are in the right directory, write: csc /t:exe "yourapplicationsMain".cs , now your application has been built. To run the application write: "yourapplicationsMain"
1
Administrator

Administrator

Tech Writer 2.2k 1.6m 22y
Mike, your term "NET fix" sounds weird, dotnefx is the .NET Framework redistributable. That is, the needed package to run managed code. (I'm sure you knew that, just wanted to clarify :) ) Yes, one can create C# console application that runs in command prompt. (The machine naturally needs the .NET Framework though). The application will run in any machine that has .NET Framework installed.
1
Administrator

Administrator

Tech Writer 2.2k 1.6m 22y
I think if you install the .NET fix (dotnetfx.exe) you can create a console app using VS.NET and run it from the dos prompt in 98 (not sure about 95). It will run with the CLR as managed code. Can someone confirm this? If you want to run with straight Windows SDK, you'll need to fall back to Visual C++ 6.0. -Mike G.