Can I run it without .NET framework?

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.
 
P

Peter van der Goes

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top