Can I run it without .NET framework?

  • Thread starter Thread starter alessio1946
  • Start date Start date
A

alessio1946

I know I can't run an exe file created using VS.NET into a PC in
which is not installed .NET framework.

I know also that this happen because the executable really contain
MSIL pseudo code.

Well, I've created a simple application using .NET VC++ and MFC
linked as a static library. I've only created a simple window which
open and close. I've copied the exe file into an other PC wich doesn't
have .NET framework installed and I've run it. The executable run
without problem.

How it is possible this? Why I've not obtained no error? Why it run,
even if i've never installed .NET framework in this PC?

Thanks to any idea.
 
I know I can't run an exe file created using VS.NET into a PC in
which is not installed .NET framework.

I know also that this happen because the executable really contain
MSIL pseudo code.

Well, I've created a simple application using .NET VC++ and MFC
linked as a static library. I've only created a simple window which
open and close. I've copied the exe file into an other PC wich doesn't
have .NET framework installed and I've run it. The executable run
without problem.

How it is possible this? Why I've not obtained no error? Why it run,
even if i've never installed .NET framework in this PC?

Thanks to any idea.
Because you can create C++ applications that have nothing to do with the
..NET Framework using Visual Studio .NET. The MFC application you created
uses the Microsoft Foundation Classes, not the .NET Framework. As you
elected to link your application statically to MFC, MFC was compiled into
your executable. Thus, your executable will work on any Windows 32 bit OS.
MFC .exe files are true executables.
If you try the same experiment using the C++ Windows Forms Application,
Windows Control Library or Windows Service template, all of which *are*
..NET-dependent, your experiment will fail.
Bottom line: While C# and Visual Basic are strictly .NET, C++ retains it's
versatility.
 
Back
Top